From 0c6bb91e86c044a9c857f9f7721e196b7ee59936 Mon Sep 17 00:00:00 2001 From: Krishna Chandra Date: Tue, 21 Apr 2026 22:57:05 +0530 Subject: [PATCH 1/8] feat: add api key rotation policy and update --- openapi.yaml | 2854 ++++++++++++++++++++++++++------------------------ 1 file changed, 1499 insertions(+), 1355 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 544dc3a7..1704d9de 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -139,7 +139,6 @@ tags: - name: Secret-References description: Create, List, Retrieve, Update, and Delete secret references to external secret managers. - paths: # Note: When adding an endpoint, make sure you also add it in the `groups` section, in the end of this file, # under the appropriate group @@ -193,7 +192,7 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d '{ + -d "{ "model": "gpt-5", "messages": [ { @@ -206,7 +205,7 @@ paths: } ], "max_completion_tokens": 250 - }' + }" - lang: cURL label: Self-Hosted source: | @@ -214,7 +213,7 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d '{ + -d "{ "model": "gpt-5", "messages": [ { @@ -227,7 +226,7 @@ paths: } ], "max_completion_tokens": 250 - }' + }" - lang: python label: Default source: | @@ -272,11 +271,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const portkey = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -293,12 +292,12 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const portkey = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY', - baseUrl: 'SELF_HOSTED_GATEWAY_URL' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY", + baseUrl: "SELF_HOSTED_GATEWAY_URL" }); async function main() { @@ -370,30 +369,30 @@ paths: - lang: javascript label: Default source: | - import WebSocket from 'ws'; + import WebSocket from "ws"; const ws = new WebSocket( - 'wss://api.portkey.ai/v1/realtime?model=gpt-4o-realtime-preview', + "wss://api.portkey.ai/v1/realtime?model=gpt-4o-realtime-preview", { headers: { - 'x-portkey-api-key': process.env.PORTKEY_API_KEY, - 'x-portkey-virtual-key': process.env.PORTKEY_PROVIDER_VIRTUAL_KEY, + "x-portkey-api-key": process.env.PORTKEY_API_KEY, + "x-portkey-virtual-key": process.env.PORTKEY_PROVIDER_VIRTUAL_KEY, }, } ); - lang: javascript label: Self-Hosted source: | - import WebSocket from 'ws'; + import WebSocket from "ws"; const u = new URL(process.env.SELF_HOSTED_GATEWAY_URL); - u.protocol = u.protocol === 'https:' ? 'wss:' : 'ws:'; - u.pathname = `${u.pathname.replace(/\/$/, '')}/realtime`; - u.searchParams.set('model', 'gpt-4o-realtime-preview'); + u.protocol = u.protocol === "https:" ? "wss:" : "ws:"; + u.pathname = `${u.pathname.replace(/\/$/, "")}/realtime`; + u.searchParams.set("model", "gpt-4o-realtime-preview"); new WebSocket(u.toString(), { headers: { - 'x-portkey-api-key': process.env.PORTKEY_API_KEY, - 'x-portkey-virtual-key': process.env.PORTKEY_PROVIDER_VIRTUAL_KEY, + "x-portkey-api-key": process.env.PORTKEY_API_KEY, + "x-portkey-virtual-key": process.env.PORTKEY_PROVIDER_VIRTUAL_KEY, }, }); - lang: python @@ -476,12 +475,12 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d '{ + -d "{ "model": "gpt-3.5-turbo-instruct", "prompt": "Say this is a test", "max_tokens": 7, "temperature": 0 - }' + }" - lang: python label: Default source: | @@ -503,11 +502,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const portkey = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -525,12 +524,12 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const portkey = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY', - baseUrl: 'SELF_HOSTED_GATEWAY_URL' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY", + baseUrl: "SELF_HOSTED_GATEWAY_URL" }); async function main() { @@ -571,12 +570,12 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d '{ + -d "{ "model": "gpt-3.5-turbo-instruct", "prompt": "Say this is a test", "max_tokens": 7, "temperature": 0 - }' + }" /collections: servers: *ControlPlaneServers @@ -606,7 +605,7 @@ paths: required: - name responses: - '200': + "200": description: Collection created successfully content: application/json: @@ -620,17 +619,17 @@ paths: slug: type: string description: Slug of the created collection - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Workspace or parent collection not found - '500': + "500": description: Server error - + get: summary: List collections description: Lists all collections in the specified workspace @@ -666,7 +665,7 @@ paths: type: string description: Search query to filter collections by name responses: - '200': + "200": description: List of collections content: application/json: @@ -679,18 +678,18 @@ paths: data: type: array items: - $ref: '#/components/schemas/CollectionWithDetails' - '400': + $ref: "#/components/schemas/CollectionWithDetails" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Workspace not found - '500': + "500": description: Server error - + /collections/{collectionId}: servers: *ControlPlaneServers parameters: @@ -700,7 +699,7 @@ paths: schema: type: string description: ID or slug of the collection - + get: summary: Get collection details description: Retrieves details of a specific collection @@ -709,24 +708,24 @@ paths: security: - Portkey-Key: [] responses: - '200': + "200": description: Collection details content: application/json: schema: - $ref: '#/components/schemas/CollectionWithChildCollections' - '401': + $ref: "#/components/schemas/CollectionWithChildCollections" + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Collection not found - '500': + "500": description: Server error - + put: summary: Update collection - description: Updates a collection's details + description: Updates a collection"s details security: - Portkey-Key: [] tags: @@ -744,7 +743,7 @@ paths: required: - name responses: - '200': + "200": description: OK headers: Content-Type: @@ -756,17 +755,17 @@ paths: schema: type: object example: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Collection not found - '500': + "500": description: Server error - + delete: summary: Delete collection description: Deletes a collection @@ -775,7 +774,7 @@ paths: tags: - Collections responses: - '200': + "200": description: OK headers: Content-Type: @@ -787,13 +786,13 @@ paths: schema: type: object example: {} - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Collection not found or trying to delete default collection - '500': + "500": description: Server error /labels: @@ -811,25 +810,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateLabelRequest' + $ref: "#/components/schemas/CreateLabelRequest" responses: - '200': + "200": description: Label created successfully content: application/json: schema: - $ref: '#/components/schemas/CreateLabelResponse' - '400': + $ref: "#/components/schemas/CreateLabelResponse" + "400": description: Invalid request content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '401': + $ref: "#/components/schemas/ErrorResponse" + "401": description: Unauthorized - '403': + "403": description: Forbidden - '500': + "500": description: Server error get: @@ -870,23 +869,23 @@ paths: minimum: 1 description: Number of items per page responses: - '200': + "200": description: List of labels content: application/json: schema: - $ref: '#/components/schemas/ListLabelsResponse' - '400': + $ref: "#/components/schemas/ListLabelsResponse" + "400": description: Invalid request content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '401': + $ref: "#/components/schemas/ErrorResponse" + "401": description: Unauthorized - '403': + "403": description: Forbidden - '500': + "500": description: Server error /labels/{labelId}: @@ -919,25 +918,25 @@ paths: type: string description: ID or slug of the workspace responses: - '200': + "200": description: Label details content: application/json: schema: - $ref: '#/components/schemas/Label' - '400': + $ref: "#/components/schemas/Label" + "400": description: Invalid request content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '401': + $ref: "#/components/schemas/ErrorResponse" + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Label not found - '500': + "500": description: Server error put: @@ -961,9 +960,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateLabelRequest' + $ref: "#/components/schemas/UpdateLabelRequest" responses: - '200': + "200": description: OK headers: Content-Type: @@ -975,19 +974,19 @@ paths: schema: type: object example: {} - '400': + "400": description: Invalid request content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '401': + $ref: "#/components/schemas/ErrorResponse" + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Label not found - '500': + "500": description: Server error delete: @@ -1007,7 +1006,7 @@ paths: format: uuid description: ID of the label to delete responses: - '200': + "200": description: OK headers: Content-Type: @@ -1019,19 +1018,19 @@ paths: schema: type: object example: {} - '400': + "400": description: Invalid request content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '401': + $ref: "#/components/schemas/ErrorResponse" + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Label not found - '500': + "500": description: Server err /prompts: @@ -1093,7 +1092,7 @@ paths: type: object description: Metadata for the prompt responses: - '200': + "200": description: Prompt created successfully content: application/json: @@ -1110,16 +1109,16 @@ paths: format: uuid object: type: string - enum: ['prompt'] - '400': + enum: ["prompt"] + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '500': + "500": description: Server error - + get: summary: List prompts operationId: listPrompts @@ -1149,7 +1148,7 @@ paths: schema: type: string responses: - '200': + "200": description: List of prompts content: application/json: @@ -1159,18 +1158,18 @@ paths: data: type: array items: - $ref: '#/components/schemas/PromptSummary' + $ref: "#/components/schemas/PromptSummary" total: type: integer - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '500': + "500": description: Server error - + /prompts/{promptId}: servers: *ControlPlaneServers get: @@ -1187,27 +1186,27 @@ paths: schema: type: string responses: - '200': + "200": description: Prompt details content: application/json: schema: - $ref: '#/components/schemas/Prompt' - '400': + $ref: "#/components/schemas/Prompt" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt not found - '500': + "500": description: Server error - + put: summary: Update a prompt description: | - Update a prompt's metadata and/or create a new version with updated template content. + Update a prompt"s metadata and/or create a new version with updated template content. **Partial version updates:** Set `patch: true` to perform a partial update of version fields (`string`, `parameters`, `model`, `virtual_key`, `version_description`, `functions`, `tools`, `tool_choice`, `is_raw_template`, `prompt_metadata`). When enabled, any version fields omitted from the request are backfilled from the current latest version, allowing you to update only the fields you need. When `patch` is omitted or `false`, all version fields must be provided together (original strict validation). @@ -1274,7 +1273,7 @@ paths: type: object description: Additional metadata for the prompt version. When `patch` is `true`, this field is optional and will be inherited from the current latest version if omitted. responses: - '200': + "200": description: Prompt updated successfully content: application/json: @@ -1289,17 +1288,17 @@ paths: prompt_version_id: type: string format: uuid - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt not found - '500': + "500": description: Server error - + delete: summary: Delete a prompt operationId: deletePrompt @@ -1314,24 +1313,24 @@ paths: schema: type: string responses: - '200': + "200": description: Prompt deleted successfully content: application/json: schema: type: object properties: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt not found - '500': + "500": description: Server error - + /prompts/{promptId}/versions: servers: *ControlPlaneServers get: @@ -1348,25 +1347,25 @@ paths: schema: type: string responses: - '200': + "200": description: List of prompt versions content: application/json: schema: type: array items: - $ref: '#/components/schemas/PromptVersionSummary' - '400': + $ref: "#/components/schemas/PromptVersionSummary" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt not found - '500': + "500": description: Server error - + /prompts/{promptId}/versions/{versionId}: servers: *ControlPlaneServers get: @@ -1389,23 +1388,23 @@ paths: type: string format: uuid responses: - '200': + "200": description: Prompt version details content: application/json: schema: - $ref: '#/components/schemas/Prompt' - '400': + $ref: "#/components/schemas/Prompt" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt version not found - '500': + "500": description: Server error - + put: summary: Update a specific version of a prompt description: | @@ -1441,24 +1440,24 @@ paths: format: uuid description: The label to assign to this version. responses: - '200': + "200": description: Prompt version updated successfully content: application/json: schema: type: object properties: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt version not found - '500': + "500": description: Server error - + /prompts/{promptId}/makeDefault: servers: *ControlPlaneServers put: @@ -1487,24 +1486,24 @@ paths: type: number description: Version Number to set as default responses: - '200': + "200": description: Default version set successfully content: application/json: schema: type: object properties: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt or version not found - '500': + "500": description: Server error - + /prompts/partials: servers: *ControlPlaneServers post: @@ -1535,7 +1534,7 @@ paths: version_description: type: string responses: - '200': + "200": description: Prompt partial created successfully content: application/json: @@ -1550,15 +1549,15 @@ paths: version_id: type: string format: uuid - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '500': + "500": description: Server error - + get: summary: List prompt partials operationId: listPromptPartials @@ -1572,25 +1571,25 @@ paths: schema: type: string responses: - '200': + "200": description: List of prompt partials content: application/json: schema: type: array items: - $ref: '#/components/schemas/PromptPartialSummary' - '400': + $ref: "#/components/schemas/PromptPartialSummary" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Not found - '500': + "500": description: Server error - + /prompts/partials/{promptPartialId}: servers: *ControlPlaneServers get: @@ -1607,23 +1606,23 @@ paths: schema: type: string responses: - '200': + "200": description: Prompt partial details content: application/json: schema: - $ref: '#/components/schemas/PromptPartial' - '400': + $ref: "#/components/schemas/PromptPartial" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt partial not found - '500': + "500": description: Server error - + put: summary: Update a prompt partial operationId: updatePromptPartial @@ -1653,7 +1652,7 @@ paths: status: type: string responses: - '200': + "200": description: Prompt partial updated successfully content: application/json: @@ -1663,17 +1662,17 @@ paths: prompt_partial_version_id: type: string format: uuid - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt partial not found - '500': + "500": description: Server error - + delete: summary: Delete a prompt partial operationId: deletePromptPartial @@ -1688,24 +1687,24 @@ paths: schema: type: string responses: - '200': + "200": description: Prompt partial deleted successfully content: application/json: schema: type: object properties: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt partial not found - '500': + "500": description: Server error - + /prompts/partials/{promptPartialId}/versions: servers: *ControlPlaneServers get: @@ -1722,25 +1721,25 @@ paths: schema: type: string responses: - '200': + "200": description: List of prompt partial versions content: application/json: schema: type: array items: - $ref: '#/components/schemas/PromptPartialVersion' - '400': + $ref: "#/components/schemas/PromptPartialVersion" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt partial not found - '500': + "500": description: Server error - + /prompts/partials/{promptPartialId}/makeDefault: servers: *ControlPlaneServers put: @@ -1769,22 +1768,22 @@ paths: type: number description: Version Number to set as default responses: - '200': + "200": description: Default version set successfully content: application/json: schema: type: object properties: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt partial or version not found - '500': + "500": description: Server error /prompts/{promptId}/completions: @@ -1813,7 +1812,7 @@ paths: required: - variables description: | - Note: Although hyperparameters are shown grouped here (like messages, max_completion_tokens, temperature, etc.), they should only be passed at the root level, alongside 'variables' and 'stream'. The `max_tokens` parameter is deprecated — use `max_completion_tokens` instead. + Note: Although hyperparameters are shown grouped here (like messages, max_completion_tokens, temperature, etc.), they should only be passed at the root level, alongside "variables" and "stream". The `max_tokens` parameter is deprecated — use `max_completion_tokens` instead. properties: variables: type: object @@ -1859,13 +1858,13 @@ paths: curl -X POST "https://api.portkey.ai/v1/prompts/YOUR_PROMPT_ID/completions" \ -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ - -d '{ + -d "{ "variables": { "user_input": "Hello world" }, "max_completion_tokens": 250, "presence_penalty": 0.2 - }' + }" - lang: Python label: Default source: | @@ -1889,10 +1888,10 @@ paths: - lang: JavaScript label: Default source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const portkey = new Portkey({ - apiKey: 'PORTKEY_API_KEY' + apiKey: "PORTKEY_API_KEY" }); const completion = await portkey.prompts.completions.create({ @@ -1911,13 +1910,13 @@ paths: curl -X POST "SELF_HOSTED_GATEWAY_URL/prompts/YOUR_PROMPT_ID/completions" \ -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ - -d '{ + -d "{ "variables": { "user_input": "Hello world" }, "max_completion_tokens": 250, "presence_penalty": 0.2 - }' + }" - lang: python label: Self-Hosted source: | @@ -1941,11 +1940,11 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const portkey = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - baseURL: 'SELF_HOSTED_GATEWAY_URL' + apiKey: "PORTKEY_API_KEY", + baseURL: "SELF_HOSTED_GATEWAY_URL" }); const completion = await portkey.prompts.completions.create({ @@ -1960,7 +1959,7 @@ paths: console.log(completion); /prompts/{promptId}/render: - servers: *DataPlaneServers + servers: *DataPlaneServers post: operationId: createPromptRender tags: @@ -1985,7 +1984,7 @@ paths: required: - variables description: | - Note: Although hyperparameters are shown grouped here (like messages, max_completion_tokens, temperature, etc.), they should only be passed at the root level, alongside 'variables' and 'stream'. The `max_tokens` parameter is deprecated — use `max_completion_tokens` instead. + Note: Although hyperparameters are shown grouped here (like messages, max_completion_tokens, temperature, etc.), they should only be passed at the root level, alongside "variables" and "stream". The `max_tokens` parameter is deprecated — use `max_completion_tokens` instead. properties: variables: type: object @@ -2014,13 +2013,13 @@ paths: curl -X POST "https://api.portkey.ai/v1/prompts/YOUR_PROMPT_ID/render" \ -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ - -d '{ + -d "{ "variables": { "user_input": "Hello world" }, "max_completion_tokens": 250, "presence_penalty": 0.2 - }' + }" - lang: Python label: Default source: | @@ -2044,10 +2043,10 @@ paths: - lang: "JavaScript" label: Default source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const portkey = new Portkey({ - apiKey: 'PORTKEY_API_KEY' + apiKey: "PORTKEY_API_KEY" }); const completion = await portkey.prompts.render({ @@ -2066,13 +2065,13 @@ paths: curl -X POST "SELF_HOSTED_GATEWAY_URL/prompts/YOUR_PROMPT_ID/render" \ -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ - -d '{ + -d "{ "variables": { "user_input": "Hello world" }, "max_completion_tokens": 250, "presence_penalty": 0.2 - }' + }" - lang: Python label: Self-Hosted source: | @@ -2097,11 +2096,11 @@ paths: - lang: "JavaScript" label: Self-Hosted source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const portkey = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - baseUrl: 'SELF_HOSTED_GATEWAY_URL' + apiKey: "PORTKEY_API_KEY", + baseUrl: "SELF_HOSTED_GATEWAY_URL" }); const completion = await portkey.prompts.render({ @@ -2127,7 +2126,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateGuardrailRequest' + $ref: "#/components/schemas/CreateGuardrailRequest" examples: # BASIC CATEGORY EXAMPLES jwt_authentication: @@ -2156,7 +2155,13 @@ paths: checks: - id: "default.modelWhitelist" parameters: - models: ["gpt-4", "gpt-3.5-turbo", "claude-3-sonnet", "claude-3-haiku"] + models: + [ + "gpt-4", + "gpt-3.5-turbo", + "claude-3-sonnet", + "claude-3-haiku", + ] actions: onFail: "block" message: "Model not in approved whitelist" @@ -2323,13 +2328,14 @@ paths: checks: - id: "portkey.moderateContent" parameters: - categories: [ - "hate/threatening", - "harassment/threatening", - "self-harm/intent", - "sexual/minors", - "violence/graphic" - ] + categories: + [ + "hate/threatening", + "harassment/threatening", + "self-harm/intent", + "sexual/minors", + "violence/graphic", + ] timeout: 5000 actions: onFail: "block" @@ -2359,13 +2365,14 @@ paths: - id: "portkey.pii" parameters: redact: true - categories: [ - "EMAIL_ADDRESS", - "PHONE_NUMBER", - "SSN", - "CREDIT_CARD", - "NAME" - ] + categories: + [ + "EMAIL_ADDRESS", + "PHONE_NUMBER", + "SSN", + "CREDIT_CARD", + "NAME", + ] timeout: 5000 actions: onFail: "block" @@ -2423,13 +2430,14 @@ paths: checks: - id: "pillar.scanPrompt" parameters: - scanners: [ - "prompt_injection", - "pii", - "secrets", - "toxic_language", - "invisible_characters" - ] + scanners: + [ + "prompt_injection", + "pii", + "secrets", + "toxic_language", + "invisible_characters", + ] timeout: 5000 - id: "pillar.scanResponse" parameters: @@ -2498,13 +2506,14 @@ paths: checks: - id: "mistral.moderateContent" parameters: - categories: [ - "sexual", - "hate_and_discrimination", - "violence_and_threats", - "selfharm", - "pii" - ] + categories: + [ + "sexual", + "hate_and_discrimination", + "violence_and_threats", + "selfharm", + "pii", + ] timeout: 5000 actions: onFail: "block" @@ -2570,7 +2579,8 @@ paths: pii_categories: ["email_address", "ssn", "credit_card"] secrets: true secrets_redact: true - secrets_categories: ["aws_secret_key", "openai", "github"] + secrets_categories: + ["aws_secret_key", "openai", "github"] timeout: 5000 actions: onFail: "block" @@ -2605,30 +2615,30 @@ paths: message: "Prisma AIRS blocked request" responses: - '200': + "200": description: Guardrail created successfully content: application/json: schema: - $ref: '#/components/schemas/CreateGuardrailResponse' - '400': + $ref: "#/components/schemas/CreateGuardrailResponse" + "400": description: Bad request - validation failed content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden - insufficient permissions or guardrail not allowed content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" get: summary: List guardrails @@ -2665,24 +2675,24 @@ paths: minimum: 0 default: 0 responses: - '200': + "200": description: List of guardrails retrieved successfully content: application/json: schema: - $ref: '#/components/schemas/ListGuardrailsResponse' - '400': + $ref: "#/components/schemas/ListGuardrailsResponse" + "400": description: Bad request - invalid parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden - insufficient permissions content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" /guardrails/{guardrailId}: get: @@ -2706,28 +2716,28 @@ paths: summary: Using slug value: "guard_abc123" responses: - '200': + "200": description: Guardrail details retrieved successfully content: application/json: schema: - $ref: '#/components/schemas/GuardrailDetails' - '403': + $ref: "#/components/schemas/GuardrailDetails" + "403": description: Forbidden - guardrail not found or insufficient permissions content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" put: summary: Update a guardrail - description: Updates an existing guardrail's name, checks, or actions + description: Updates an existing guardrail"s name, checks, or actions operationId: updateGuardrail tags: - Guardrails @@ -2743,26 +2753,26 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateGuardrailRequest' + $ref: "#/components/schemas/UpdateGuardrailRequest" responses: - '200': + "200": description: Guardrail updated successfully content: application/json: schema: - $ref: '#/components/schemas/UpdateGuardrailResponse' - '400': + $ref: "#/components/schemas/UpdateGuardrailResponse" + "400": description: Bad request - validation failed content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden - guardrail not found or insufficient permissions content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" delete: summary: Delete a guardrail @@ -2778,20 +2788,20 @@ paths: schema: type: string responses: - '200': + "200": description: Guardrail deleted successfully - '403': + "403": description: Forbidden - guardrail not found or insufficient permissions content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" /images/generations: servers: *DataPlaneServers @@ -2834,12 +2844,12 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d '{ + -d "{ "model": "dall-e-3", "prompt": "A cute baby sea otter", "n": 1, "size": "1024x1024" - }' + }" - lang: python label: Default source: | @@ -2859,11 +2869,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -2879,12 +2889,12 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d '{ + -d "{ "model": "dall-e-3", "prompt": "A cute baby sea otter", "n": 1, "size": "1024x1024" - }' + }" - lang: python label: Self-Hosted source: | @@ -2907,12 +2917,12 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const portkey = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY', - baseURL: 'SELF_HOSTED_GATEWAY_URL' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY", + baseURL: "SELF_HOSTED_GATEWAY_URL" }); const image = await portkey.images.generate({ @@ -2990,11 +3000,11 @@ paths: label: Default source: | import fs from "fs"; - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -3014,13 +3024,13 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d '{ + -d "{ "image": "@otter.png", "mask": "@mask.png", "prompt": "A cute baby sea otter wearing a beret", "n": 2, "size": "1024x1024" - }' + }" - lang: python label: Self-Hosted source: | @@ -3045,12 +3055,12 @@ paths: label: Self-Hosted source: | import fs from "fs"; - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const portkey = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY', - baseURL: 'SELF_HOSTED_GATEWAY_URL' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY", + baseURL: "SELF_HOSTED_GATEWAY_URL" }); async function main() { @@ -3126,11 +3136,11 @@ paths: label: Default source: | import fs from "fs"; - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -3148,11 +3158,11 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d '{ + -d "{ "image": "@otter.png", "n": 2, "size": "1024x1024" - }' + }" - lang: python label: Self-Hosted source: | @@ -3175,12 +3185,12 @@ paths: label: Self-Hosted source: | import fs from "fs"; - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const portkey = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY', - baseURL: 'SELF_HOSTED_GATEWAY_URL' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY", + baseURL: "SELF_HOSTED_GATEWAY_URL" }); async function main() { @@ -3233,11 +3243,11 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "input": "The food was delicious and the waiter...", "model": "text-embedding-ada-002", "encoding_format": "float" - }' + }" - lang: python label: Default source: | @@ -3256,11 +3266,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -3281,11 +3291,11 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d '{ + -d "{ "input": "The food was delicious and the waiter...", "model": "text-embedding-ada-002", "encoding_format": "float" - }' + }" - lang: python label: Self-Hosted source: | @@ -3308,12 +3318,12 @@ paths: label: Self-Hosted source: | import fs from "fs"; - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const portkey = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY', - baseURL: 'SELF_HOSTED_GATEWAY_URL' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY", + baseURL: "SELF_HOSTED_GATEWAY_URL" }); async function main() { @@ -3379,7 +3389,7 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "model": "rerank-v3.5", "query": "What is the capital of France?", "documents": [ @@ -3388,7 +3398,7 @@ paths: "Madrid is the capital of Spain." ], "top_n": 2 - }' + }" - lang: python label: Default source: | @@ -3415,21 +3425,21 @@ paths: - lang: javascript label: Default source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { - const response = await client.post('/rerank', { - model: 'rerank-v3.5', - query: 'What is the capital of France?', + const response = await client.post("/rerank", { + model: "rerank-v3.5", + query: "What is the capital of France?", documents: [ - 'Paris is the capital of France.', - 'Berlin is the capital of Germany.', - 'Madrid is the capital of Spain.' + "Paris is the capital of France.", + "Berlin is the capital of Germany.", + "Madrid is the capital of Spain." ], top_n: 2 }); @@ -3445,7 +3455,7 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d '{ + -d "{ "model": "rerank-v3.5", "query": "What is the capital of France?", "documents": [ @@ -3454,7 +3464,7 @@ paths: "Madrid is the capital of Spain." ], "top_n": 2 - }' + }" - lang: python label: Self-Hosted source: | @@ -3482,22 +3492,22 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY', - baseURL: 'SELF_HOSTED_GATEWAY_URL' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY", + baseURL: "SELF_HOSTED_GATEWAY_URL" }); async function main() { - const response = await client.post('/rerank', { - model: 'rerank-v3.5', - query: 'What is the capital of France?', + const response = await client.post("/rerank", { + model: "rerank-v3.5", + query: "What is the capital of France?", documents: [ - 'Paris is the capital of France.', - 'Berlin is the capital of Germany.', - 'Madrid is the capital of Spain.' + "Paris is the capital of France.", + "Berlin is the capital of Germany.", + "Madrid is the capital of Spain." ], top_n: 2 }); @@ -3555,11 +3565,11 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "model": "tts-1", "input": "The quick brown fox jumped over the lazy dog.", "voice": "alloy" - }' \ + }" \ --output speech.mp3 - lang: python label: Default @@ -3584,11 +3594,11 @@ paths: source: | import fs from "fs"; import path from "path"; - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); const speechFile = path.resolve("./speech.mp3"); @@ -3611,11 +3621,11 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d '{ + -d "{ "model": "tts-1", "input": "The quick brown fox jumped over the lazy dog.", "voice": "alloy" - }' \ + }" \ --output speech.mp3 - lang: python label: Self-Hosted @@ -3641,12 +3651,12 @@ paths: source: | import fs from "fs"; import path from "path"; - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY', - baseUrl: 'SELF_HOSTED_GATEWAY_URL' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY", + baseUrl: "SELF_HOSTED_GATEWAY_URL" }); const speechFile = path.resolve("./speech.mp3"); @@ -3728,11 +3738,11 @@ paths: label: Default source: | import fs from "fs"; - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -3751,10 +3761,10 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d '{ + -d "{ "model": "whisper-1", "file": "@/path/to/file/audio.mp3" - }' \ + }" \ --output transcription.json - lang: python label: Self-Hosted @@ -3776,12 +3786,12 @@ paths: label: Self-Hosted source: | import fs from "fs"; - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY', - baseUrl: 'SELF_HOSTED_GATEWAY_URL' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY", + baseUrl: "SELF_HOSTED_GATEWAY_URL" }); const audioFile = fs.createReadStream("speech.mp3"); @@ -3861,11 +3871,11 @@ paths: label: Default source: | import fs from "fs"; - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -3884,10 +3894,10 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d '{ + -d "{ "model": "whisper-1", "file": "@/path/to/file/german.m4a" - }' \ + }" \ --output translation.json - lang: python label: Self-Hosted @@ -3909,12 +3919,12 @@ paths: label: Self-Hosted source: | import fs from "fs"; - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY', - baseUrl: 'SELF_HOSTED_GATEWAY_URL' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY", + baseUrl: "SELF_HOSTED_GATEWAY_URL" }); const audioFile = fs.createReadStream("speech.mp3"); @@ -3982,11 +3992,11 @@ paths: client.files.list() - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -4056,11 +4066,11 @@ paths: - lang: javascript source: | import fs from "fs"; - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -4128,11 +4138,11 @@ paths: client.files.delete("file-abc123") - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -4194,11 +4204,11 @@ paths: client.files.retrieve("file-abc123") - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -4262,11 +4272,11 @@ paths: content = client.files.content("file-abc123") - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -4324,10 +4334,10 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d '{ + -d "{ "training_file": "file-BK7bzQj3FfZFXr7DbL6xJwfo", "model": "gpt-3.5-turbo" - }' + }" - lang: python label: Default source: | @@ -4345,11 +4355,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -4368,10 +4378,10 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d '{ + -d "{ "training_file": "file-BK7bzQj3FfZFXr7DbL6xJwfo", "model": "gpt-3.5-turbo" - }' + }" - lang: python label: Self-hosted source: | @@ -4390,12 +4400,12 @@ paths: - lang: javascript label: Self-hosted source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - baseUrl: 'SELF_HOSTED_GATEWAY_URL', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + baseUrl: "SELF_HOSTED_GATEWAY_URL", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -4413,7 +4423,7 @@ paths: tags: - Fine-tuning summary: | - List your organization's fine-tuning jobs + List your organization"s fine-tuning jobs parameters: - name: after in: query @@ -4470,11 +4480,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -4507,12 +4517,12 @@ paths: - lang: javascript label: Self-hosted source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - baseUrl: 'SELF_HOSTED_GATEWAY_URL', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + baseUrl: "SELF_HOSTED_GATEWAY_URL", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -4586,11 +4596,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -4621,12 +4631,12 @@ paths: - lang: javascript label: Self-hosted source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - baseUrl: 'SELF_HOSTED_GATEWAY_URL', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + baseUrl: "SELF_HOSTED_GATEWAY_URL", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -4712,11 +4722,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -4752,12 +4762,12 @@ paths: - lang: javascript label: Self-hosted source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - baseUrl: 'SELF_HOSTED_GATEWAY_URL', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + baseUrl: "SELF_HOSTED_GATEWAY_URL", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -4829,11 +4839,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -4863,12 +4873,12 @@ paths: - lang: javascript label: Self-hosted source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - baseUrl: 'SELF_HOSTED_GATEWAY_URL', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + baseUrl: "SELF_HOSTED_GATEWAY_URL", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -4957,11 +4967,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -4986,12 +4996,12 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY', - baseUrl: 'SELF_HOSTED_GATEWAY_URL' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY", + baseUrl: "SELF_HOSTED_GATEWAY_URL" }); async function main() { @@ -5014,7 +5024,7 @@ paths: - in: query name: ai_service required: false - description: Filter models by the AI service (e.g., 'openai', 'anthropic'). + description: Filter models by the AI service (e.g., "openai", "anthropic"). schema: type: string - in: query @@ -5052,12 +5062,12 @@ paths: enum: [asc, desc] default: asc responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ListModelsResponse' + $ref: "#/components/schemas/ListModelsResponse" example: object: "list" total: 500 @@ -5073,13 +5083,13 @@ paths: label: Default source: | # Example of sending a query parameter in the URL - curl 'https://api.portkey.ai/v1/models?provider=openai' \ + curl "https://api.portkey.ai/v1/models?provider=openai" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" - lang: curl label: Self-Hosted source: | # Example of sending a query parameter in the URL - curl 'https://YOUR_SELF_HOSTED_URL/models?provider=openai' \ + curl "https://YOUR_SELF_HOSTED_URL/models?provider=openai" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" - lang: python label: Default @@ -5113,10 +5123,10 @@ paths: - lang: javascript label: Default source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY' + apiKey: "PORTKEY_API_KEY" }); async function main() { @@ -5130,11 +5140,11 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - baseUrl: 'https://YOUR_SELF_HOSTED_URL' + apiKey: "PORTKEY_API_KEY", + baseUrl: "https://YOUR_SELF_HOSTED_URL" }); async function main() { @@ -5144,8 +5154,7 @@ paths: }); console.log(list); } - main(); - + main(); /models/{model}: get: @@ -5201,11 +5210,11 @@ paths: client.models.retrieve("VAR_model_id") - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -5269,11 +5278,11 @@ paths: client.models.delete("ft:gpt-3.5-turbo:acemeco:suffix:abc123") - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -5290,7 +5299,7 @@ paths: tags: - Moderations summary: | - Identify potentially harmful content in text and images. **Only** works with [OpenAI's Moderations endpoint](https://platform.openai.com/docs/guides/moderation) currently. + Identify potentially harmful content in text and images. **Only** works with [OpenAI"s Moderations endpoint](https://platform.openai.com/docs/guides/moderation) currently. requestBody: required: true content: @@ -5326,9 +5335,9 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d '{ + -d "{ "input": "I want to kill them." - }' + }" - lang: python label: Default source: | @@ -5344,11 +5353,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -5364,9 +5373,9 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d '{ + -d "{ "input": "I want to kill them." - }' + }" - lang: python label: Self-Hosted source: | @@ -5383,12 +5392,12 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY', - baseURL: 'SELF_HOSTED_GATEWAY_URL' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY", + baseURL: "SELF_HOSTED_GATEWAY_URL" }); async function main() { @@ -5479,11 +5488,11 @@ paths: print(my_assistants.data) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -5591,12 +5600,12 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "OpenAI-Beta: assistants=v2" \ - -d '{ + -d "{ "instructions": "You are a personal math tutor. When asked a question, write and run Python code to answer the question.", "name": "Math Tutor", "tools": [{"type": "code_interpreter"}], "model": "gpt-4-turbo" - }' + }" - lang: python source: | from portkey_ai import Portkey @@ -5615,11 +5624,11 @@ paths: print(my_assistant) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -5710,11 +5719,11 @@ paths: print(my_assistant) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -5792,11 +5801,11 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "OpenAI-Beta: assistants=v2" \ - -d '{ + -d "{ "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.", "tools": [{"type": "file_search"}], "model": "gpt-4-turbo" - }' + }" - lang: python source: | from portkey_ai import Portkey @@ -5817,11 +5826,11 @@ paths: print(my_updated_assistant) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -5919,11 +5928,11 @@ paths: print(response) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -6122,7 +6131,7 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "OpenAI-Beta: assistants=v2" \ - -d '{ + -d "{ "messages": [{ "role": "user", "content": "Hello, what is AI?" @@ -6130,7 +6139,7 @@ paths: "role": "user", "content": "How does AI work? Explain it in simple terms." }] - }' + }" - lang: python source: | from portkey_ai import Portkey @@ -6156,11 +6165,11 @@ paths: print(message_thread) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -6246,11 +6255,11 @@ paths: print(my_thread) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -6321,12 +6330,12 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "OpenAI-Beta: assistants=v2" \ - -d '{ + -d "{ "metadata": { "modified": "true", "user": "abc123" } - }' + }" - lang: python source: | from portkey_ai import Portkey @@ -6346,11 +6355,11 @@ paths: print(my_updated_thread) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -6431,11 +6440,11 @@ paths: print(response) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -6537,11 +6546,11 @@ paths: print(thread_messages.data) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -6649,10 +6658,10 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "OpenAI-Beta: assistants=v2" \ - -d '{ + -d "{ "role": "user", "content": "How does AI work? Explain it in simple terms." - }' + }" - lang: python source: | from portkey_ai import Portkey @@ -6670,11 +6679,11 @@ paths: print(thread_message) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -6774,11 +6783,11 @@ paths: print(message) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -6865,12 +6874,12 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "OpenAI-Beta: assistants=v2" \ - -d '{ + -d "{ "metadata": { "modified": "true", "user": "abc123" } - }' + }" - lang: python source: | from portkey_ai import Portkey @@ -6891,11 +6900,11 @@ paths: print(message) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -6908,7 +6917,7 @@ paths: user: "abc123", }, } - }' + }" response: | { "id": "msg_abc123", @@ -6996,11 +7005,11 @@ paths: print(deleted_message) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -7060,14 +7069,14 @@ paths: -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ -H "OpenAI-Beta: assistants=v2" \ - -d '{ + -d "{ "assistant_id": "asst_abc123", "thread": { "messages": [ {"role": "user", "content": "Explain deep learning to a 5 year old."} ] } - }' + }" - lang: python source: | from portkey_ai import Portkey @@ -7089,11 +7098,11 @@ paths: print(run) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -7228,11 +7237,11 @@ paths: print(runs) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -7394,9 +7403,9 @@ paths: -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ -H "OpenAI-Beta: assistants=v2" \ - -d '{ + -d "{ "assistant_id": "asst_abc123" - }' + }" - lang: python source: | from portkey_ai import Portkey @@ -7414,11 +7423,11 @@ paths: print(run) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -7533,11 +7542,11 @@ paths: print(run) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -7643,11 +7652,11 @@ paths: -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ -H "OpenAI-Beta: assistants=v2" \ - -d '{ + -d "{ "metadata": { "user_id": "user_abc123" } - }' + }" - lang: python source: | from portkey_ai import Portkey @@ -7666,11 +7675,11 @@ paths: print(run) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -7746,7 +7755,7 @@ paths: tags: - Assistants summary: | - When a run has the `status: "requires_action"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request. + When a run has the `status: "requires_action"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they"re all completed. All outputs must be submitted in a single request. parameters: - in: path name: thread_id @@ -7795,14 +7804,14 @@ paths: -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ -H "OpenAI-Beta: assistants=v2" \ - -d '{ + -d "{ "tool_outputs": [ { "tool_call_id": "call_001", "output": "70 degrees and sunny." } ] - }' + }" - lang: python source: | from portkey_ai import Portkey @@ -7826,11 +7835,11 @@ paths: print(run) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -7971,11 +7980,11 @@ paths: print(run) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -8113,11 +8122,11 @@ paths: print(run_steps) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -8238,11 +8247,11 @@ paths: print(run_step) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -8356,11 +8365,11 @@ paths: print(vector_stores) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -8446,9 +8455,9 @@ paths: -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ -H "OpenAI-Beta: assistants=v2" - -d '{ + -d "{ "name": "Support FAQ" - }' + }" - lang: python source: | from portkey_ai import Portkey @@ -8464,11 +8473,11 @@ paths: print(vector_store) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -8552,11 +8561,11 @@ paths: print(vector_store) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -8620,9 +8629,9 @@ paths: -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ -H "OpenAI-Beta: assistants=v2" - -d '{ + -d "{ "name": "Support FAQ" - }' + }" - lang: python source: | from portkey_ai import Portkey @@ -8639,11 +8648,11 @@ paths: print(vector_store) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -8730,11 +8739,11 @@ paths: print(deleted_vector_store) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -8839,11 +8848,11 @@ paths: print(vector_store_files) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -8924,9 +8933,9 @@ paths: -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ -H "OpenAI-Beta: assistants=v2" \ - -d '{ + -d "{ "file_id": "file-abc123" - }' + }" - lang: python source: | from portkey_ai import Portkey @@ -8943,11 +8952,11 @@ paths: print(vector_store_file) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -9038,11 +9047,11 @@ paths: print(vector_store_file) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -9127,11 +9136,11 @@ paths: print(deleted_vector_store_file) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -9200,9 +9209,9 @@ paths: -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json \ -H "OpenAI-Beta: assistants=v2" \ - -d '{ + -d "{ "file_ids": ["file-abc123", "file-abc456"] - }' + }" - lang: python source: | from portkey_ai import Portkey @@ -9219,11 +9228,11 @@ paths: print(vector_store_file_batch) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -9319,11 +9328,11 @@ paths: print(vector_store_file_batch) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -9416,11 +9425,11 @@ paths: print(deleted_vector_store_file_batch) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -9542,11 +9551,11 @@ paths: print(vector_store_files) - lang: javascript source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -9626,11 +9635,11 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "input_file_id": "file-abc123", "endpoint": "/v1/chat/completions", "completion_window": "24h" - }' + }" - lang: python label: Default source: | @@ -9649,11 +9658,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -9674,11 +9683,11 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "input_file_id": "file-abc123", "endpoint": "/v1/chat/completions", "completion_window": "24h" - }' + }" - lang: python label: Self-Hosted source: | @@ -9698,12 +9707,12 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - baseUrl: 'SELF_HOSTED_GATEWAY_URL', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + baseUrl: "SELF_HOSTED_GATEWAY_URL", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -9722,7 +9731,7 @@ paths: operationId: listBatches tags: - Batch - summary: List your organization's batches. + summary: List your organization"s batches. parameters: - in: query name: after @@ -9780,11 +9789,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -9818,12 +9827,12 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - baseUrl: 'SELF_HOSTED_GATEWAY_URL', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + baseUrl: "SELF_HOSTED_GATEWAY_URL", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -9859,7 +9868,6 @@ paths: type: string format: binary - security: - Portkey-Key: [] Virtual-Key: [] @@ -9895,11 +9903,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -9931,12 +9939,12 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - baseUrl: 'SELF_HOSTED_GATEWAY_URL', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + baseUrl: "SELF_HOSTED_GATEWAY_URL", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -10004,11 +10012,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -10040,12 +10048,12 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - baseUrl: 'SELF_HOSTED_GATEWAY_URL', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + baseUrl: "SELF_HOSTED_GATEWAY_URL", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -10072,7 +10080,7 @@ paths: description: The ID of the batch to cancel. responses: "200": - description: Batch is cancelling. Returns the cancelling batch's details. + description: Batch is cancelling. Returns the cancelling batch"s details. content: application/json: schema: @@ -10114,11 +10122,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -10151,12 +10159,12 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from 'portkey-ai'; + import Portkey from "portkey-ai"; const client = new Portkey({ - apiKey: 'PORTKEY_API_KEY', - baseUrl: 'SELF_HOSTED_GATEWAY_URL', - virtualKey: 'PROVIDER_VIRTUAL_KEY' + apiKey: "PORTKEY_API_KEY", + baseUrl: "SELF_HOSTED_GATEWAY_URL", + virtualKey: "PROVIDER_VIRTUAL_KEY" }); async function main() { @@ -10483,8 +10491,7 @@ paths: type: object examples: example-1: - value: - {} + value: {} x-code-samples: - lang: python label: Default @@ -10635,7 +10642,7 @@ paths: # Retrieve the configuration config = portkey.configs.retrieve( - slug='CONFIG_SLUG' + slug="CONFIG_SLUG" ) print(config) @@ -10649,7 +10656,7 @@ paths: }) const config=await portkey.configs.retrieve({ - slug:'CONFIG_SLUG' + slug:"CONFIG_SLUG" }) console.log(config); @@ -10666,7 +10673,7 @@ paths: # Retrieve the configuration config = portkey.configs.retrieve( - slug='CONFIG_SLUG' + slug="CONFIG_SLUG" ) print(config) @@ -10681,7 +10688,7 @@ paths: }) const config=await portkey.configs.retrieve({ - slug:'CONFIG_SLUG' + slug:"CONFIG_SLUG" }) console.log(config); @@ -10922,33 +10929,34 @@ paths: { "object": "list", "total": 1, - "data": [ - { - "id": "daab995b-8d3b-42c5-a490-47217fbf4e0e", - "name": "PII Redaction Guardrail", - "workspace_id": "8610029e-692a-4df6-9052-3fa3eff69911", - "slug": "pc-pii-re-7f1051", - "organisation_id": "472d2804-d054-4226-b4ae-9d4e2e61e69e", - "is_default": 0, - "status": "active", - "owner_id": "c4c7996d-be62-429d-b787-5d48fe94da86", - "updated_by": "c4c7996d-be62-429d-b787-5d48fe94da86", - "created_at": "2025-10-17T19:11:47.000Z", - "last_updated_at": "2025-10-17T19:11:47.000Z", - "config": "{\"input_guardrails\":[\"pg-patron-1d0224\"]}", - "format": "json", - "type": "ORG_CONFIG", - "version_id": "8c1a4fbf-26d9-49df-82ca-ab772ba397d2", - "object": "config" - } - ] + "data": + [ + { + "id": "daab995b-8d3b-42c5-a490-47217fbf4e0e", + "name": "PII Redaction Guardrail", + "workspace_id": "8610029e-692a-4df6-9052-3fa3eff69911", + "slug": "pc-pii-re-7f1051", + "organisation_id": "472d2804-d054-4226-b4ae-9d4e2e61e69e", + "is_default": 0, + "status": "active", + "owner_id": "c4c7996d-be62-429d-b787-5d48fe94da86", + "updated_by": "c4c7996d-be62-429d-b787-5d48fe94da86", + "created_at": "2025-10-17T19:11:47.000Z", + "last_updated_at": "2025-10-17T19:11:47.000Z", + "config": "{"input_guardrails":["pg-patron-1d0224"]}", + "format": "json", + "type": "ORG_CONFIG", + "version_id": "8c1a4fbf-26d9-49df-82ca-ab772ba397d2", + "object": "config", + }, + ], } x-code-samples: - lang: curl label: Default source: | - curl --location 'https://api.portkey.ai/v1/configs/pc-pii-re-7f1051/versions' \ - --header 'x-portkey-api-key: PORTKEY_API_KEY' + curl --location "https://api.portkey.ai/v1/configs/pc-pii-re-7f1051/versions" \ + --header "x-portkey-api-key: PORTKEY_API_KEY" /feedback: servers: *ControlPlaneServers @@ -11006,7 +11014,7 @@ paths: curl -X POST https://api.portkey.ai/v1/feedback \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{"trace_id":"REQUEST_TRACE_ID","value":1}' + -d "{"trace_id":"REQUEST_TRACE_ID","value":1}" - lang: python label: Self-Hosted source: | @@ -11049,7 +11057,7 @@ paths: curl -X POST SELF_HOSTED_CONTROL_PLANE_URL/feedback \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{"trace_id":"REQUEST_TRACE_ID","value":1}' + -d "{"trace_id":"REQUEST_TRACE_ID","value":1}" /feedback/{id}: servers: *ControlPlaneServers @@ -11115,7 +11123,7 @@ paths: curl -X POST https://api.portkey.ai/v1/feedback/{id} \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{"value":1}' + -d "{"value":1}" - lang: python label: Self-Hosted source: | @@ -11158,7 +11166,7 @@ paths: curl -X POST SELF_HOSTED_CONTROL_PLANE_URL/feedback/{id} \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{"value":1}' + -d "{"value":1}" /integrations: servers: *ControlPlaneServers @@ -11189,7 +11197,7 @@ paths: enum: [workspace, organisation, all] default: all description: For type=workspace, the API will only return Workpace-Scoped integrations. For type=organisation, the API will only return Global (organisation level) integrations. For type=all, both types of integrations will be returned. - + responses: "200": description: Successful response @@ -11281,7 +11289,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateIntegrationRequest' + $ref: "#/components/schemas/CreateIntegrationRequest" responses: "200": description: Successful response @@ -11335,11 +11343,11 @@ paths: curl -X POST https://api.portkey.ai/v1/integrations \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name": "openai-production", "ai_provider_id": "openai", "key": "sk-..." - }' + }" - lang: python label: Self-Hosted source: | @@ -11381,11 +11389,11 @@ paths: curl -X POST SELF_HOSTED_CONTROL_PLANE_URL/integrations \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name": "openai-production", "ai_provider_id": "openai", "key": "sk-..." - }' + }" /integrations/{slug}: servers: *ControlPlaneServers @@ -11419,7 +11427,7 @@ paths: # Get a specific virtual key virtual_key = portkey.virtual_keys.retrieve( - slug='VIRTUAL_KEY_SLUG' + slug="VIRTUAL_KEY_SLUG" ) print(virtual_key) @@ -11433,7 +11441,7 @@ paths: }) const vKey=await portkey.virtualKeys.retrieve({ - slug:'VIRTUAL_KEY_SLUG' + slug:"VIRTUAL_KEY_SLUG" }) console.log(vKey); - lang: curl @@ -11459,7 +11467,7 @@ paths: # Get a specific virtual key virtual_key = portkey.virtual_keys.retrieve( - slug='VIRTUAL_KEY_SLUG' + slug="VIRTUAL_KEY_SLUG" ) print(virtual_key) @@ -11474,7 +11482,7 @@ paths: }) const vKey=await portkey.virtualKeys.retrieve({ - slug:'VIRTUAL_KEY_SLUG' + slug:"VIRTUAL_KEY_SLUG" }) console.log(vKey); @@ -11493,7 +11501,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateIntegrationRequest' + $ref: "#/components/schemas/UpdateIntegrationRequest" responses: "200": description: Successful response @@ -11514,7 +11522,7 @@ paths: # Update a specific integration integration = portkey.integrations.update( - slug="INTEGRATION_SLUG', + slug="INTEGRATION_SLUG", name="updated-name", note="hello" ) @@ -11541,20 +11549,20 @@ paths: curl -X PUT "https://api.portkey.ai/v1/integrations/INTEGRATION_SLUG" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name": "updated-name", "note": "hello" - }' + }" - lang: curl label: Self-Hosted source: | curl -X PUT "SELF_HOSTED_CONTROL_PLANE_URL/integrations/INTEGRATION_SLUG" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name": "updated-name", "note": "hello" - }' + }" - lang: python label: Self-Hosted source: | @@ -11568,7 +11576,7 @@ paths: # Update a specific integration integration = portkey.integrations.update( - slug="INTEGRATION_SLUG', + slug="INTEGRATION_SLUG", name="updated-name", note="hello" ) @@ -11585,7 +11593,7 @@ paths: }) const integration = await portkey.integrations.update({ - slug:'INTEGRATION_SLUG', + slug:"INTEGRATION_SLUG", name:"updated-name", note:"hello" }) @@ -11635,7 +11643,7 @@ paths: }) const result=await portkey.integrations.delete({ - slug:'INTEGRATION_SLUG', + slug:"INTEGRATION_SLUG", }) console.log(result); - lang: curl @@ -11691,12 +11699,12 @@ paths: schema: type: string responses: - '200': + "200": description: List of integration models content: application/json: schema: - $ref: '#/components/schemas/IntegrationModelsResponse' + $ref: "#/components/schemas/IntegrationModelsResponse" put: summary: Bulk update integration models @@ -11716,14 +11724,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BulkUpdateModelsRequest' + $ref: "#/components/schemas/BulkUpdateModelsRequest" responses: - '200': + "200": description: Models updated successfully content: application/json: schema: - type: object + type: object delete: summary: Bulk delete integration custom models @@ -11744,12 +11752,12 @@ paths: type: string example: "gpt-4,gpt-3.5-turbo" responses: - '200': + "200": description: Models deleted successfully content: application/json: schema: - type: object + type: object /integrations/{slug}/workspaces: get: @@ -11764,12 +11772,12 @@ paths: schema: type: string responses: - '200': + "200": description: List of workspace access configurations content: application/json: schema: - $ref: '#/components/schemas/IntegrationWorkspacesResponse' + $ref: "#/components/schemas/IntegrationWorkspacesResponse" put: summary: Bulk update workspace access @@ -11789,9 +11797,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BulkUpdateWorkspacesRequest' + $ref: "#/components/schemas/BulkUpdateWorkspacesRequest" responses: - '200': + "200": description: Workspace access updated successfully content: application/json: @@ -11820,7 +11828,7 @@ paths: schema: type: string description: Not required when using workspace API keys. Required when using organisation admin keys - + responses: "200": description: Successful response @@ -12011,11 +12019,11 @@ paths: curl -X POST https://api.portkey.ai/v1/providers \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name": "openai provider", "integration_id": "", "workspace_id": "" - }' + }" - lang: python label: Self-Hosted source: | @@ -12057,12 +12065,12 @@ paths: curl -X POST SELF_HOSTED_CONTROL_PLANE_URL/providers \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name": "openai provider", "integrationId": "", "workspaceId": "" - }' - + }" + /providers/{slug}: servers: *ControlPlaneServers get: @@ -12202,7 +12210,7 @@ paths: nullable: true reset_usage: type: boolean - + responses: "200": description: Successful response @@ -12258,20 +12266,20 @@ paths: curl -X PUT "https://api.portkey.ai/v1/providers/PROVIDER_SLUG?workspace_id=" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name": "updated-name", "note": "updated-note" - }' + }" - lang: curl label: Self-Hosted source: | curl -X PUT "SELF_HOSTED_CONTROL_PLANE_URL/providers/PROVIDER_SLUG?workspace_id=" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name": "updated-name", "note": "updated-note" - }' + }" - lang: python label: Self-Hosted source: | @@ -12406,7 +12414,7 @@ paths: workspace_id: "" }) console.log(result); - + /virtual-keys: servers: *ControlPlaneServers get: @@ -12426,7 +12434,7 @@ paths: type: integer required: true description: Page size, default to 50 - + responses: "200": description: Successful response @@ -12619,7 +12627,7 @@ paths: secret_mappings: type: array items: - $ref: '#/components/schemas/SecretMapping' + $ref: "#/components/schemas/SecretMapping" description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "model_config." (e.g. "model_config.awsSecretAccessKey"). Each target_field must be unique. When "key" is mapped, the key field becomes optional. examples: generic: @@ -12754,11 +12762,11 @@ paths: curl -X POST https://api.portkey.ai/v1/virtual-keys \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name": "openaiVKey", "provider": "openai", "key": "PROVIDER_API_KEY" - }' + }" - lang: python label: Self-Hosted source: | @@ -12800,11 +12808,11 @@ paths: curl -X POST SELF_HOSTED_CONTROL_PLANE_URL/virtual-keys \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name": "openaiVKey", "provider": "openai", "key": "PROVIDER_API_KEY" - }' + }" /virtual-keys/{slug}: servers: *ControlPlaneServers @@ -12856,7 +12864,7 @@ paths: # Get a specific virtual key virtual_key = portkey.virtual_keys.retrieve( - slug='VIRTUAL_KEY_SLUG' + slug="VIRTUAL_KEY_SLUG" ) print(virtual_key) @@ -12870,7 +12878,7 @@ paths: }) const vKey=await portkey.virtualKeys.retrieve({ - slug:'VIRTUAL_KEY_SLUG' + slug:"VIRTUAL_KEY_SLUG" }) console.log(vKey); - lang: curl @@ -12896,7 +12904,7 @@ paths: # Get a specific virtual key virtual_key = portkey.virtual_keys.retrieve( - slug='VIRTUAL_KEY_SLUG' + slug="VIRTUAL_KEY_SLUG" ) print(virtual_key) @@ -12911,7 +12919,7 @@ paths: }) const vKey=await portkey.virtualKeys.retrieve({ - slug:'VIRTUAL_KEY_SLUG' + slug:"VIRTUAL_KEY_SLUG" }) console.log(vKey); @@ -12958,7 +12966,7 @@ paths: secret_mappings: type: array items: - $ref: '#/components/schemas/SecretMapping' + $ref: "#/components/schemas/SecretMapping" description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "model_config." (e.g. "model_config.awsSecretAccessKey"). Each target_field must be unique. responses: "200": @@ -12999,7 +13007,7 @@ paths: # Update a specific virtual key updated_virtual_key = portkey.virtual_keys.update( - slug='VIRTUAL_KEY_SLUG', + slug="VIRTUAL_KEY_SLUG", name="openaiVKey", note="hello", rate_limits=[{"type": "requests", "unit": "rpm", "value": 696}] @@ -13016,7 +13024,7 @@ paths: }) const updatedVKey=await portkey.virtualKeys.update({ - slug:'VIRTUAL_KEY_SLUG', + slug:"VIRTUAL_KEY_SLUG", name:"openaiVKey", note:"hello", rate_limits: [{type: "requests", unit: "rpm", value: 696}] @@ -13028,7 +13036,7 @@ paths: curl -X PUT "https://api.portkey.ai/v1/virtual_keys/VIRTUAL_KEY_SLUG" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name": "openaiVKey", "note": "hello", "rate_limits": [ @@ -13038,14 +13046,14 @@ paths: "value": 696 } ] - }' + }" - lang: curl label: Self-Hosted source: | curl -X PUT "SELF_HOSTED_CONTROL_PLANE_URL/virtual_keys/VIRTUAL_KEY_SLUG" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name": "openaiVKey", "note": "hello", "rate_limits": [ @@ -13055,7 +13063,7 @@ paths: "value": 696 } ] - }' + }" - lang: python label: Self-Hosted source: | @@ -13069,7 +13077,7 @@ paths: # Update a specific virtual key updated_virtual_key = portkey.virtual_keys.update( - slug='VIRTUAL_KEY_SLUG', + slug="VIRTUAL_KEY_SLUG", name="openaiVKey", note="hello", rate_limits=[{"type": "requests", "unit": "rpm", "value": 696}] @@ -13087,7 +13095,7 @@ paths: }) const updatedVkey=await portkey.virtualKeys.update({ - slug:'VIRTUAL_KEY_SLUG', + slug:"VIRTUAL_KEY_SLUG", name:"openaiVKey", note:"hello", rate_limits: [{type: "requests", unit: "rpm", value: 696}] @@ -13143,7 +13151,7 @@ paths: # Delete a specific virtual key result = portkey.virtual_keys.delete( - slug='VIRTUAL_KEY_SLUG' + slug="VIRTUAL_KEY_SLUG" ) print(result) @@ -13157,7 +13165,7 @@ paths: }) const result=await portkey.virtualKeys.delete({ - slug:'VIRTUAL_KEY_SLUG', + slug:"VIRTUAL_KEY_SLUG", }) console.log(result); - lang: curl @@ -13181,7 +13189,7 @@ paths: # Delete a specific virtual key result = portkey.virtual_keys.delete( - slug='VIRTUAL_KEY_SLUG' + slug="VIRTUAL_KEY_SLUG" ) print(result) @@ -13196,7 +13204,7 @@ paths: }) const result=await portkey.virtualKeys.delete({ - slug:'VIRTUAL_KEY_SLUG', + slug:"VIRTUAL_KEY_SLUG", }) console.log(result); @@ -13288,7 +13296,7 @@ paths: curl -X POST https://api.portkey.ai/v1/admin/users/invites -H "x-portkey-api-key: PORTKEY_API_KEY" -H "Content-Type: application/json" - -d '{ + -d "{ "email": "user@example.com", "role": "member", "workspaces": [ @@ -13305,14 +13313,14 @@ paths: "logs.view" ] } - }' + }" - lang: curl label: Self-Hosted source: | curl -X POST SELF_HOSTED_CONTROL_PLANE_URL/admin/users/invites -H "x-portkey-api-key: PORTKEY_API_KEY" -H "Content-Type: application/json" - -d '{ + -d "{ "email": "user@example.com", "role": "member", "workspaces": [ @@ -13329,7 +13337,7 @@ paths: "logs.view" ] } - }' + }" - lang: python label: Self-Hosted source: | @@ -13583,7 +13591,7 @@ paths: # Get a user invite user = portkey.admin.users.invites.retrieve( - invite_id='INVITE_ID' + invite_id="INVITE_ID" ) print(user) @@ -13597,7 +13605,7 @@ paths: }) const user=await portkey.admin.users.invites.retrieve({ - inviteId: 'INVITE_ID', + inviteId: "INVITE_ID", }); console.log(user); - lang: curl @@ -13623,7 +13631,7 @@ paths: # Get a user invite user = portkey.admin.users.invites.retrieve( - invite_id='INVITE_ID' + invite_id="INVITE_ID" ) print(user) @@ -13638,7 +13646,7 @@ paths: }) const user=await portkey.admin.users.invites.retrieve({ - inviteId: 'INVITE_ID', + inviteId: "INVITE_ID", }); console.log(user); delete: @@ -14025,7 +14033,7 @@ paths: # Get a specific user user = portkey.admin.users.retrieve( - user_id='USER_ID' + user_id="USER_ID" ) print(user) @@ -14039,7 +14047,7 @@ paths: apiKey: "PORTKEY_API_KEY", }) const user = await portkey.admin.users.retrieve({ - userId: 'USER_ID', + userId: "USER_ID", }); console.log(user); @@ -14066,7 +14074,7 @@ paths: # Get a specific user user = portkey.admin.users.retrieve( - user_id='USER_ID' + user_id="USER_ID" ) print(user) @@ -14080,7 +14088,7 @@ paths: baseUrl: "SELF_HOSTED_CONTROL_PLANE_URL" }) const user = await portkey.admin.users.retrieve({ - userId: 'USER_ID', + userId: "USER_ID", }); console.log(user); @@ -14121,7 +14129,7 @@ paths: # Delete a user user = portkey.admin.users.delete( - user_id='USER_ID' + user_id="USER_ID" ) print(user) @@ -14135,7 +14143,7 @@ paths: }) const user=await portkey.admin.users.delete({ - userId: 'USER_ID', + userId: "USER_ID", }) console.log(user); @@ -14162,7 +14170,7 @@ paths: # Delete a user user = portkey.admin.users.delete( - user_id='USER_ID' + user_id="USER_ID" ) print(user) @@ -14177,7 +14185,7 @@ paths: }) const user=await portkey.admin.users.delete({ - userId: 'USER_ID', + userId: "USER_ID", }) console.log(user); @@ -14230,7 +14238,7 @@ paths: # Update a user user = portkey.admin.users.update( - user_id='USER_ID', + user_id="USER_ID", role="member" ) @@ -14245,7 +14253,7 @@ paths: }) const user = await portkey.admin.users.update({ - userId: 'USER_ID', + userId: "USER_ID", role: "member" }) @@ -14255,13 +14263,13 @@ paths: source: | curl -X PUT "https://api.portkey.ai/v1/admin/users/USER_ID" -H "x-portkey-api-key: PORTKEY_API_KEY" - -d '{"role":"member"}' + -d "{"role":"member"}" - lang: curl label: Self-Hosted source: | curl -X PUT "SELF_HOSTED_CONTROL_PLANE_URL/admin/users/USER_ID" -H "x-portkey-api-key: PORTKEY_API_KEY" - -d '{"role":"member"}' + -d "{"role":"member"}" - lang: python label: Self-Hosted source: | @@ -14275,7 +14283,7 @@ paths: # Update a user user = portkey.admin.users.update( - user_id='USER_ID', + user_id="USER_ID", role="member" ) @@ -14291,7 +14299,7 @@ paths: }) const user = await portkey.admin.users.update({ - userId: 'USER_ID', + userId: "USER_ID", role: "member" }) @@ -14383,7 +14391,7 @@ paths: workspaceId: "WORKSPACE_SLUG", users:[{ id:"USER_ID", - role:'member' + role:"member" }] }) console.log(user); @@ -14392,13 +14400,13 @@ paths: source: | curl -X POST "https://api.portkey.ai/v1/admin/workspaces/{workspaceId}/users" -H "x-portkey-api-key: PORTKEY_API_KEY" - -d '{"users":[{"id":"USER_ID","role":"member"}]}' + -d "{"users":[{"id":"USER_ID","role":"member"}]}" - lang: curl label: Self-Hosted source: | curl -X POST "SELF_HOSTED_CONTROL_PLANE_URL/admin/workspaces/{workspaceId}/users" -H "x-portkey-api-key: PORTKEY_API_KEY" - -d '{"users":[{"id":"USER_ID","role":"member"}]}' + -d "{"users":[{"id":"USER_ID","role":"member"}]}" - lang: python label: Self-Hosted source: | @@ -14436,7 +14444,7 @@ paths: workspaceId: "WORKSPACE_SLUG", users: [{ id: "USER_ID", - role: 'member' + role: "member" }] }) @@ -14510,7 +14518,7 @@ paths: }) const user=await portkey.admin.workspaces.users.list({ - workspaceId: 'WORKSPACE_SLUG', + workspaceId: "WORKSPACE_SLUG", }) console.log(user); - lang: curl @@ -14550,7 +14558,7 @@ paths: }) const user=await portkey.admin.workspaces.users.list({ - workspaceId: 'WORKSPACE_SLUG', + workspaceId: "WORKSPACE_SLUG", }) console.log(user); @@ -14611,9 +14619,9 @@ paths: # Update user in workspace updated_user = portkey.admin.workspaces.users.update( - workspace_id='WORKSPACE_SLUG', + workspace_id="WORKSPACE_SLUG", user_id="USER_ID", - role='member' + role="member" ) print(updated_user) @@ -14627,9 +14635,9 @@ paths: }) const user=await portkey.admin.workspaces.users.update({ - workspaceId: 'WORKSPACE_SLUG', + workspaceId: "WORKSPACE_SLUG", userId:"USER_ID", - role:'member' + role:"member" }) console.log(user); - lang: curl @@ -14637,13 +14645,13 @@ paths: source: | curl -X PUT "https://api.portkey.ai/v1/admin/workspaces/{workspaceId}/users/{userId}" -H "x-portkey-api-key: PORTKEY_API_KEY" - -d '{"role":"member"}' + -d "{"role":"member"}" - lang: curl label: Self-Hosted source: | curl -X PUT "SELF_HOSTED_CONTROL_PLANE_URL/admin/workspaces/{workspaceId}/users/{userId}" -H "x-portkey-api-key: PORTKEY_API_KEY" - -d '{"role":"member"}' + -d "{"role":"member"}" - lang: python label: Self-Hosted source: | @@ -14657,9 +14665,9 @@ paths: # Update user in workspace updated_user = portkey.admin.workspaces.users.update( - workspace_id='WORKSPACE_SLUG', + workspace_id="WORKSPACE_SLUG", user_id="USER_ID", - role='member' + role="member" ) print(updated_user) @@ -14674,9 +14682,9 @@ paths: }) const user=await portkey.admin.workspaces.users.update({ - workspaceId: 'WORKSPACE_SLUG', + workspaceId: "WORKSPACE_SLUG", userId:"USER_ID", - role:'member' + role:"member" }) console.log(user); @@ -14721,8 +14729,8 @@ paths: # Delete user from workspace result = portkey.admin.workspaces.users.delete( - workspace_id='WORKSPACE_SLUG', - user_id='USER_ID' + workspace_id="WORKSPACE_SLUG", + user_id="USER_ID" ) # Print the result (if any) @@ -14737,8 +14745,8 @@ paths: }) user = await portkey.admin.workspaces.users.delete({ - workspaceId: 'WORKSPACE_SLUG', - userId:'USER_ID' + workspaceId: "WORKSPACE_SLUG", + userId:"USER_ID" }) console.log(user) @@ -14765,8 +14773,8 @@ paths: # Delete user from workspace result = portkey.admin.workspaces.users.delete( - workspace_id='WORKSPACE_SLUG', - user_id='USER_ID' + workspace_id="WORKSPACE_SLUG", + user_id="USER_ID" ) # Print the result (if any) @@ -14782,8 +14790,8 @@ paths: }) user = await portkey.admin.workspaces.users.delete({ - workspaceId: 'WORKSPACE_SLUG', - userId:'USER_ID' + workspaceId: "WORKSPACE_SLUG", + userId:"USER_ID" }) console.log(user) @@ -14875,8 +14883,8 @@ paths: }) const user=await portkey.admin.workspaces.users.retrieve({ - workspaceId: 'WORKSPACE_SLUG', - userId:'USER_ID', + workspaceId: "WORKSPACE_SLUG", + userId:"USER_ID", }) console.log(user); - lang: curl @@ -14918,8 +14926,8 @@ paths: }) const user=await portkey.admin.workspaces.users.retrieve({ - workspaceId: 'WORKSPACE_SLUG', - userId:'USER_ID', + workspaceId: "WORKSPACE_SLUG", + userId:"USER_ID", }) console.log(user); @@ -14991,7 +14999,7 @@ paths: # Add a workspace workspace = portkey.admin.workspaces.create( - name='WORKSPACE_NAME_0909', + name="WORKSPACE_NAME_0909", description="WORKSPACE_DESCRIPTION", defaults={ "metadata": { @@ -15012,7 +15020,7 @@ paths: }) const workspace=await portkey.admin.workspaces.create({ - name: 'WORKSPACE_NAME_0909', + name: "WORKSPACE_NAME_0909", description: "WORKSPACE_DESCRIPTION", defaults: { metadata: { @@ -15028,7 +15036,7 @@ paths: curl -X POST https://api.portkey.ai/v1/admin/workspaces \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name": "WORKSPACE_NAME_0909", "description": "WORKSPACE_DESCRIPTION", "defaults": { @@ -15037,14 +15045,14 @@ paths: "foo": "bar" } } - }' + }" - lang: curl label: Self-Hosted source: | curl -X POST SELF_HOSTED_CONTROL_PLANE_URL/admin/workspaces \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name": "WORKSPACE_NAME_0909", "description": "WORKSPACE_DESCRIPTION", "defaults": { @@ -15053,7 +15061,7 @@ paths: "foo": "bar" } } - }' + }" - lang: python label: Self-Hosted source: | @@ -15067,7 +15075,7 @@ paths: # Add a workspace workspace = portkey.admin.workspaces.create( - name='WORKSPACE_NAME_0909', + name="WORKSPACE_NAME_0909", description="WORKSPACE_DESCRIPTION", defaults={ "metadata": { @@ -15089,7 +15097,7 @@ paths: }) const workspace = await portkey.admin.workspaces.create({ - name: 'WORKSPACE_NAME_0909', + name: "WORKSPACE_NAME_0909", description: "WORKSPACE_DESCRIPTION", defaults: { metadata: { @@ -15251,11 +15259,11 @@ paths: type: string input_guardrails: type: array - items: + items: type: string output_guardrails: type: array - items: + items: type: string usage_limits: type: array @@ -15265,7 +15273,7 @@ paths: type: array items: $ref: "#/components/schemas/RateLimits" - + example: name: My Workspace description: My Description @@ -15304,9 +15312,9 @@ paths: # Update workspace workspace = portkey.admin.workspaces.update( - workspace_id='WORKSPACE_ID', - name='WORKSPACE 0909', - description='This is a test description', + workspace_id="WORKSPACE_ID", + name="WORKSPACE 0909", + description="This is a test description", defaults={ "x": "y" } @@ -15323,9 +15331,9 @@ paths: }) const workspace=await portkey.admin.workspaces.update({ - workspaceId: 'WORKSPACE_ID', - name: 'WORKSPACE 0909', - description: 'This is a test description', + workspaceId: "WORKSPACE_ID", + name: "WORKSPACE 0909", + description: "This is a test description", defaults: { x: "y" } @@ -15337,14 +15345,14 @@ paths: curl -X PUT "https://api.portkey.ai/v1/admin/workspaces/{workspaceId}" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{"name":"WORKSPACE 0909","description":"This is a test description","defaults":{"x":"y"}}' + -d "{"name":"WORKSPACE 0909","description":"This is a test description","defaults":{"x":"y"}}" - lang: curl label: Self-Hosted source: | curl -X PUT "SELF_HOSTED_CONTROL_PLANE_URL/admin/workspaces/{workspaceId}" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{"name":"WORKSPACE 0909","description":"This is a test description","defaults":{"x":"y"}}' + -d "{"name":"WORKSPACE 0909","description":"This is a test description","defaults":{"x":"y"}}" - lang: python label: Self-Hosted source: | @@ -15358,9 +15366,9 @@ paths: # Update workspace workspace = portkey.admin.workspaces.update( - workspace_id='WORKSPACE_ID', - name='WORKSPACE 0909', - description='This is a test description', + workspace_id="WORKSPACE_ID", + name="WORKSPACE 0909", + description="This is a test description", defaults={ x: "y" } @@ -15378,9 +15386,9 @@ paths: }) const workspace=await portkey.admin.workspaces.update({ - workspaceId: 'WORKSPACE_ID', - name: 'WORKSPACE 0909', - description: 'This is a test description', + workspaceId: "WORKSPACE_ID", + name: "WORKSPACE 0909", + description: "This is a test description", defaults: { x: "y" } @@ -15422,7 +15430,7 @@ paths: # Get workspace details workspace = portkey.admin.workspaces.retrieve( - workspace_id='WORKSPACE_SLUG' + workspace_id="WORKSPACE_SLUG" ) print(workspace) @@ -15436,7 +15444,7 @@ paths: }) const workspace=await portkey.admin.workspaces.retrieve({ - workspaceId: 'WORKSPACE_SLUG', + workspaceId: "WORKSPACE_SLUG", }) console.log(workspace); - lang: curl @@ -15462,7 +15470,7 @@ paths: # Get workspace details workspace = portkey.admin.workspaces.retrieve( - workspace_id='WORKSPACE_SLUG' + workspace_id="WORKSPACE_SLUG" ) print(workspace) @@ -15477,7 +15485,7 @@ paths: }) const workspace=await portkey.admin.workspaces.retrieve({ - workspaceId: 'WORKSPACE_SLUG', + workspaceId: "WORKSPACE_SLUG", }) console.log(workspace); @@ -15507,7 +15515,7 @@ paths: # Delete workspace result = portkey.admin.workspaces.delete( - workspace_id='WORKSPACE_SLUG' + workspace_id="WORKSPACE_SLUG" ) print(result) @@ -15521,7 +15529,7 @@ paths: }) const workspace=await portkey.admin.workspaces.delete({ - workspaceId: 'WORKSPACE_SLUG', + workspaceId: "WORKSPACE_SLUG", }) console.log(workspace); - lang: curl @@ -15547,7 +15555,7 @@ paths: # Delete workspace result = portkey.admin.workspaces.delete( - workspace_id='WORKSPACE_SLUG' + workspace_id="WORKSPACE_SLUG" ) print(result) @@ -15562,7 +15570,7 @@ paths: }) const workspace=await portkey.admin.workspaces.delete({ - workspaceId: 'WORKSPACE_SLUG', + workspaceId: "WORKSPACE_SLUG", }) console.log(workspace); @@ -16255,7 +16263,7 @@ paths: curl -X POST "https://api.portkey.ai/v1/logs" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "request": { "url": "https://api.someprovider.com/model/generate", "method": "POST", @@ -16272,14 +16280,14 @@ paths: "user_id": "123", "user_name": "John Doe" } - }' + }" - lang: curl label: Self-Hosted source: | curl -X POST "SELF_HOSTED_GATEWAY_URL/logs" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "request": { "url": "https://api.someprovider.com/model/generate", "method": "POST", @@ -16296,7 +16304,7 @@ paths: "user_id": "123", "user_name": "John Doe" } - }' + }" - lang: python label: Self-Hosted source: | @@ -16456,7 +16464,7 @@ paths: ) res = portkey.logs.exports.retrieve( - export_id='EXPORT_ID' + export_id="EXPORT_ID" ) print(res) @@ -16472,7 +16480,7 @@ paths: async function main() { const res= await portkey.logs.exports.retrieve({ - exportId:'EXPORT_ID' + exportId:"EXPORT_ID" });; console.log(res); @@ -16557,14 +16565,14 @@ paths: curl -X PUT "https://api.portkey.ai/v1/logs/exports/EXPORT_ID" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{"workspace_id":"WORKSPACE_ID","filters":{"time_of_generation_max":"2024-07-25"}}' + -d "{"workspace_id":"WORKSPACE_ID","filters":{"time_of_generation_max":"2024-07-25"}}" - lang: curl label: Self-Hosted source: | curl -X PUT "SELF_HOSTED_CONTROL_PLANE_URL/logs/exports/EXPORT_ID" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{"workspace_id":"WORKSPACE_ID","filters":{"time_of_generation_max":"2024-07-25"}}' + -d "{"workspace_id":"WORKSPACE_ID","filters":{"time_of_generation_max":"2024-07-25"}}" - lang: python label: Self-Hosted source: | @@ -16576,10 +16584,10 @@ paths: ) res = portkey.logs.exports.update( - export_id='EXPORT_ID', - workspace_id='WORKSPACE_ID', + export_id="EXPORT_ID", + workspace_id="WORKSPACE_ID", filters={ - 'time_of_generation_max': '2024-07-25' + "time_of_generation_max": "2024-07-25" } ) @@ -16741,8 +16749,8 @@ paths: res = portkey.logs.exports.create( filters={ - 'time_of_generation_min': "2024-10-20", - 'time_of_generation_max': "2024-10-30" + "time_of_generation_min": "2024-10-20", + "time_of_generation_max": "2024-10-30" }, workspace_id="WORKSPACE_ID", description="This is random description", @@ -16822,7 +16830,7 @@ paths: curl -X POST "https://api.portkey.ai/v1/logs/exports" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "workspace_id": "WORKSPACE_ID", "filters": { "time_of_generation_min": "2024-10-20", @@ -16851,7 +16859,7 @@ paths: "prompt_slug", "metadata" ] - }' + }" - lang: python label: Self-Hosted source: | @@ -16864,8 +16872,8 @@ paths: res = portkey.logs.exports.create( filters={ - 'time_of_generation_min': "2024-10-20", - 'time_of_generation_max': "2024-10-30" + "time_of_generation_min": "2024-10-20", + "time_of_generation_max": "2024-10-30" }, workspace_id="WORKSPACE_ID", description="This is random description", @@ -16971,7 +16979,7 @@ paths: ) res = portkey.logs.exports.start( - export_id='EXPORT_ID' + export_id="EXPORT_ID" ) print(res) @@ -16986,7 +16994,7 @@ paths: async function main() { const res = await portkey.logs.exports.start({ - exportId:'EXPORT_ID' + exportId:"EXPORT_ID" }); console.log(res); @@ -17010,7 +17018,7 @@ paths: ) res = portkey.logs.exports.start( - export_id='EXPORT_ID' + export_id="EXPORT_ID" ) print(res) @@ -17026,7 +17034,7 @@ paths: async function main() { const res = await portkey.logs.exports.start({ - exportId:'EXPORT_ID' + exportId:"EXPORT_ID" }); console.log(res); @@ -17064,7 +17072,7 @@ paths: ) res = portkey.logs.exports.cancel( - export_id='EXPORT_ID' + export_id="EXPORT_ID" ) print(res) @@ -17079,7 +17087,7 @@ paths: async function main() { const res = await portkey.logs.exports.cancel({ - exportId:'EXPORT_ID' + exportId:"EXPORT_ID" }); console.log(res); @@ -17103,7 +17111,7 @@ paths: ) res = portkey.logs.exports.cancel( - export_id='EXPORT_ID' + export_id="EXPORT_ID" ) print(res) @@ -17119,7 +17127,7 @@ paths: async function main() { const res = await portkey.logs.exports.cancel({ - exportId:'EXPORT_ID' + exportId:"EXPORT_ID" }); console.log(res); @@ -17157,7 +17165,7 @@ paths: ) res = portkey.logs.exports.download( - export_id='EXPORT_ID' + export_id="EXPORT_ID" ) print(res) @@ -17172,7 +17180,7 @@ paths: async function main() { const config=await portkey.logs.exports.download({ - exportId:'EXPORT_ID' + exportId:"EXPORT_ID" });; console.log(config); @@ -17196,7 +17204,7 @@ paths: ) res = portkey.logs.exports.download( - export_id='EXPORT_ID' + export_id="EXPORT_ID" ) print(res) @@ -17212,14 +17220,14 @@ paths: async function main() { const config=await portkey.logs.exports.download({ - exportId:'EXPORT_ID' + exportId:"EXPORT_ID" });; console.log(config); } main() - + /audit-logs: servers: *ControlPlaneServers get: @@ -17460,7 +17468,7 @@ paths: curl -X POST https://api.portkey.ai/v1/api-keys/organisation/service -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name":"API_KEY_NAME_0909", "type":"organisation", "sub-type":"service", @@ -17481,14 +17489,14 @@ paths: "virtual_keys.list", "virtual_keys.copy" ] - }' + }" - lang: curl label: Self-Hosted source: | curl -X POST SELF_HOSTED_CONTROL_PLANE_URL/api-keys/organisation/service -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name":"API_KEY_NAME_0909", "type":"organisation", "sub-type":"service", @@ -17509,7 +17517,7 @@ paths: "virtual_keys.list", "virtual_keys.copy" ] - }' + }" - lang: javascript label: Self-Hosted source: | @@ -17627,7 +17635,7 @@ paths: curl -X POST https://api.portkey.ai/v1/api-keys/workspace/user -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name":"User API Key", "type":"workspace", "sub-type":"user", @@ -17637,7 +17645,7 @@ paths: "completions.write", "logs.view" ] - }' + }" /api-keys: servers: @@ -17909,7 +17917,7 @@ paths: curl -X PUT "https://api.portkey.ai/v1/api-keys/{id}" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name":"API_KEY_NAME_0909", "rate_limits":[ { @@ -17966,14 +17974,14 @@ paths: "workspace_users.list", "analytics.view" ] - }' + }" - lang: curl label: Self-Hosted source: | curl -X PUT "SELF_HOSTED_CONTROL_PLANE_URL/api-keys/{id}" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name":"API_KEY_NAME_0909", "rate_limits":[ { @@ -18030,7 +18038,7 @@ paths: "workspace_users.list", "analytics.view" ] - }' + }" - lang: python label: Self-Hosted source: | @@ -18416,9 +18424,9 @@ paths: curl -X POST "https://api.portkey.ai/v1/api-keys/{id}/rotate" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "key_transition_period_ms": 3600000 - }' + }" - lang: python label: Self-Hosted source: | @@ -18458,9 +18466,9 @@ paths: curl -X POST "SELF_HOSTED_CONTROL_PLANE_URL/api-keys/{id}/rotate" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "key_transition_period_ms": 3600000 - }' + }" /policies/usage-limits: post: @@ -18476,7 +18484,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateUsageLimitsPolicyRequest' + $ref: "#/components/schemas/CreateUsageLimitsPolicyRequest" examples: monthlyCostLimit: summary: Monthly Cost Limit per API Key @@ -18504,21 +18512,21 @@ paths: credit_limit: 1000000 periodic_reset: weekly responses: - '200': + "200": description: Policy created successfully content: application/json: schema: - $ref: '#/components/schemas/CreatePolicyResponse' - '400': + $ref: "#/components/schemas/CreatePolicyResponse" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy not found - '500': + "500": description: Server error get: @@ -18530,7 +18538,7 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: '#/components/parameters/WorkspaceIdQuery' + - $ref: "#/components/parameters/WorkspaceIdQuery" - name: status in: query description: Filter by status @@ -18546,24 +18554,24 @@ paths: schema: type: string enum: [cost, tokens] - - $ref: '#/components/parameters/PageSize' - - $ref: '#/components/parameters/CurrentPage' + - $ref: "#/components/parameters/PageSize" + - $ref: "#/components/parameters/CurrentPage" responses: - '200': + "200": description: List of usage limits policies content: application/json: schema: - $ref: '#/components/schemas/UsageLimitsPolicyListResponse' - '400': + $ref: "#/components/schemas/UsageLimitsPolicyListResponse" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy not found - '500': + "500": description: Server error /policies/usage-limits/{policyUsageLimitsId}: @@ -18576,7 +18584,7 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: '#/components/parameters/PolicyUsageLimitsId' + - $ref: "#/components/parameters/PolicyUsageLimitsId" - name: status in: query description: Filter by status @@ -18593,21 +18601,21 @@ paths: type: boolean default: false responses: - '200': + "200": description: Usage limits policy details content: application/json: schema: - $ref: '#/components/schemas/UsageLimitsPolicyResponse' - '400': + $ref: "#/components/schemas/UsageLimitsPolicyResponse" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy not found - '500': + "500": description: Server error put: @@ -18619,19 +18627,19 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: '#/components/parameters/PolicyUsageLimitsId' + - $ref: "#/components/parameters/PolicyUsageLimitsId" requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UpdateUsageLimitsPolicyRequest' + $ref: "#/components/schemas/UpdateUsageLimitsPolicyRequest" example: credit_limit: 2000.0 alert_threshold: 1500.0 reset_usage_for_value: api-key-123 responses: - '200': + "200": description: OK headers: Content-Type: @@ -18643,15 +18651,15 @@ paths: schema: type: object example: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy not found - '500': + "500": description: Server error delete: @@ -18663,9 +18671,9 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: '#/components/parameters/PolicyUsageLimitsId' + - $ref: "#/components/parameters/PolicyUsageLimitsId" responses: - '200': + "200": description: OK headers: Content-Type: @@ -18677,15 +18685,15 @@ paths: schema: type: object example: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy not found - '500': + "500": description: Server error /policies/usage-limits/{policyUsageLimitsId}/entities: @@ -18698,7 +18706,7 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: '#/components/parameters/PolicyUsageLimitsId' + - $ref: "#/components/parameters/PolicyUsageLimitsId" - name: status in: query description: Filter by entity usage status @@ -18720,23 +18728,23 @@ paths: type: integer minimum: 1 maximum: 100 - - $ref: '#/components/parameters/CurrentPage' + - $ref: "#/components/parameters/CurrentPage" responses: - '200': + "200": description: List of entities for the policy content: application/json: schema: - $ref: '#/components/schemas/UsageLimitsPolicyEntityListResponse' - '400': + $ref: "#/components/schemas/UsageLimitsPolicyEntityListResponse" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy not found - '500': + "500": description: Server error /policies/usage-limits/{policyUsageLimitsId}/entities/{entityId}/reset: @@ -18749,25 +18757,25 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: '#/components/parameters/PolicyUsageLimitsId' - - $ref: '#/components/parameters/UsageLimitsPolicyEntityId' + - $ref: "#/components/parameters/PolicyUsageLimitsId" + - $ref: "#/components/parameters/UsageLimitsPolicyEntityId" responses: - '200': + "200": description: Entity usage reset successfully content: application/json: schema: type: object example: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy or entity not found - '500': + "500": description: Server error /policies/rate-limits: @@ -18784,7 +18792,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateRateLimitsPolicyRequest' + $ref: "#/components/schemas/CreateRateLimitsPolicyRequest" examples: requestsPerMinute: summary: 100 Requests per Minute per API Key @@ -18811,19 +18819,19 @@ paths: unit: rph value: 10000 responses: - '200': + "200": description: Policy created successfully content: application/json: schema: - $ref: '#/components/schemas/CreatePolicyResponse' - '400': + $ref: "#/components/schemas/CreatePolicyResponse" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '500': + "500": description: Server error get: @@ -18835,7 +18843,7 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: '#/components/parameters/WorkspaceIdQuery' + - $ref: "#/components/parameters/WorkspaceIdQuery" - name: status in: query description: Filter by status @@ -18858,24 +18866,24 @@ paths: schema: type: string enum: [rpm, rph, rpd] - - $ref: '#/components/parameters/PageSize' - - $ref: '#/components/parameters/CurrentPage' + - $ref: "#/components/parameters/PageSize" + - $ref: "#/components/parameters/CurrentPage" responses: - '200': + "200": description: List of rate limits policies content: application/json: schema: - $ref: '#/components/schemas/RateLimitsPolicyListResponse' - '400': + $ref: "#/components/schemas/RateLimitsPolicyListResponse" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy not found - '500': + "500": description: Server error /policies/rate-limits/{rateLimitsPolicyId}: @@ -18888,7 +18896,7 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: '#/components/parameters/RateLimitsPolicyId' + - $ref: "#/components/parameters/RateLimitsPolicyId" - name: status in: query description: Filter by status @@ -18898,21 +18906,21 @@ paths: enum: [active, archived] default: active responses: - '200': + "200": description: Rate limits policy details content: application/json: schema: - $ref: '#/components/schemas/RateLimitsPolicyResponse' - '400': + $ref: "#/components/schemas/RateLimitsPolicyResponse" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy not found - '500': + "500": description: Server error put: @@ -18924,18 +18932,18 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: '#/components/parameters/RateLimitsPolicyId' + - $ref: "#/components/parameters/RateLimitsPolicyId" requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UpdateRateLimitsPolicyRequest' + $ref: "#/components/schemas/UpdateRateLimitsPolicyRequest" example: value: 200 unit: rph responses: - '200': + "200": description: OK headers: Content-Type: @@ -18947,15 +18955,15 @@ paths: schema: type: object example: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy not found - '500': + "500": description: Server error delete: @@ -18967,9 +18975,9 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: '#/components/parameters/RateLimitsPolicyId' + - $ref: "#/components/parameters/RateLimitsPolicyId" responses: - '200': + "200": description: OK headers: Content-Type: @@ -18981,15 +18989,15 @@ paths: schema: type: object example: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy not found - '500': + "500": description: Server error /analytics/graphs/requests: @@ -20659,17 +20667,17 @@ paths: security: [] description: | Returns pricing configuration for a specific model. - + **Note:** Prices are in USD cents per token. - + ## Supported Providers - + openai, anthropic, google, azure-openai, bedrock, mistral-ai, cohere, together-ai, groq, deepseek, fireworks-ai, perplexity-ai, anyscale, deepinfra, cerebras, x-ai, and 25+ more. - + ## Example Response Fields - + | Field | Description | Unit | |-------|-------------|------| | `request_token.price` | Input token cost | cents/token | @@ -20677,7 +20685,7 @@ paths: | `cache_write_input_token.price` | Cache write cost | cents/token | | `cache_read_input_token.price` | Cache read cost | cents/token | | `additional_units.*` | Provider-specific features | cents/unit | - + operationId: getModelPricing tags: - Model Pricing @@ -20687,7 +20695,7 @@ paths: required: true description: | Provider identifier. Use lowercase with hyphens. - + Examples: `openai`, `anthropic`, `google`, `azure-openai`, `bedrock`, `x-ai` schema: type: string @@ -20697,18 +20705,18 @@ paths: required: true description: | Model identifier. Use the exact model name as specified by the provider. - + Examples: `gpt-5`, `gpt-5.2`, `claude-opus-4-5-20251101`, `gemini-3.0-pro` schema: type: string example: gpt-5 responses: - '200': + "200": description: Pricing configuration for the specified model content: application/json: schema: - $ref: '#/components/schemas/ModelPricingConfig' + $ref: "#/components/schemas/ModelPricingConfig" examples: openai-gpt4: summary: OpenAI GPT-4 @@ -20800,7 +20808,7 @@ paths: search: price: 3.5 currency: USD - '404': + "404": description: Model or provider not found content: application/json: @@ -20923,7 +20931,7 @@ paths: curl -X POST https://api.portkey.ai/v1/secret-references \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name": "my-aws-secret", "manager_type": "aws_sm", "auth_config": { @@ -20933,14 +20941,14 @@ paths: "aws_region": "us-east-1" }, "secret_path": "prod/api-keys/openai" - }' + }" - lang: curl label: Self-Hosted source: | curl -X POST SELF_HOSTED_CONTROL_PLANE_URL/secret-references \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name": "my-aws-secret", "manager_type": "aws_sm", "auth_config": { @@ -20950,7 +20958,7 @@ paths: "aws_region": "us-east-1" }, "secret_path": "prod/api-keys/openai" - }' + }" /secret-references/{secretReferenceId}: servers: *ControlPlaneServers @@ -21027,20 +21035,20 @@ paths: curl -X PUT https://api.portkey.ai/v1/secret-references/SECRET_REFERENCE_ID \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name": "updated-secret-name", "secret_path": "prod/api-keys/updated" - }' + }" - lang: curl label: Self-Hosted source: | curl -X PUT SELF_HOSTED_CONTROL_PLANE_URL/secret-references/SECRET_REFERENCE_ID \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d '{ + -d "{ "name": "updated-secret-name", "secret_path": "prod/api-keys/updated" - }' + }" delete: operationId: deleteSecretReference @@ -21079,7 +21087,6 @@ paths: curl -X DELETE SELF_HOSTED_CONTROL_PLANE_URL/secret-references/SECRET_REFERENCE_ID \ -H "x-portkey-api-key: PORTKEY_API_KEY" - components: securitySchemes: Portkey-Key: @@ -21264,7 +21271,7 @@ components: schema: type: string description: Stringifed json object with key value metadata pairs - example: '{"_user":"user_1", "env": "staging"}' + example: "{"_user":"user_1", "env": "staging"}" AiOrgModel: in: query name: ai_org_model @@ -21378,39 +21385,39 @@ components: description: Complete pricing configuration for a model properties: pay_as_you_go: - $ref: '#/components/schemas/ModelPayAsYouGo' + $ref: "#/components/schemas/ModelPayAsYouGo" calculate: - $ref: '#/components/schemas/ModelCalculateConfig' + $ref: "#/components/schemas/ModelCalculateConfig" currency: type: string enum: [USD] description: Currency code (always USD) finetune_config: - $ref: '#/components/schemas/ModelFinetuneConfig' + $ref: "#/components/schemas/ModelFinetuneConfig" ModelPayAsYouGo: type: object description: Token-based pricing (all prices in USD cents) properties: request_token: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" response_token: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" cache_write_input_token: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" cache_read_input_token: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" request_audio_token: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" response_audio_token: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" cache_read_audio_input_token: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" additional_units: type: object description: | Provider-specific additional pricing units. - + Common additional units: - `web_search`: Web search tool usage - `file_search`: File search tool usage @@ -21418,9 +21425,9 @@ components: - `image_token`: Image generation tokens - `video_duration_seconds_*`: Video generation (OpenAI Sora) additionalProperties: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" image: - $ref: '#/components/schemas/ModelImagePricing' + $ref: "#/components/schemas/ModelImagePricing" ModelTokenPrice: type: object @@ -21430,7 +21437,7 @@ components: type: number description: | Price in USD cents per token/unit. - + Example: `0.003` = 0.003 cents/token = $0.03 per 1K tokens ModelImagePricing: @@ -21439,7 +21446,7 @@ components: additionalProperties: type: object additionalProperties: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" example: standard: 1024x1024: @@ -21457,9 +21464,9 @@ components: description: Cost calculation formulas properties: request: - $ref: '#/components/schemas/ModelCalculateOperation' + $ref: "#/components/schemas/ModelCalculateOperation" response: - $ref: '#/components/schemas/ModelCalculateOperation' + $ref: "#/components/schemas/ModelCalculateOperation" ModelCalculateOperation: type: object @@ -21474,8 +21481,8 @@ components: description: Operands for the operation items: oneOf: - - $ref: '#/components/schemas/ModelCalculateOperation' - - $ref: '#/components/schemas/ModelValueReference' + - $ref: "#/components/schemas/ModelCalculateOperation" + - $ref: "#/components/schemas/ModelValueReference" ModelValueReference: type: object @@ -21484,7 +21491,7 @@ components: type: string description: | Reference to a value or rate. - + Examples: - `input_tokens`: Number of input tokens - `output_tokens`: Number of output tokens @@ -21496,9 +21503,9 @@ components: description: Fine-tuning pricing configuration properties: pay_per_token: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" pay_per_hour: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" Error: type: object @@ -21691,7 +21698,7 @@ components: maximum: 2 nullable: true description: &completions_frequency_penalty_description | - Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model"s likelihood to repeat the same line verbatim. [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation/parameter-details) logit_bias: &completions_logit_bias @@ -21726,7 +21733,7 @@ components: description: &completions_max_tokens_description | The maximum number of [tokens](https://platform.openai.com/tokenizer?view=bpe) that can be generated in the completion. - The token count of your prompt plus `max_tokens` cannot exceed the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. + The token count of your prompt plus `max_tokens` cannot exceed the model"s context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. n: type: integer minimum: 1 @@ -21745,7 +21752,7 @@ components: maximum: 2 nullable: true description: &completions_presence_penalty_description | - Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. + Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model"s likelihood to talk about new topics. [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation/parameter-details) seed: &completions_seed_param @@ -21772,7 +21779,7 @@ components: maxItems: 4 items: type: string - example: '["\n"]' + example: "["\n"]" stream: description: > Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-UShttps://platform.openai.com/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) @@ -22240,7 +22247,7 @@ components: - type - status - queries - # TODO(apeng): This is only because we don't support tools yet. Use allOf once we do. + # TODO(apeng): This is only because we don"t support tools yet. Use allOf once we do. FineTuneChatCompletionRequestAssistantMessage: type: object title: Assistant message @@ -22318,7 +22325,7 @@ components: - content - name - # TODO(apeng): This is only because we don't support tools yet. Add back deprecated once we do. + # TODO(apeng): This is only because we don"t support tools yet. Add back deprecated once we do. FineTuneChatCompletionRequestFunctionMessage: allOf: - type: object @@ -22589,7 +22596,7 @@ components: required: - index - # Note, this isn't referenced anywhere, but is kept as a convenience to record all possible roles in one place. + # Note, this isn"t referenced anywhere, but is kept as a convenience to record all possible roles in one place. ChatCompletionRole: type: string description: The role of the author of a message @@ -23858,37 +23865,37 @@ components: properties: hate: type: number - description: The score for the category 'hate'. + description: The score for the category "hate". hate/threatening: type: number - description: The score for the category 'hate/threatening'. + description: The score for the category "hate/threatening". harassment: type: number - description: The score for the category 'harassment'. + description: The score for the category "harassment". harassment/threatening: type: number - description: The score for the category 'harassment/threatening'. + description: The score for the category "harassment/threatening". self-harm: type: number - description: The score for the category 'self-harm'. + description: The score for the category "self-harm". self-harm/intent: type: number - description: The score for the category 'self-harm/intent'. + description: The score for the category "self-harm/intent". self-harm/instructions: type: number - description: The score for the category 'self-harm/instructions'. + description: The score for the category "self-harm/instructions". sexual: type: number - description: The score for the category 'sexual'. + description: The score for the category "sexual". sexual/minors: type: number - description: The score for the category 'sexual/minors'. + description: The score for the category "sexual/minors". violence: type: number - description: The score for the category 'violence'. + description: The score for the category "violence". violence/graphic: type: number - description: The score for the category 'violence/graphic'. + description: The score for the category "violence/graphic". required: - hate - hate/threatening @@ -24063,7 +24070,7 @@ components: description: Role ARN for the bedrock finetune job output_file: type: string - description: Finetune job's output s3 location, will be constructed based on `training_file` if not provided + description: Finetune job"s output s3 location, will be constructed based on `training_file` if not provided allOf: - $ref: "#/components/schemas/OpenAIFinetuneJob" @@ -24154,7 +24161,7 @@ components: description: Role ARN for the bedrock finetune job output_file: type: string - description: Finetune job's output s3 location, will be constructed based on `training_file` if not provided + description: Finetune job"s output s3 location, will be constructed based on `training_file` if not provided PortkeyFinetuneJob: type: object @@ -24167,7 +24174,7 @@ components: description: Role ARN for the bedrock finetune job output_file: type: string - description: Finetune job's output s3 location, will be constructed based on `training_file` if not provided + description: Finetune job"s output s3 location, will be constructed based on `training_file` if not provided portkey_options: allOf: - $ref: "#/components/schemas/PortkeyOptions" @@ -24264,7 +24271,7 @@ components: items: type: string default: "" - example: "['This is a test.']" + example: "["This is a test."]" - type: array title: array description: The array of integers that will be turned into an embedding. @@ -24403,7 +24410,7 @@ components: top_n: description: | The number of top results to return. If not specified, all documents are returned sorted by relevance. - For Voyage, the gateway maps this field to the provider's `top_k` parameter. + For Voyage, the gateway maps this field to the provider"s `top_k` parameter. type: integer minimum: 1 example: 3 @@ -24430,7 +24437,7 @@ components: example: ["text", "title"] truncation: description: | - Whether to truncate documents that exceed the model's maximum context length. Voyage-specific parameter. + Whether to truncate documents that exceed the model"s maximum context length. Voyage-specific parameter. type: boolean parameters: description: | @@ -24537,7 +24544,7 @@ components: type: string prompt: description: | - An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting) should match the audio language. + An optional text to guide the model"s style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting) should match the audio language. type: string response_format: description: | @@ -24695,7 +24702,7 @@ components: x-oaiTypeLabel: string prompt: description: | - An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting) should be in English. + An optional text to guide the model"s style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting) should be in English. type: string response_format: description: | @@ -25929,7 +25936,7 @@ components: A summary of the reasoning performed by the model. This can be - useful for debugging and understanding the model's reasoning + useful for debugging and understanding the model"s reasoning process. One of `concise` or `detailed`. @@ -26087,10 +26094,10 @@ components: - The length and order of items in the `output` array is dependent - on the model's response. + on the model"s response. - Rather than accessing the first item in the `output` array and - assuming it's an `assistant` message with the content generated by + assuming it"s an `assistant` message with the content generated by the model, you might consider using the `output_text` property where supported in SDKs. items: @@ -26937,7 +26944,7 @@ components: type: string description: > Inserts a system (or developer) message as the first item in the - model's context. + model"s context. When using along with `previous_response_id`, the instructions from @@ -26977,7 +26984,7 @@ components: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](/docs/guides/tools-web-search) + model"s capabilities, like [web search](/docs/guides/tools-web-search) or [file search](/docs/guides/tools-file-search). Learn more about [built-in tools](/docs/guides/tools). - **Function calls (custom tools)**: Functions that are defined by @@ -27006,7 +27013,7 @@ components: The truncation strategy to use for the model response. - `auto`: If the context of this response and previous ones exceeds - the model's context window size, the model will truncate the + the model"s context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - `disabled` (default): If a model response will exceed the context @@ -27356,7 +27363,7 @@ components: RunStepCompletionUsage: type: object - description: Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`. + description: Usage statistics related to the run step. This value will be `null` while the run step"s status is `in_progress`. properties: completion_tokens: type: integer @@ -27455,7 +27462,7 @@ components: tool_resources: type: object description: | - A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + A set of resources that are used by the assistant"s tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. properties: code_interpreter: type: object @@ -27586,7 +27593,7 @@ components: tool_resources: type: object description: | - A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + A set of resources that are used by the assistant"s tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. properties: code_interpreter: type: object @@ -27625,7 +27632,7 @@ components: items: type: string chunking_strategy: - # Ideally we'd reuse the chunking strategy schema here, but it doesn't expand properly + # Ideally we"d reuse the chunking strategy schema here, but it doesn"t expand properly type: object description: The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. oneOf: @@ -27816,7 +27823,7 @@ components: tool_resources: type: object description: | - A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + A set of resources that are used by the assistant"s tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. properties: code_interpreter: type: object @@ -28716,7 +28723,7 @@ components: tool_resources: type: object description: | - A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + A set of resources that are used by the assistant"s tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. properties: code_interpreter: type: object @@ -28811,7 +28818,7 @@ components: tool_resources: type: object description: | - A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + A set of resources that are made available to the assistant"s tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. properties: code_interpreter: type: object @@ -28869,7 +28876,7 @@ components: tool_resources: type: object description: | - A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + A set of resources that are made available to the assistant"s tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. properties: code_interpreter: type: object @@ -28908,7 +28915,7 @@ components: items: type: string chunking_strategy: - # Ideally we'd reuse the chunking strategy schema here, but it doesn't expand properly + # Ideally we"d reuse the chunking strategy schema here, but it doesn"t expand properly type: object description: The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. oneOf: @@ -28976,7 +28983,7 @@ components: tool_resources: type: object description: | - A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + A set of resources that are made available to the assistant"s tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. properties: code_interpreter: type: object @@ -29529,7 +29536,7 @@ components: MessageContentTextAnnotationsFilePathObject: title: File path type: object - description: A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file. + description: A URL for the file that"s generated when the assistant used the `code_interpreter` tool to generate a file. properties: type: description: Always `file_path`. @@ -29625,7 +29632,7 @@ components: MessageDeltaContentTextAnnotationsFilePathObject: title: File path type: object - description: A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file. + description: A URL for the file that"s generated when the assistant used the `code_interpreter` tool to generate a file. properties: index: type: integer @@ -31790,26 +31797,49 @@ components: type: integer UsageLimits: type: object + required: + - credit_limit + description: "Usage limit configuration. credit_limit is required when this object is present. periodic_reset and periodic_reset_days are mutually exclusive." properties: - credit_limit: - type: integer - description: Credit Limit. Used for tracking usage - minimum: 1 - default: null type: type: string - description: Type of credit limit + description: "Whether the credit_limit is measured in tokens or cost (USD)." enum: ["cost", "tokens"] + example: "cost" + credit_limit: + type: number + format: float + description: "Maximum allowed usage. Interpreted as USD when type is "cost", or token count when type is "tokens"." + minimum: 0 + example: 10 alert_threshold: - type: integer - description: Alert Threshold. Used for alerting when usage reaches more than this - minimum: 1 - default: null + type: number + format: float + description: "Send alert emails when usage reaches this value. Must be less than or equal to credit_limit." + minimum: 0 + nullable: true + example: 8 periodic_reset: type: string - description: Reset the usage periodically. + description: "Reset the usage counter on a fixed calendar schedule. Mutually exclusive with periodic_reset_days." enum: ["monthly", "weekly"] + nullable: true + example: "monthly" + periodic_reset_days: + type: integer + description: "Reset the usage counter every N days (1–365). Mutually exclusive with periodic_reset." + minimum: 1 + maximum: 365 + nullable: true + example: 30 + next_usage_reset_at: + type: string + format: date-time + description: "ISO 8601 datetime for the next scheduled usage reset. Auto-computed from periodic_reset or periodic_reset_days if not provided." + nullable: true + example: "2026-05-01T00:00:00Z" example: + type: cost credit_limit: 10 periodic_reset: monthly alert_threshold: 8 @@ -31826,7 +31856,7 @@ components: example: "Production OpenAI" slug: type: string - pattern: '^[a-zA-Z0-9_-]+$' + pattern: "^[a-zA-Z0-9_-]+$" description: URL-friendly identifier (auto-generated if not provided) example: "production-openai" ai_provider_id: @@ -31849,25 +31879,25 @@ components: type: object description: Provider-specific configuration object oneOf: - - $ref: '#/components/schemas/OpenAIConfiguration' + - $ref: "#/components/schemas/OpenAIConfiguration" title: OpenAI - - $ref: '#/components/schemas/AzureOpenAIConfiguration' + - $ref: "#/components/schemas/AzureOpenAIConfiguration" title: Azure OpenAI - - $ref: '#/components/schemas/BedrockConfiguration' + - $ref: "#/components/schemas/BedrockConfiguration" title: AWS Bedrock - - $ref: '#/components/schemas/VertexAIConfiguration' + - $ref: "#/components/schemas/VertexAIConfiguration" title: Vertex AI - - $ref: '#/components/schemas/AzureAIConfiguration' + - $ref: "#/components/schemas/AzureAIConfiguration" title: Azure AI - - $ref: '#/components/schemas/WorkersAIConfiguration' + - $ref: "#/components/schemas/WorkersAIConfiguration" title: Workers AI - - $ref: '#/components/schemas/SageMakerConfiguration' + - $ref: "#/components/schemas/SageMakerConfiguration" title: AWS Sagemaker - - $ref: '#/components/schemas/HuggingFaceConfiguration' + - $ref: "#/components/schemas/HuggingFaceConfiguration" title: Hugginface - - $ref: '#/components/schemas/CortexConfiguration' + - $ref: "#/components/schemas/CortexConfiguration" title: Cortex - - $ref: '#/components/schemas/CustomHostConfiguration' + - $ref: "#/components/schemas/CustomHostConfiguration" title: Custom Base URL create_default_provider: type: boolean @@ -31875,13 +31905,13 @@ components: description: Whether to automatically create a default provider when creating a workspace-scoped integration. Defaults to true. default_provider_slug: type: string - pattern: '^[a-zA-Z0-9_-]+$' + pattern: "^[a-zA-Z0-9_-]+$" maxLength: 255 description: Custom slug for the auto-created default provider. Only applicable for workspace-scoped integrations. If the slug already exists in the workspace, the request will fail with a validation error. secret_mappings: type: array items: - $ref: '#/components/schemas/SecretMapping' + $ref: "#/components/schemas/SecretMapping" description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "configurations." (e.g. "configurations.aws_secret_access_key", "configurations.azure_entra_client_secret"). Each target_field must be unique. When "key" is mapped, the key body field can be omitted. UpdateIntegrationRequest: @@ -31903,35 +31933,35 @@ components: type: object description: Provider-specific configuration object oneOf: - - $ref: '#/components/schemas/OpenAIConfiguration' + - $ref: "#/components/schemas/OpenAIConfiguration" title: OpenAI - - $ref: '#/components/schemas/AzureOpenAIConfiguration' + - $ref: "#/components/schemas/AzureOpenAIConfiguration" title: Azure OpenAI - - $ref: '#/components/schemas/BedrockConfiguration' + - $ref: "#/components/schemas/BedrockConfiguration" title: AWS Bedrock - - $ref: '#/components/schemas/VertexAIConfiguration' + - $ref: "#/components/schemas/VertexAIConfiguration" title: Vertex AI - - $ref: '#/components/schemas/AzureAIConfiguration' + - $ref: "#/components/schemas/AzureAIConfiguration" title: Azure AI - - $ref: '#/components/schemas/WorkersAIConfiguration' + - $ref: "#/components/schemas/WorkersAIConfiguration" title: Workers AI - - $ref: '#/components/schemas/SageMakerConfiguration' + - $ref: "#/components/schemas/SageMakerConfiguration" title: AWS Sagemaker - - $ref: '#/components/schemas/HuggingFaceConfiguration' + - $ref: "#/components/schemas/HuggingFaceConfiguration" title: Hugginface - - $ref: '#/components/schemas/CortexConfiguration' + - $ref: "#/components/schemas/CortexConfiguration" title: Cortex - - $ref: '#/components/schemas/CustomHostConfiguration' + - $ref: "#/components/schemas/CustomHostConfiguration" title: Custom Base URL secret_mappings: type: array items: - $ref: '#/components/schemas/SecretMapping' + $ref: "#/components/schemas/SecretMapping" description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "configurations." (e.g. "configurations.aws_secret_access_key", "configurations.azure_entra_client_secret"). Each target_field must be unique. IntegrationDetailResponse: allOf: - - $ref: '#/components/schemas/IntegrationList' + - $ref: "#/components/schemas/IntegrationList" - type: object properties: masked_key: @@ -31941,36 +31971,36 @@ components: type: object description: | Provider-specific configuration object - + **⚠️ Security Note - Response Masking:** When retrieving integration details, sensitive fields are automatically masked: - Sensitive fields get a `masked_` prefix (e.g., `client_secret` → `masked_client_secret`) - Non-sensitive fields (IDs, URLs, regions, etc.) remain unchanged oneOf: - - $ref: '#/components/schemas/OpenAIConfiguration' + - $ref: "#/components/schemas/OpenAIConfiguration" title: OpenAI - - $ref: '#/components/schemas/AzureOpenAIConfiguration' + - $ref: "#/components/schemas/AzureOpenAIConfiguration" title: Azure OpenAI - - $ref: '#/components/schemas/BedrockConfiguration' + - $ref: "#/components/schemas/BedrockConfiguration" title: AWS Bedrock - - $ref: '#/components/schemas/VertexAIConfiguration' + - $ref: "#/components/schemas/VertexAIConfiguration" title: Vertex AI - - $ref: '#/components/schemas/AzureAIConfiguration' + - $ref: "#/components/schemas/AzureAIConfiguration" title: Azure AI - - $ref: '#/components/schemas/WorkersAIConfiguration' + - $ref: "#/components/schemas/WorkersAIConfiguration" title: Workers AI - - $ref: '#/components/schemas/SageMakerConfiguration' + - $ref: "#/components/schemas/SageMakerConfiguration" title: AWS Sagemaker - - $ref: '#/components/schemas/HuggingFaceConfiguration' + - $ref: "#/components/schemas/HuggingFaceConfiguration" title: Hugginface - - $ref: '#/components/schemas/CortexConfiguration' + - $ref: "#/components/schemas/CortexConfiguration" title: Cortex - - $ref: '#/components/schemas/CustomHostConfiguration' + - $ref: "#/components/schemas/CustomHostConfiguration" title: Custom Base URL global_workspace_access_settings: type: object nullable: true - $ref: '#/components/schemas/GlobalWorkspaceAccess' + $ref: "#/components/schemas/GlobalWorkspaceAccess" description: Global workspace access configuration allow_all_models: type: boolean @@ -31981,9 +32011,9 @@ components: secret_mappings: type: array items: - $ref: '#/components/schemas/SecretMapping' + $ref: "#/components/schemas/SecretMapping" description: Secret reference mappings for this integration. Valid target_field values are "key" or "configurations.". - + GlobalWorkspaceAccess: type: object required: @@ -31997,13 +32027,13 @@ components: nullable: true maxItems: 1 items: - $ref: '#/components/schemas/UsageLimits' + $ref: "#/components/schemas/UsageLimits" rate_limits: type: array nullable: true maxItems: 1 items: - $ref: '#/components/schemas/RateLimits' + $ref: "#/components/schemas/RateLimits" OpenAIConfiguration: type: object @@ -32033,7 +32063,7 @@ components: type: array minItems: 1 items: - $ref: '#/components/schemas/AzureDeploymentConfig' + $ref: "#/components/schemas/AzureDeploymentConfig" # Entra-specific fields azure_entra_tenant_id: type: string @@ -32105,7 +32135,7 @@ components: SageMakerConfiguration: allOf: - - $ref: '#/components/schemas/BedrockConfiguration' + - $ref: "#/components/schemas/BedrockConfiguration" - type: object properties: amzn_sagemaker_custom_attributes: @@ -32270,7 +32300,7 @@ components: maxLength: 255 slug: type: string - pattern: '^[a-zA-Z0-9_-]+$' + pattern: "^[a-zA-Z0-9_-]+$" maxLength: 255 description: Auto-generated from name if omitted description: @@ -32611,7 +32641,7 @@ components: object: type: string enum: [integration] - + IntegrationModelsResponse: type: object properties: @@ -32621,7 +32651,7 @@ components: models: type: array items: - $ref: '#/components/schemas/IntegrationModel' + $ref: "#/components/schemas/IntegrationModel" IntegrationModel: type: object @@ -32648,7 +32678,7 @@ components: nullable: true description: Base model slug for fine-tuned models pricing_config: - $ref: '#/components/schemas/PricingConfig' + $ref: "#/components/schemas/PricingConfig" PricingConfig: type: object @@ -32658,21 +32688,21 @@ components: enum: [static] description: Pricing type pay_as_you_go: - $ref: '#/components/schemas/PayAsYouGoPricing' + $ref: "#/components/schemas/PayAsYouGoPricing" PayAsYouGoPricing: type: object properties: request_token: - $ref: '#/components/schemas/TokenPricing' + $ref: "#/components/schemas/TokenPricing" response_token: - $ref: '#/components/schemas/TokenPricing' + $ref: "#/components/schemas/TokenPricing" ModelConfigurations: - type: object - properties: - custom_host: - type: string - description: Custom Host URL for the model. + type: object + properties: + custom_host: + type: string + description: Custom Host URL for the model. TokenPricing: type: object @@ -32690,7 +32720,7 @@ components: models: type: array items: - $ref: '#/components/schemas/ModelUpdateRequest' + $ref: "#/components/schemas/ModelUpdateRequest" allow_all_models: type: boolean description: Whether to allow all models by default @@ -32722,7 +32752,7 @@ components: configurations: $ref: "#/components/schemas/ModelConfigurations" pricing_config: - $ref: '#/components/schemas/PricingConfig' + $ref: "#/components/schemas/PricingConfig" IntegrationWorkspacesResponse: type: object @@ -32733,7 +32763,7 @@ components: workspaces: type: array items: - $ref: '#/components/schemas/IntegrationWorkspace' + $ref: "#/components/schemas/IntegrationWorkspace" IntegrationWorkspace: type: object @@ -32749,12 +32779,12 @@ components: type: array nullable: true items: - $ref: '#/components/schemas/UsageLimits' + $ref: "#/components/schemas/UsageLimits" rate_limits: type: array nullable: true items: - $ref: '#/components/schemas/RateLimits' + $ref: "#/components/schemas/RateLimits" BulkUpdateWorkspacesRequest: type: object @@ -32762,9 +32792,9 @@ components: workspaces: type: array items: - $ref: '#/components/schemas/WorkspaceUpdateRequest' + $ref: "#/components/schemas/WorkspaceUpdateRequest" global_workspace_access: - $ref: '#/components/schemas/GlobalWorkspaceAccess' + $ref: "#/components/schemas/GlobalWorkspaceAccess" override_existing_workspace_access: type: boolean description: Whether to override existing workspace access settings @@ -32794,13 +32824,13 @@ components: nullable: true maxItems: 1 items: - $ref: '#/components/schemas/UsageLimits' + $ref: "#/components/schemas/UsageLimits" rate_limits: type: array nullable: true maxItems: 1 items: - $ref: '#/components/schemas/RateLimits' + $ref: "#/components/schemas/RateLimits" reset_usage: type: boolean description: Whether to reset current usage. If the current status is exhausted, this will change it back to active. @@ -32886,7 +32916,7 @@ components: secret_mappings: type: array items: - $ref: '#/components/schemas/SecretMapping' + $ref: "#/components/schemas/SecretMapping" description: Secret reference mappings for this virtual key. Valid target_field values are "key" or "model_config.". object: type: string @@ -33191,11 +33221,11 @@ components: example: 0 input_guardrails: type: array - items: + items: type: string output_guardrails: type: array - items: + items: type: string object: type: string @@ -33243,7 +33273,7 @@ components: last_updated_at: type: string format: date-time - + CollectionDetails: type: object properties: @@ -33259,15 +33289,15 @@ components: type: string format: date-time nullable: true - + CollectionWithDetails: allOf: - - $ref: '#/components/schemas/Collection' + - $ref: "#/components/schemas/Collection" - type: object properties: collection_details: - $ref: '#/components/schemas/CollectionDetails' - + $ref: "#/components/schemas/CollectionDetails" + ChildCollection: type: object properties: @@ -33280,17 +33310,17 @@ components: type: string format: date-time collection_details: - $ref: '#/components/schemas/CollectionDetails' - + $ref: "#/components/schemas/CollectionDetails" + CollectionWithChildCollections: allOf: - - $ref: '#/components/schemas/Collection' + - $ref: "#/components/schemas/Collection" - type: object properties: child_collections: type: array items: - $ref: '#/components/schemas/ChildCollection' + $ref: "#/components/schemas/ChildCollection" Label: type: object @@ -33385,7 +33415,7 @@ components: data: type: array items: - $ref: '#/components/schemas/Label' + $ref: "#/components/schemas/Label" PromptSummary: type: object @@ -33414,7 +33444,7 @@ components: object: type: string enum: ["prompt"] - + Prompt: type: object properties: @@ -33471,7 +33501,7 @@ components: last_updated_at: type: string format: date-time - + PromptVersionSummary: type: object properties: @@ -33499,7 +33529,7 @@ components: object: type: string enum: ["prompt"] - + PromptPartialSummary: type: object properties: @@ -33525,7 +33555,7 @@ components: object: type: string enum: ["partial"] - + PromptPartial: type: object properties: @@ -33557,7 +33587,7 @@ components: status: type: string enum: ["active"] - + PromptPartialVersion: type: object properties: @@ -33809,40 +33839,40 @@ components: description: Unique identifier for the log entry nullable: true example: "550e8400-e29b-41d4-a716-446655440000" - + request: - $ref: '#/components/schemas/LogRequest' - + $ref: "#/components/schemas/LogRequest" + response: - $ref: '#/components/schemas/LogResponse' - + $ref: "#/components/schemas/LogResponse" + organisation_id: type: string description: Organization identifier nullable: true example: "org-123" - + created_at: type: string format: date-time description: Timestamp when the log was created nullable: true example: "2024-01-15T10:30:00.000Z" - + metrics: - $ref: '#/components/schemas/AnalyticsMetrics' + $ref: "#/components/schemas/AnalyticsMetrics" description: Analytics metrics object containing detailed metrics about the request - + finalUntransformedRequest: - $ref: '#/components/schemas/RequestResponseObject' + $ref: "#/components/schemas/RequestResponseObject" description: The original request before any transformations (only present when debug logging is enabled) - + originalResponse: - $ref: '#/components/schemas/RequestResponseObject' + $ref: "#/components/schemas/RequestResponseObject" description: The original response from the provider (only present when debug logging is enabled or request failed) - + transformedRequest: - $ref: '#/components/schemas/RequestResponseObject' + $ref: "#/components/schemas/RequestResponseObject" description: The request after transformations (only present when debug logging is enabled) LogRequest: @@ -33857,13 +33887,13 @@ components: format: uri description: Sanitized request URL example: "https://api.openai.com/v1/chat/completions" - + method: type: string description: HTTP method enum: [GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD] example: "POST" - + headers: type: object additionalProperties: @@ -33872,12 +33902,12 @@ components: example: "Content-Type": "application/json" "Authorization": "Bearer hashed_value" - + body: type: object additionalProperties: true description: Request body (only present when debug logging is enabled) - + portkeyHeaders: type: object additionalProperties: @@ -33886,7 +33916,7 @@ components: example: "x-portkey-trace-id": "trace-123" "x-portkey-span-id": "span-456" - "x-portkey-metadata": "{\"key\":\"value\"}" + "x-portkey-metadata": "{"key":"value"}" LogResponse: type: object @@ -33900,7 +33930,7 @@ components: format: int32 description: HTTP response status code example: 200 - + headers: type: object additionalProperties: @@ -33908,7 +33938,7 @@ components: description: Response headers (only present when debug logging is enabled or request failed) example: "Content-Type": "application/json" - + body: type: object additionalProperties: true @@ -33917,13 +33947,13 @@ components: id: "chatcmpl-123" object: "chat.completion" created: 1677652288 - + responseTime: type: integer format: int64 description: Response time in milliseconds example: 1234 - + lastUsedOptionJsonPath: type: string description: JSON path to the last used option in the config @@ -33958,220 +33988,220 @@ components: format: uuid description: Unique identifier for the log entry example: "550e8400-e29b-41d4-a716-446655440000" - + organisation_id: type: string description: Organization identifier example: "org-123" - + organisation_name: type: string description: Organization name example: "Acme Corp" - + prompt_id: type: string description: Prompt identifier example: "prompt-789" - + prompt_version_id: type: string description: Prompt version identifier example: "prompt-v1" - + config_id: type: string description: Configuration identifier example: "config-123" - + created_at: type: string format: date-time description: Timestamp when the log was created example: "2024-01-15T10:30:00.000" - + is_success: type: boolean description: Whether the request was successful (status code 200-299) example: true - + ai_org: type: string description: AI provider organization (e.g., openai, anthropic) example: "openai" - + ai_model: type: string description: AI model used example: "gpt-4o" - + req_units: type: number format: float description: Request token units example: 100 - + res_units: type: number format: float description: Response token units example: 50 - + total_units: type: number format: float description: Total token units (req_units + res_units) example: 150 - + cost: type: number format: float description: Cost in the specified currency example: 0.002 - + cost_currency: type: string description: Currency code for the cost default: "USD" example: "USD" - + request_url: type: string format: uri description: Sanitized request URL example: "https://api.openai.com/v1/chat/completions" - + request_method: type: string description: HTTP method example: "POST" - + response_status_code: type: integer format: int32 description: HTTP response status code example: 200 - + response_time: type: integer format: int64 description: Response time in milliseconds example: 1234 - + is_proxy_call: type: boolean description: Whether this was a proxy call example: true - + cache_status: type: string nullable: true description: Cache status (e.g., HIT, MISS, DISABLED, SEMANTIC HIT) example: "MISS" - + cache_type: type: string nullable: true description: Type of cache used example: "semantic" - + stream_mode: type: integer nullable: true description: Whether streaming was enabled (1) or not (0) example: 1 - + retry_success_count: type: integer description: Number of successful retries example: 0 - + trace_id: type: string description: Distributed tracing trace ID example: "trace-123" - + span_id: type: string description: Distributed tracing span ID example: "span-456" - + span_name: type: string description: Name of the span example: "llm" - + parent_span_id: type: string description: Parent span ID in distributed tracing example: "span-789" - + mode: type: string description: Request mode (e.g., single, loadbalance, fallback) example: "single" - + virtual_key: type: string description: Virtual key identifier example: "vk-123" - + source: type: string description: Source of the request (e.g., rubeus, proxy) example: "rubeus" - + runtime: type: string description: Runtime environment example: "node" - + runtime_version: type: string description: Runtime version example: "18.0.0" - + sdk_version: type: string description: SDK version example: "1.0.0" - + config: type: string description: Configuration slug or ID example: "pc-config-123" - + internal_trace_id: type: string description: Internal trace ID for gateway tracking example: "internal-trace-123" - + last_used_option_index: type: integer description: Index of the last used option in the config example: 0 - + config_version_id: type: string description: Configuration version identifier example: "config-v1" - + prompt_slug: type: string description: Prompt slug example: "my-prompt" - + workspace_slug: type: string nullable: true description: Workspace slug example: "my-workspace" - + log_store_file_path_format: type: string description: Path format version for log storage example: "v1" - + metadata.key: type: array items: @@ -34179,7 +34209,7 @@ components: nullable: true description: Array of metadata keys example: ["key1", "key2"] - + metadata.value: type: array items: @@ -34187,42 +34217,42 @@ components: nullable: true description: Array of metadata values example: ["value1", "value2"] - + api_key_id: type: string description: API key identifier example: "api-key-123" - + request_parsing_time: type: integer format: int64 description: Time taken to parse the request in milliseconds example: 5 - + pre_processing_time: type: integer format: int64 description: Time taken for pre-processing in milliseconds example: 10 - + cache_processing_time: type: integer format: int64 description: Time taken for cache processing in milliseconds example: 2 - + response_parsing_time: type: integer format: int64 description: Time taken to parse the response in milliseconds example: 8 - + gateway_processing_time: type: integer format: int64 description: Total gateway processing time in milliseconds example: 50 - + upstream_response_time: type: integer format: int64 @@ -34443,113 +34473,227 @@ components: properties: name: type: string + maxLength: 100 example: "Development API Key" description: type: string + maxLength: 200 example: "API key for development environment" + organisation_id: + type: string + format: uuid + description: "Organisation ID. Optional when calling via an org-level API key (picked from auth context)." + example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" workspace_id: type: string + description: "Workspace ID or slug (e.g. ws-myworkspace). Required for workspace-scoped keys." example: "ws-myworkspace" user_id: type: string format: uuid - description: "**Required** when sub-type path parameter is 'user'. Not required when sub-type is 'service'." + description: "**Required** when sub-type path parameter is "user". Not required when sub-type is "service"." example: "c3d4e5f6-a7b8-6c7d-0e1f-2a3b4c5d6e7f" + scopes: + type: array + minItems: 1 + items: + type: string + example: ["completions.write"] + defaults: + type: object + nullable: true + properties: + config_id: + type: string + format: uuid + nullable: true + description: "UUID of the config to pin to this key. Every request using this key will automatically apply this config." + example: "f1e2d3c4-b5a6-7890-fedc-ba9876543210" + allow_config_override: + type: boolean + nullable: true + default: true + description: "When false, the pinned config_id cannot be overridden at request time." + example: false + metadata: + type: object + nullable: true + additionalProperties: + type: string + description: "Default metadata attached to every request made with this key. Values must be strings." + example: + environment: "development" + team: "backend" + usage_limits: + $ref: "#/components/schemas/UsageLimits" rate_limits: type: array + nullable: true items: type: object + required: + - type + - unit + - value properties: type: type: string + enum: ["requests", "tokens"] example: "requests" unit: type: string + enum: ["rpd", "rph", "rpm", "rps", "rpw"] + description: "Rate limit unit: requests/tokens per day, hour, minute, second, or week." example: "rpm" value: type: integer + minimum: 0 example: 100 - usage_limits: - $ref: "#/components/schemas/UsageLimits" - scopes: + expires_at: + type: string + format: date-time + nullable: true + description: "ISO 8601 datetime at which this key expires. Must not exceed the org/workspace maximum TTL if configured." + example: "2026-12-31T23:59:59Z" + alert_emails: type: array + nullable: true items: type: string - example: ["completions.write"] - defaults: + format: email + description: "Email addresses to notify when usage limits are approaching the alert_threshold." + example: ["admin@example.com"] + rotation_policy: type: object + nullable: true + description: "Automatic key rotation configuration. Requires either rotation_period or next_rotation_at." properties: - metadata: - type: object - additionalProperties: true - example: - environment: "development" - team: "backend" - config_id: + rotation_period: type: string - example: config-abc - alert_emails: - type: array - items: - type: string - format: email - example: "foo@bar.com" - expires_at: - type: string - format: date-time + enum: ["weekly", "monthly"] + nullable: true + description: "How often to automatically rotate the key." + example: "monthly" + next_rotation_at: + type: string + format: date-time + nullable: true + description: "Explicit datetime for the next rotation. Mutually exclusive with rotation_period." + example: "2026-06-01T00:00:00Z" + key_transition_period_ms: + type: integer + minimum: 1800000 + description: "Duration in milliseconds during which the previous key remains valid after rotation. Minimum 30 minutes (1800000). Must be less than the full rotation period." + example: 3600000 UpdateApiKeyObject: type: object + description: "All fields are optional. Only include the fields you want to change." properties: name: type: string + maxLength: 100 example: "Development API Key" description: type: string + maxLength: 200 example: "API key for development environment" + scopes: + type: array + minItems: 1 + items: + type: string + description: "Replaces the entire scope list on the key." + example: ["completions.write"] + defaults: + type: object + nullable: true + properties: + config_id: + type: string + format: uuid + nullable: true + description: "UUID of the config to pin. Set to null to remove the pinned config (also resets allow_config_override to true)." + example: "f1e2d3c4-b5a6-7890-fedc-ba9876543210" + allow_config_override: + type: boolean + nullable: true + description: "When false, the pinned config_id cannot be overridden at request time." + example: false + metadata: + type: object + nullable: true + additionalProperties: + type: string + description: "Default metadata attached to every request made with this key. Values must be strings." + example: + environment: "development" + team: "backend" + usage_limits: + $ref: "#/components/schemas/UsageLimits" rate_limits: type: array + nullable: true items: type: object + required: + - type + - unit + - value properties: type: type: string + enum: ["requests", "tokens"] example: "requests" unit: type: string + enum: ["rpd", "rph", "rpm", "rps", "rpw"] + description: "Rate limit unit: requests/tokens per day, hour, minute, second, or week." example: "rpm" value: type: integer + minimum: 0 example: 100 - usage_limits: - $ref: "#/components/schemas/UsageLimits" + expires_at: + type: string + format: date-time + nullable: true + description: "ISO 8601 datetime at which this key expires." + example: "2026-12-31T23:59:59Z" reset_usage: type: boolean - description: Whether to reset current usage. If the current status is exhausted, this will change it back to active. + description: "When true, resets the accumulated usage counter. If the key status is exhausted, this will restore it to active." example: true - scopes: + alert_emails: type: array + nullable: true items: type: string - example: ["completions.write"] - defaults: + format: email + description: "Email addresses to notify when usage limits are approaching the alert_threshold." + example: ["admin@example.com"] + rotation_policy: type: object + nullable: true + description: "Update or replace the automatic key rotation configuration. Requires either rotation_period or next_rotation_at." properties: - metadata: - type: object - additionalProperties: true - example: - environment: "development" - team: "backend" - config_id: + rotation_period: type: string - example: config-abc - alert_emails: - type: array - items: - type: string - format: email - example: "foo@bar.com" + enum: ["weekly", "monthly"] + nullable: true + description: "How often to automatically rotate the key." + example: "monthly" + next_rotation_at: + type: string + format: date-time + nullable: true + description: "Explicit datetime for the next rotation. Mutually exclusive with rotation_period." + example: "2026-06-01T00:00:00Z" + key_transition_period_ms: + type: integer + minimum: 1800000 + description: "Duration in milliseconds during which the previous key remains valid after rotation. Minimum 30 minutes (1800000). Must be less than the full rotation period." + example: 3600000 RotateApiKeyRequest: type: object @@ -34616,10 +34760,10 @@ components: type: array description: Array of guardrail checks to apply items: - $ref: '#/components/schemas/GuardrailCheck' + $ref: "#/components/schemas/GuardrailCheck" minItems: 1 actions: - $ref: '#/components/schemas/GuardrailActions' + $ref: "#/components/schemas/GuardrailActions" UpdateGuardrailRequest: type: object @@ -34631,10 +34775,10 @@ components: type: array description: Updated array of guardrail checks items: - $ref: '#/components/schemas/GuardrailCheck' + $ref: "#/components/schemas/GuardrailCheck" minItems: 1 actions: - $ref: '#/components/schemas/GuardrailActions' + $ref: "#/components/schemas/GuardrailActions" GuardrailActions: type: object @@ -34766,38 +34910,38 @@ components: - "panw-prisma-airs.intercept" parameters: oneOf: - - $ref: '#/components/schemas/JWTParameters' - - $ref: '#/components/schemas/ModelWhitelistParameters' - - $ref: '#/components/schemas/RegexMatchParameters' - - $ref: '#/components/schemas/SentenceCountParameters' - - $ref: '#/components/schemas/WordCountParameters' - - $ref: '#/components/schemas/CharacterCountParameters' - - $ref: '#/components/schemas/JSONSchemaParameters' - - $ref: '#/components/schemas/JSONKeysParameters' - - $ref: '#/components/schemas/ContainsParameters' - - $ref: '#/components/schemas/ValidUrlsParameters' - - $ref: '#/components/schemas/ContainsCodeParameters' - - $ref: '#/components/schemas/WebhookParameters' - - $ref: '#/components/schemas/EndsWithParameters' - - $ref: '#/components/schemas/UppercaseParameters' - - $ref: '#/components/schemas/RequiredMetadataKeysParameters' - - $ref: '#/components/schemas/AllowedRequestTypesParameters' - - $ref: '#/components/schemas/SydeGuardParameters' - - $ref: '#/components/schemas/AporiaParameters' - - $ref: '#/components/schemas/PillarScanParameters' - - $ref: '#/components/schemas/PatronusParameters' - - $ref: '#/components/schemas/PatronusCustomParameters' - - $ref: '#/components/schemas/PortkeyModerationParameters' - - $ref: '#/components/schemas/PortkeyLanguageParameters' - - $ref: '#/components/schemas/PortkeyPIIParameters' - - $ref: '#/components/schemas/MistralModerationParameters' - - $ref: '#/components/schemas/BedrockGuardParameters' - - $ref: '#/components/schemas/PromptfooParameters' - - $ref: '#/components/schemas/AcuvityScanParameters' - - $ref: '#/components/schemas/AzureContentSafetyParameters' - - $ref: '#/components/schemas/AzurePIIParameters' - - $ref: '#/components/schemas/PANWPrismaParameters' - - $ref: '#/components/schemas/BasicParameters' + - $ref: "#/components/schemas/JWTParameters" + - $ref: "#/components/schemas/ModelWhitelistParameters" + - $ref: "#/components/schemas/RegexMatchParameters" + - $ref: "#/components/schemas/SentenceCountParameters" + - $ref: "#/components/schemas/WordCountParameters" + - $ref: "#/components/schemas/CharacterCountParameters" + - $ref: "#/components/schemas/JSONSchemaParameters" + - $ref: "#/components/schemas/JSONKeysParameters" + - $ref: "#/components/schemas/ContainsParameters" + - $ref: "#/components/schemas/ValidUrlsParameters" + - $ref: "#/components/schemas/ContainsCodeParameters" + - $ref: "#/components/schemas/WebhookParameters" + - $ref: "#/components/schemas/EndsWithParameters" + - $ref: "#/components/schemas/UppercaseParameters" + - $ref: "#/components/schemas/RequiredMetadataKeysParameters" + - $ref: "#/components/schemas/AllowedRequestTypesParameters" + - $ref: "#/components/schemas/SydeGuardParameters" + - $ref: "#/components/schemas/AporiaParameters" + - $ref: "#/components/schemas/PillarScanParameters" + - $ref: "#/components/schemas/PatronusParameters" + - $ref: "#/components/schemas/PatronusCustomParameters" + - $ref: "#/components/schemas/PortkeyModerationParameters" + - $ref: "#/components/schemas/PortkeyLanguageParameters" + - $ref: "#/components/schemas/PortkeyPIIParameters" + - $ref: "#/components/schemas/MistralModerationParameters" + - $ref: "#/components/schemas/BedrockGuardParameters" + - $ref: "#/components/schemas/PromptfooParameters" + - $ref: "#/components/schemas/AcuvityScanParameters" + - $ref: "#/components/schemas/AzureContentSafetyParameters" + - $ref: "#/components/schemas/AzurePIIParameters" + - $ref: "#/components/schemas/PANWPrismaParameters" + - $ref: "#/components/schemas/BasicParameters" description: Configuration parameters specific to the check type name: type: string @@ -34850,7 +34994,7 @@ components: type: array description: Array of guardrail summaries items: - $ref: '#/components/schemas/GuardrailSummary' + $ref: "#/components/schemas/GuardrailSummary" total: type: integer description: Total number of guardrails available @@ -34908,18 +35052,18 @@ components: GuardrailDetails: allOf: - - $ref: '#/components/schemas/GuardrailSummary' + - $ref: "#/components/schemas/GuardrailSummary" - type: object properties: checks: type: array description: Array of configured guardrail checks items: - $ref: '#/components/schemas/GuardrailCheck' + $ref: "#/components/schemas/GuardrailCheck" actions: - $ref: '#/components/schemas/GuardrailActions' + $ref: "#/components/schemas/GuardrailActions" -# Detailed parameter schemas for specific guardrail types + # Detailed parameter schemas for specific guardrail types JWTParameters: title: JWT Parameters type: object @@ -35769,7 +35913,7 @@ components: type: object description: Basic parameters with no specific requirements additionalProperties: true - + BedrockBatchJob: type: object required: @@ -35781,7 +35925,7 @@ components: description: Job name for the batch job output_data_config: type: string - description: Batch job's output storage location, will be constructed based on `input_file_id` if not provided + description: Batch job"s output storage location, will be constructed based on `input_file_id` if not provided model: type: string description: Model to start batch job with @@ -35808,7 +35952,7 @@ components: description: Job name for the batch job output_data_config: type: string - description: Batch job's output storage location, will be constructed based on `input_file_id` if not provided + description: Batch job"s output storage location, will be constructed based on `input_file_id` if not provided model: type: string description: Model to start batch job with @@ -35852,7 +35996,7 @@ components: description: Job name for the batch job output_data_config: type: string - description: Batch job's output storage location, will be constructed based on `input_file_id` if not provided + description: Batch job"s output storage location, will be constructed based on `input_file_id` if not provided model: type: string description: Model to start batch job with @@ -35873,7 +36017,7 @@ components: description: Job name for the batch job output_data_config: type: string - description: Batch job's output storage location, will be constructed based on `input_file_id` if not provided + description: Batch job"s output storage location, will be constructed based on `input_file_id` if not provided model: type: string description: Model to start batch job with @@ -35891,7 +36035,7 @@ components: description: Job name for the batch job output_data_config: type: string - description: Batch job's output storage location, will be constructed based on `input_file_id` if not provided + description: Batch job"s output storage location, will be constructed based on `input_file_id` if not provided model: type: string description: Model to start batch job with @@ -35937,7 +36081,7 @@ components: description: Job name for the batch job output_data_config: type: string - description: Batch job's output storage location, will be constructed based on `input_file_id` if not provided + description: Batch job"s output storage location, will be constructed based on `input_file_id` if not provided model: type: string description: Model to start batch job with @@ -36000,13 +36144,13 @@ components: type: array minItems: 1 items: - $ref: '#/components/schemas/Condition' + $ref: "#/components/schemas/Condition" description: Array of conditions that define which requests the policy applies to group_by: type: array minItems: 1 items: - $ref: '#/components/schemas/GroupBy' + $ref: "#/components/schemas/GroupBy" description: Array of group by fields that define how usage is aggregated type: type: string @@ -36077,13 +36221,13 @@ components: type: array minItems: 1 items: - $ref: '#/components/schemas/Condition' + $ref: "#/components/schemas/Condition" description: Array of conditions that define which requests the policy applies to group_by: type: array minItems: 1 items: - $ref: '#/components/schemas/GroupBy' + $ref: "#/components/schemas/GroupBy" description: Array of group by fields that define how usage is aggregated type: type: string @@ -36145,12 +36289,12 @@ components: conditions: type: array items: - $ref: '#/components/schemas/Condition' + $ref: "#/components/schemas/Condition" description: Array of conditions group_by: type: array items: - $ref: '#/components/schemas/GroupBy' + $ref: "#/components/schemas/GroupBy" description: Array of group by fields type: type: string @@ -36191,7 +36335,7 @@ components: value_key_usage_map: type: object additionalProperties: - $ref: '#/components/schemas/ValueKeyUsage' + $ref: "#/components/schemas/ValueKeyUsage" description: Map of value keys to usage information (only included when include_usage=true) ValueKeyUsage: @@ -36235,12 +36379,12 @@ components: conditions: type: array items: - $ref: '#/components/schemas/Condition' + $ref: "#/components/schemas/Condition" description: Array of conditions group_by: type: array items: - $ref: '#/components/schemas/GroupBy' + $ref: "#/components/schemas/GroupBy" description: Array of group by fields type: type: string @@ -36295,14 +36439,14 @@ components: data: type: array items: - $ref: '#/components/schemas/UsageLimitsPolicy' + $ref: "#/components/schemas/UsageLimitsPolicy" total: type: integer description: Total number of policies UsageLimitsPolicyResponse: allOf: - - $ref: '#/components/schemas/UsageLimitsPolicy' + - $ref: "#/components/schemas/UsageLimitsPolicy" - type: object properties: object: @@ -36331,7 +36475,7 @@ components: data: type: array items: - $ref: '#/components/schemas/UsageLimitsPolicyEntity' + $ref: "#/components/schemas/UsageLimitsPolicyEntity" total: type: integer description: Total number of entities @@ -36345,14 +36489,14 @@ components: data: type: array items: - $ref: '#/components/schemas/RateLimitsPolicy' + $ref: "#/components/schemas/RateLimitsPolicy" total: type: integer description: Total number of policies RateLimitsPolicyResponse: allOf: - - $ref: '#/components/schemas/RateLimitsPolicy' + - $ref: "#/components/schemas/RateLimitsPolicy" - type: object properties: object: @@ -36378,7 +36522,7 @@ components: description: Workspace ID (optional; to create at workspace level) slug: type: string - pattern: '^[a-zA-Z0-9_-]+$' + pattern: "^[a-zA-Z0-9_-]+$" description: Optional slug; must be unique within organisation name: type: string @@ -36537,7 +36681,7 @@ components: description: type: string nullable: true - workspaces_count: + workspaces_count: type: number nullable: true @@ -36858,7 +37002,7 @@ components: description: MCP Integration ID (UUID) or slug slug: type: string - pattern: '^[a-zA-Z0-9_-]+$' + pattern: "^[a-zA-Z0-9_-]+$" minLength: 3 maxLength: 50 description: Optional slug; must be unique within organisation From 2d1a2d97c5a5e3ed400148e8c2f38d32ecd69694 Mon Sep 17 00:00:00 2001 From: Krishna Chandra Date: Wed, 22 Apr 2026 01:12:18 +0530 Subject: [PATCH 2/8] fix: quotes --- openapi.yaml | 7148 +++++++++++++++++++++++++------------------------- 1 file changed, 3574 insertions(+), 3574 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 1704d9de..40fefa13 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: title: Portkey API description: The Portkey REST API. Please see https://portkey.ai/docs/api-reference for more details. - version: "2.0.0" + version: '2.0.0' termsOfService: https://portkey.ai/terms contact: name: Portkey Developer Forum @@ -150,27 +150,27 @@ paths: - Chat summary: Chat parameters: - - $ref: "#/components/parameters/PortkeyTraceId" - - $ref: "#/components/parameters/PortkeySpanId" - - $ref: "#/components/parameters/PortkeyParentSpanId" - - $ref: "#/components/parameters/PortkeySpanName" - - $ref: "#/components/parameters/PortkeyMetadata" - - $ref: "#/components/parameters/PortkeyCacheNamespace" - - $ref: "#/components/parameters/PortkeyCacheForceRefresh" + - $ref: '#/components/parameters/PortkeyTraceId' + - $ref: '#/components/parameters/PortkeySpanId' + - $ref: '#/components/parameters/PortkeyParentSpanId' + - $ref: '#/components/parameters/PortkeySpanName' + - $ref: '#/components/parameters/PortkeyMetadata' + - $ref: '#/components/parameters/PortkeyCacheNamespace' + - $ref: '#/components/parameters/PortkeyCacheForceRefresh' requestBody: required: true content: application/json: schema: - $ref: "#/components/schemas/CreateChatCompletionRequest" + $ref: '#/components/schemas/CreateChatCompletionRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/CreateChatCompletionResponse" + $ref: '#/components/schemas/CreateChatCompletionResponse' security: - Portkey-Key: [] Virtual-Key: [] @@ -192,7 +192,7 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d "{ + -d '{ "model": "gpt-5", "messages": [ { @@ -205,7 +205,7 @@ paths: } ], "max_completion_tokens": 250 - }" + }' - lang: cURL label: Self-Hosted source: | @@ -213,7 +213,7 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d "{ + -d '{ "model": "gpt-5", "messages": [ { @@ -226,7 +226,7 @@ paths: } ], "max_completion_tokens": 250 - }" + }' - lang: python label: Default source: | @@ -271,11 +271,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const portkey = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -292,12 +292,12 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const portkey = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY", - baseUrl: "SELF_HOSTED_GATEWAY_URL" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY', + baseUrl: 'SELF_HOSTED_GATEWAY_URL' }); async function main() { @@ -319,15 +319,15 @@ paths: tags: - Realtime summary: Realtime - description: "Connect to the Realtime API endpoint." + description: 'Connect to the Realtime API endpoint.' parameters: - - $ref: "#/components/parameters/PortkeyTraceId" - - $ref: "#/components/parameters/PortkeySpanId" - - $ref: "#/components/parameters/PortkeyParentSpanId" - - $ref: "#/components/parameters/PortkeySpanName" - - $ref: "#/components/parameters/PortkeyMetadata" - - $ref: "#/components/parameters/PortkeyCacheNamespace" - - $ref: "#/components/parameters/PortkeyCacheForceRefresh" + - $ref: '#/components/parameters/PortkeyTraceId' + - $ref: '#/components/parameters/PortkeySpanId' + - $ref: '#/components/parameters/PortkeyParentSpanId' + - $ref: '#/components/parameters/PortkeySpanName' + - $ref: '#/components/parameters/PortkeyMetadata' + - $ref: '#/components/parameters/PortkeyCacheNamespace' + - $ref: '#/components/parameters/PortkeyCacheForceRefresh' - name: model in: query required: false @@ -335,7 +335,7 @@ paths: type: string description: Often required for OpenAI-style realtime; other query params pass through unchanged. responses: - "101": + '101': description: WebSocket upgrade. default: description: Error @@ -369,30 +369,30 @@ paths: - lang: javascript label: Default source: | - import WebSocket from "ws"; + import WebSocket from 'ws'; const ws = new WebSocket( - "wss://api.portkey.ai/v1/realtime?model=gpt-4o-realtime-preview", + 'wss://api.portkey.ai/v1/realtime?model=gpt-4o-realtime-preview', { headers: { - "x-portkey-api-key": process.env.PORTKEY_API_KEY, - "x-portkey-virtual-key": process.env.PORTKEY_PROVIDER_VIRTUAL_KEY, + 'x-portkey-api-key': process.env.PORTKEY_API_KEY, + 'x-portkey-virtual-key': process.env.PORTKEY_PROVIDER_VIRTUAL_KEY, }, } ); - lang: javascript label: Self-Hosted source: | - import WebSocket from "ws"; + import WebSocket from 'ws'; const u = new URL(process.env.SELF_HOSTED_GATEWAY_URL); - u.protocol = u.protocol === "https:" ? "wss:" : "ws:"; - u.pathname = `${u.pathname.replace(/\/$/, "")}/realtime`; - u.searchParams.set("model", "gpt-4o-realtime-preview"); + u.protocol = u.protocol === 'https:' ? 'wss:' : 'ws:'; + u.pathname = `${u.pathname.replace(/\/$/, '')}/realtime`; + u.searchParams.set('model', 'gpt-4o-realtime-preview'); new WebSocket(u.toString(), { headers: { - "x-portkey-api-key": process.env.PORTKEY_API_KEY, - "x-portkey-virtual-key": process.env.PORTKEY_PROVIDER_VIRTUAL_KEY, + 'x-portkey-api-key': process.env.PORTKEY_API_KEY, + 'x-portkey-virtual-key': process.env.PORTKEY_PROVIDER_VIRTUAL_KEY, }, }); - lang: python @@ -446,14 +446,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateCompletionRequest" + $ref: '#/components/schemas/CreateCompletionRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/CreateCompletionResponse" + $ref: '#/components/schemas/CreateCompletionResponse' security: - Portkey-Key: [] Virtual-Key: [] @@ -475,12 +475,12 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d "{ + -d '{ "model": "gpt-3.5-turbo-instruct", "prompt": "Say this is a test", "max_tokens": 7, "temperature": 0 - }" + }' - lang: python label: Default source: | @@ -502,11 +502,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const portkey = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -524,12 +524,12 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const portkey = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY", - baseUrl: "SELF_HOSTED_GATEWAY_URL" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY', + baseUrl: 'SELF_HOSTED_GATEWAY_URL' }); async function main() { @@ -570,12 +570,12 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d "{ + -d '{ "model": "gpt-3.5-turbo-instruct", "prompt": "Say this is a test", "max_tokens": 7, "temperature": 0 - }" + }' /collections: servers: *ControlPlaneServers @@ -605,7 +605,7 @@ paths: required: - name responses: - "200": + '200': description: Collection created successfully content: application/json: @@ -619,15 +619,15 @@ paths: slug: type: string description: Slug of the created collection - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Workspace or parent collection not found - "500": + '500': description: Server error get: @@ -665,7 +665,7 @@ paths: type: string description: Search query to filter collections by name responses: - "200": + '200': description: List of collections content: application/json: @@ -678,16 +678,16 @@ paths: data: type: array items: - $ref: "#/components/schemas/CollectionWithDetails" - "400": + $ref: '#/components/schemas/CollectionWithDetails' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Workspace not found - "500": + '500': description: Server error /collections/{collectionId}: @@ -708,24 +708,24 @@ paths: security: - Portkey-Key: [] responses: - "200": + '200': description: Collection details content: application/json: schema: - $ref: "#/components/schemas/CollectionWithChildCollections" - "401": + $ref: '#/components/schemas/CollectionWithChildCollections' + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Collection not found - "500": + '500': description: Server error put: summary: Update collection - description: Updates a collection"s details + description: Updates a collection's details security: - Portkey-Key: [] tags: @@ -743,7 +743,7 @@ paths: required: - name responses: - "200": + '200': description: OK headers: Content-Type: @@ -755,15 +755,15 @@ paths: schema: type: object example: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Collection not found - "500": + '500': description: Server error delete: @@ -774,7 +774,7 @@ paths: tags: - Collections responses: - "200": + '200': description: OK headers: Content-Type: @@ -786,13 +786,13 @@ paths: schema: type: object example: {} - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Collection not found or trying to delete default collection - "500": + '500': description: Server error /labels: @@ -810,25 +810,25 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateLabelRequest" + $ref: '#/components/schemas/CreateLabelRequest' responses: - "200": + '200': description: Label created successfully content: application/json: schema: - $ref: "#/components/schemas/CreateLabelResponse" - "400": + $ref: '#/components/schemas/CreateLabelResponse' + '400': description: Invalid request content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "401": + $ref: '#/components/schemas/ErrorResponse' + '401': description: Unauthorized - "403": + '403': description: Forbidden - "500": + '500': description: Server error get: @@ -869,23 +869,23 @@ paths: minimum: 1 description: Number of items per page responses: - "200": + '200': description: List of labels content: application/json: schema: - $ref: "#/components/schemas/ListLabelsResponse" - "400": + $ref: '#/components/schemas/ListLabelsResponse' + '400': description: Invalid request content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "401": + $ref: '#/components/schemas/ErrorResponse' + '401': description: Unauthorized - "403": + '403': description: Forbidden - "500": + '500': description: Server error /labels/{labelId}: @@ -918,25 +918,25 @@ paths: type: string description: ID or slug of the workspace responses: - "200": + '200': description: Label details content: application/json: schema: - $ref: "#/components/schemas/Label" - "400": + $ref: '#/components/schemas/Label' + '400': description: Invalid request content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "401": + $ref: '#/components/schemas/ErrorResponse' + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Label not found - "500": + '500': description: Server error put: @@ -960,9 +960,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/UpdateLabelRequest" + $ref: '#/components/schemas/UpdateLabelRequest' responses: - "200": + '200': description: OK headers: Content-Type: @@ -974,19 +974,19 @@ paths: schema: type: object example: {} - "400": + '400': description: Invalid request content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "401": + $ref: '#/components/schemas/ErrorResponse' + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Label not found - "500": + '500': description: Server error delete: @@ -1006,7 +1006,7 @@ paths: format: uuid description: ID of the label to delete responses: - "200": + '200': description: OK headers: Content-Type: @@ -1018,19 +1018,19 @@ paths: schema: type: object example: {} - "400": + '400': description: Invalid request content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "401": + $ref: '#/components/schemas/ErrorResponse' + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Label not found - "500": + '500': description: Server err /prompts: @@ -1092,7 +1092,7 @@ paths: type: object description: Metadata for the prompt responses: - "200": + '200': description: Prompt created successfully content: application/json: @@ -1109,14 +1109,14 @@ paths: format: uuid object: type: string - enum: ["prompt"] - "400": + enum: ['prompt'] + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "500": + '500': description: Server error get: @@ -1148,7 +1148,7 @@ paths: schema: type: string responses: - "200": + '200': description: List of prompts content: application/json: @@ -1158,16 +1158,16 @@ paths: data: type: array items: - $ref: "#/components/schemas/PromptSummary" + $ref: '#/components/schemas/PromptSummary' total: type: integer - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "500": + '500': description: Server error /prompts/{promptId}: @@ -1186,27 +1186,27 @@ paths: schema: type: string responses: - "200": + '200': description: Prompt details content: application/json: schema: - $ref: "#/components/schemas/Prompt" - "400": + $ref: '#/components/schemas/Prompt' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt not found - "500": + '500': description: Server error put: summary: Update a prompt description: | - Update a prompt"s metadata and/or create a new version with updated template content. + Update a prompt's metadata and/or create a new version with updated template content. **Partial version updates:** Set `patch: true` to perform a partial update of version fields (`string`, `parameters`, `model`, `virtual_key`, `version_description`, `functions`, `tools`, `tool_choice`, `is_raw_template`, `prompt_metadata`). When enabled, any version fields omitted from the request are backfilled from the current latest version, allowing you to update only the fields you need. When `patch` is omitted or `false`, all version fields must be provided together (original strict validation). @@ -1273,7 +1273,7 @@ paths: type: object description: Additional metadata for the prompt version. When `patch` is `true`, this field is optional and will be inherited from the current latest version if omitted. responses: - "200": + '200': description: Prompt updated successfully content: application/json: @@ -1288,15 +1288,15 @@ paths: prompt_version_id: type: string format: uuid - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt not found - "500": + '500': description: Server error delete: @@ -1313,22 +1313,22 @@ paths: schema: type: string responses: - "200": + '200': description: Prompt deleted successfully content: application/json: schema: type: object properties: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt not found - "500": + '500': description: Server error /prompts/{promptId}/versions: @@ -1347,23 +1347,23 @@ paths: schema: type: string responses: - "200": + '200': description: List of prompt versions content: application/json: schema: type: array items: - $ref: "#/components/schemas/PromptVersionSummary" - "400": + $ref: '#/components/schemas/PromptVersionSummary' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt not found - "500": + '500': description: Server error /prompts/{promptId}/versions/{versionId}: @@ -1388,21 +1388,21 @@ paths: type: string format: uuid responses: - "200": + '200': description: Prompt version details content: application/json: schema: - $ref: "#/components/schemas/Prompt" - "400": + $ref: '#/components/schemas/Prompt' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt version not found - "500": + '500': description: Server error put: @@ -1440,22 +1440,22 @@ paths: format: uuid description: The label to assign to this version. responses: - "200": + '200': description: Prompt version updated successfully content: application/json: schema: type: object properties: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt version not found - "500": + '500': description: Server error /prompts/{promptId}/makeDefault: @@ -1486,22 +1486,22 @@ paths: type: number description: Version Number to set as default responses: - "200": + '200': description: Default version set successfully content: application/json: schema: type: object properties: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt or version not found - "500": + '500': description: Server error /prompts/partials: @@ -1534,7 +1534,7 @@ paths: version_description: type: string responses: - "200": + '200': description: Prompt partial created successfully content: application/json: @@ -1549,13 +1549,13 @@ paths: version_id: type: string format: uuid - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "500": + '500': description: Server error get: @@ -1571,23 +1571,23 @@ paths: schema: type: string responses: - "200": + '200': description: List of prompt partials content: application/json: schema: type: array items: - $ref: "#/components/schemas/PromptPartialSummary" - "400": + $ref: '#/components/schemas/PromptPartialSummary' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Not found - "500": + '500': description: Server error /prompts/partials/{promptPartialId}: @@ -1606,21 +1606,21 @@ paths: schema: type: string responses: - "200": + '200': description: Prompt partial details content: application/json: schema: - $ref: "#/components/schemas/PromptPartial" - "400": + $ref: '#/components/schemas/PromptPartial' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt partial not found - "500": + '500': description: Server error put: @@ -1652,7 +1652,7 @@ paths: status: type: string responses: - "200": + '200': description: Prompt partial updated successfully content: application/json: @@ -1662,15 +1662,15 @@ paths: prompt_partial_version_id: type: string format: uuid - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt partial not found - "500": + '500': description: Server error delete: @@ -1687,22 +1687,22 @@ paths: schema: type: string responses: - "200": + '200': description: Prompt partial deleted successfully content: application/json: schema: type: object properties: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt partial not found - "500": + '500': description: Server error /prompts/partials/{promptPartialId}/versions: @@ -1721,23 +1721,23 @@ paths: schema: type: string responses: - "200": + '200': description: List of prompt partial versions content: application/json: schema: type: array items: - $ref: "#/components/schemas/PromptPartialVersion" - "400": + $ref: '#/components/schemas/PromptPartialVersion' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt partial not found - "500": + '500': description: Server error /prompts/partials/{promptPartialId}/makeDefault: @@ -1768,22 +1768,22 @@ paths: type: number description: Version Number to set as default responses: - "200": + '200': description: Default version set successfully content: application/json: schema: type: object properties: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt partial or version not found - "500": + '500': description: Server error /prompts/{promptId}/completions: @@ -1812,7 +1812,7 @@ paths: required: - variables description: | - Note: Although hyperparameters are shown grouped here (like messages, max_completion_tokens, temperature, etc.), they should only be passed at the root level, alongside "variables" and "stream". The `max_tokens` parameter is deprecated — use `max_completion_tokens` instead. + Note: Although hyperparameters are shown grouped here (like messages, max_completion_tokens, temperature, etc.), they should only be passed at the root level, alongside 'variables' and 'stream'. The `max_tokens` parameter is deprecated — use `max_completion_tokens` instead. properties: variables: type: object @@ -1820,18 +1820,18 @@ paths: stream: type: boolean default: False - description: "Default: False. Set to True if you want to stream the response" + description: 'Default: False. Set to True if you want to stream the response' hyperparameters: oneOf: - title: Chat Completions - $ref: "#/components/schemas/CreateChatCompletionRequest" + $ref: '#/components/schemas/CreateChatCompletionRequest' - title: Completions - $ref: "#/components/schemas/CreateCompletionRequest" + $ref: '#/components/schemas/CreateCompletionRequest' description: | **Note**: All hyperparameters are optional. Pass them at the root level, and not nested under `hyperparameters`. Their grouping here is for educational purposes only. responses: - "200": + '200': description: Successful completion response content: application/json: @@ -1847,9 +1847,9 @@ paths: body: oneOf: - title: Chat Completions - $ref: "#/components/schemas/CreateChatCompletionResponse" + $ref: '#/components/schemas/CreateChatCompletionResponse' - title: Completions - $ref: "#/components/schemas/CreateCompletionResponse" + $ref: '#/components/schemas/CreateCompletionResponse' x-code-samples: - lang: cURL @@ -1858,13 +1858,13 @@ paths: curl -X POST "https://api.portkey.ai/v1/prompts/YOUR_PROMPT_ID/completions" \ -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ - -d "{ + -d '{ "variables": { "user_input": "Hello world" }, "max_completion_tokens": 250, "presence_penalty": 0.2 - }" + }' - lang: Python label: Default source: | @@ -1888,10 +1888,10 @@ paths: - lang: JavaScript label: Default source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const portkey = new Portkey({ - apiKey: "PORTKEY_API_KEY" + apiKey: 'PORTKEY_API_KEY' }); const completion = await portkey.prompts.completions.create({ @@ -1910,13 +1910,13 @@ paths: curl -X POST "SELF_HOSTED_GATEWAY_URL/prompts/YOUR_PROMPT_ID/completions" \ -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ - -d "{ + -d '{ "variables": { "user_input": "Hello world" }, "max_completion_tokens": 250, "presence_penalty": 0.2 - }" + }' - lang: python label: Self-Hosted source: | @@ -1940,11 +1940,11 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const portkey = new Portkey({ - apiKey: "PORTKEY_API_KEY", - baseURL: "SELF_HOSTED_GATEWAY_URL" + apiKey: 'PORTKEY_API_KEY', + baseURL: 'SELF_HOSTED_GATEWAY_URL' }); const completion = await portkey.prompts.completions.create({ @@ -1984,7 +1984,7 @@ paths: required: - variables description: | - Note: Although hyperparameters are shown grouped here (like messages, max_completion_tokens, temperature, etc.), they should only be passed at the root level, alongside "variables" and "stream". The `max_tokens` parameter is deprecated — use `max_completion_tokens` instead. + Note: Although hyperparameters are shown grouped here (like messages, max_completion_tokens, temperature, etc.), they should only be passed at the root level, alongside 'variables' and 'stream'. The `max_tokens` parameter is deprecated — use `max_completion_tokens` instead. properties: variables: type: object @@ -1992,34 +1992,34 @@ paths: hyperparameters: oneOf: - title: Chat Completions - $ref: "#/components/schemas/CreateChatCompletionRequest" + $ref: '#/components/schemas/CreateChatCompletionRequest' - title: Completions - $ref: "#/components/schemas/CreateCompletionRequest" + $ref: '#/components/schemas/CreateCompletionRequest' description: | **Note**: All hyperparameters are optional. Pass them at the root level, and not nested under `hyperparameters`. Their grouping here is for educational purposes only. responses: - "200": + '200': description: Successful rendered prompt content: application/json: schema: - $ref: "#/components/schemas/PromptRenderResponse" + $ref: '#/components/schemas/PromptRenderResponse' x-code-samples: - - lang: "cURL" + - lang: 'cURL' label: Default source: | curl -X POST "https://api.portkey.ai/v1/prompts/YOUR_PROMPT_ID/render" \ -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ - -d "{ + -d '{ "variables": { "user_input": "Hello world" }, "max_completion_tokens": 250, "presence_penalty": 0.2 - }" + }' - lang: Python label: Default source: | @@ -2040,13 +2040,13 @@ paths: print(completion) - - lang: "JavaScript" + - lang: 'JavaScript' label: Default source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const portkey = new Portkey({ - apiKey: "PORTKEY_API_KEY" + apiKey: 'PORTKEY_API_KEY' }); const completion = await portkey.prompts.render({ @@ -2059,19 +2059,19 @@ paths: }); console.log(completion); - - lang: "cURL" + - lang: 'cURL' label: Self-Hosted source: | curl -X POST "SELF_HOSTED_GATEWAY_URL/prompts/YOUR_PROMPT_ID/render" \ -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ - -d "{ + -d '{ "variables": { "user_input": "Hello world" }, "max_completion_tokens": 250, "presence_penalty": 0.2 - }" + }' - lang: Python label: Self-Hosted source: | @@ -2093,14 +2093,14 @@ paths: print(completion) - - lang: "JavaScript" + - lang: 'JavaScript' label: Self-Hosted source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const portkey = new Portkey({ - apiKey: "PORTKEY_API_KEY", - baseUrl: "SELF_HOSTED_GATEWAY_URL" + apiKey: 'PORTKEY_API_KEY', + baseUrl: 'SELF_HOSTED_GATEWAY_URL' }); const completion = await portkey.prompts.render({ @@ -2126,442 +2126,442 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateGuardrailRequest" + $ref: '#/components/schemas/CreateGuardrailRequest' examples: # BASIC CATEGORY EXAMPLES jwt_authentication: - summary: "[BASIC] JWT Token Validation" + summary: '[BASIC] JWT Token Validation' value: - name: "JWT Authentication Guard" - organisation_id: "550e8400-e29b-41d4-a716-446655440001" + name: 'JWT Authentication Guard' + organisation_id: '550e8400-e29b-41d4-a716-446655440001' checks: - - id: "default.jwt" + - id: 'default.jwt' parameters: - jwksUri: "https://example.com/.well-known/jwks.json" - headerKey: "Authorization" - algorithms: ["RS256"] + jwksUri: 'https://example.com/.well-known/jwks.json' + headerKey: 'Authorization' + algorithms: ['RS256'] cacheMaxAge: 86400 clockTolerance: 5 - maxTokenAge: "1d" + maxTokenAge: '1d' actions: - onFail: "block" - message: "Invalid JWT token" + onFail: 'block' + message: 'Invalid JWT token' model_whitelist: - summary: "[BASIC] Model Whitelist Control" + summary: '[BASIC] Model Whitelist Control' value: - name: "Allowed Models Only" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'Allowed Models Only' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "default.modelWhitelist" + - id: 'default.modelWhitelist' parameters: models: [ - "gpt-4", - "gpt-3.5-turbo", - "claude-3-sonnet", - "claude-3-haiku", + 'gpt-4', + 'gpt-3.5-turbo', + 'claude-3-sonnet', + 'claude-3-haiku', ] actions: - onFail: "block" - message: "Model not in approved whitelist" + onFail: 'block' + message: 'Model not in approved whitelist' allowed_request_types: - summary: "[BASIC] Restrict to Chat and Embed Only" + summary: '[BASIC] Restrict to Chat and Embed Only' value: - name: "Restrict to Chat and Embed Only" + name: 'Restrict to Chat and Embed Only' checks: - - id: "default.allowedRequestTypes" + - id: 'default.allowedRequestTypes' parameters: - allowedTypes: ["chatComplete", "embed"] + allowedTypes: ['chatComplete', 'embed'] actions: - on_fail: "deny" - on_success: "continue" + on_fail: 'deny' + on_success: 'continue' case_validation: - summary: "[BASIC] Case Validation Checks" + summary: '[BASIC] Case Validation Checks' value: - name: "Text Case Validation" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'Text Case Validation' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "default.isAllLowerCase" - - id: "default.alluppercase" + - id: 'default.isAllLowerCase' + - id: 'default.alluppercase' parameters: not: true actions: - onFail: "log" - message: "Text case validation failed" + onFail: 'log' + message: 'Text case validation failed' content_regex: - summary: "[BASIC] Regex Pattern Matching" + summary: '[BASIC] Regex Pattern Matching' value: - name: "Content Pattern Validation" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'Content Pattern Validation' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "default.regexMatch" + - id: 'default.regexMatch' parameters: rule: "\\b(inappropriate|banned|harmful|offensive)\\b" not: false - - id: "default.endsWith" + - id: 'default.endsWith' parameters: - suffix: "." + suffix: '.' not: false actions: - onFail: "block" - message: "Content violates pattern rules" + onFail: 'block' + message: 'Content violates pattern rules' length_controls: - summary: "[BASIC] Content Length Controls" + summary: '[BASIC] Content Length Controls' value: - name: "Content Length Validation" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'Content Length Validation' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "default.wordCount" + - id: 'default.wordCount' parameters: minWords: 5 maxWords: 500 not: false - - id: "default.sentenceCount" + - id: 'default.sentenceCount' parameters: minSentences: 1 maxSentences: 20 not: false - - id: "default.characterCount" + - id: 'default.characterCount' parameters: minCharacters: 10 maxCharacters: 4000 not: false actions: - onFail: "block" - message: "Content length out of bounds" + onFail: 'block' + message: 'Content length out of bounds' json_validation: - summary: "[BASIC] JSON Structure Validation" + summary: '[BASIC] JSON Structure Validation' value: - name: "JSON Response Validation" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'JSON Response Validation' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "default.jsonSchema" + - id: 'default.jsonSchema' parameters: schema: - type: "object" + type: 'object' properties: result: - type: "string" + type: 'string' confidence: - type: "number" + type: 'number' minimum: 0 maximum: 1 metadata: - type: "object" - required: ["result"] + type: 'object' + required: ['result'] not: false - - id: "default.jsonKeys" + - id: 'default.jsonKeys' parameters: - keys: ["result", "timestamp", "id"] - operator: "all" + keys: ['result', 'timestamp', 'id'] + operator: 'all' actions: - onFail: "block" - message: "Response does not match expected format" + onFail: 'block' + message: 'Response does not match expected format' content_analysis: - summary: "[BASIC] Content Analysis Checks" + summary: '[BASIC] Content Analysis Checks' value: - name: "Content Quality Checks" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'Content Quality Checks' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "default.contains" + - id: 'default.contains' parameters: - words: ["please", "thank you", "help"] - operator: "any" - - id: "default.validUrls" + words: ['please', 'thank you', 'help'] + operator: 'any' + - id: 'default.validUrls' parameters: onlyDNS: true not: false - - id: "default.containsCode" + - id: 'default.containsCode' parameters: - format: "SQL" + format: 'SQL' not: true actions: - onFail: "warn" - message: "Content quality check failed" + onFail: 'warn' + message: 'Content quality check failed' webhook_integration: - summary: "[BASIC] Custom Webhook Validation" + summary: '[BASIC] Custom Webhook Validation' value: - name: "External Validation Service" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'External Validation Service' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "default.webhook" + - id: 'default.webhook' parameters: - webhookURL: "https://api.example.com/validate-content" + webhookURL: 'https://api.example.com/validate-content' headers: - "Authorization": "Bearer token123" - "Content-Type": "application/json" - "X-API-Version": "v1" + 'Authorization': 'Bearer token123' + 'Content-Type': 'application/json' + 'X-API-Version': 'v1' timeout: 5000 failOnError: true actions: - onFail: "block" - message: "External validation failed" + onFail: 'block' + message: 'External validation failed' metadata_validation: - summary: "[BASIC] Required Metadata Keys" + summary: '[BASIC] Required Metadata Keys' value: - name: "Metadata Requirement Check" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'Metadata Requirement Check' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "default.requiredMetadataKeys" + - id: 'default.requiredMetadataKeys' parameters: - metadataKeys: ["user_id", "session_id", "request_type"] - operator: "all" + metadataKeys: ['user_id', 'session_id', 'request_type'] + operator: 'all' actions: - onFail: "block" - message: "Required metadata missing" + onFail: 'block' + message: 'Required metadata missing' # PRO CATEGORY EXAMPLES portkey_moderation: - summary: "[PRO] OpenAI Content Moderation" + summary: '[PRO] OpenAI Content Moderation' value: - name: "Advanced Content Moderation" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'Advanced Content Moderation' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "portkey.moderateContent" + - id: 'portkey.moderateContent' parameters: categories: [ - "hate/threatening", - "harassment/threatening", - "self-harm/intent", - "sexual/minors", - "violence/graphic", + 'hate/threatening', + 'harassment/threatening', + 'self-harm/intent', + 'sexual/minors', + 'violence/graphic', ] timeout: 5000 actions: - onFail: "block" - message: "Content flagged by moderation system" + onFail: 'block' + message: 'Content flagged by moderation system' portkey_language: - summary: "[PRO] Language Detection & Validation" + summary: '[PRO] Language Detection & Validation' value: - name: "Multi-Language Support" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'Multi-Language Support' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "portkey.language" + - id: 'portkey.language' parameters: - language: "eng_Latn" + language: 'eng_Latn' not: false timeout: 5000 actions: - onFail: "block" - message: "Content not in expected language" + onFail: 'block' + message: 'Content not in expected language' portkey_pii: - summary: "[PRO] Advanced PII Detection" + summary: '[PRO] Advanced PII Detection' value: - name: "PII Protection System" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'PII Protection System' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "portkey.pii" + - id: 'portkey.pii' parameters: redact: true categories: [ - "EMAIL_ADDRESS", - "PHONE_NUMBER", - "SSN", - "CREDIT_CARD", - "NAME", + 'EMAIL_ADDRESS', + 'PHONE_NUMBER', + 'SSN', + 'CREDIT_CARD', + 'NAME', ] timeout: 5000 actions: - onFail: "block" - message: "PII detected and redacted" + onFail: 'block' + message: 'PII detected and redacted' portkey_gibberish: - summary: "[PRO] Gibberish Detection" + summary: '[PRO] Gibberish Detection' value: - name: "Content Quality Filter" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'Content Quality Filter' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "portkey.gibberish" + - id: 'portkey.gibberish' parameters: timeout: 5000 actions: - onFail: "block" - message: "Content appears to be gibberish" + onFail: 'block' + message: 'Content appears to be gibberish' # PARTNER CATEGORY EXAMPLES sydelabs_security: - summary: "[PARTNER] SydeLabs AI Security" + summary: '[PARTNER] SydeLabs AI Security' value: - name: "AI Security Suite" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'AI Security Suite' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "sydelabs.sydeguard" + - id: 'sydelabs.sydeguard' parameters: prompt_injection_threshold: 0.5 toxicity_threshold: 0.3 evasion_threshold: 0.6 timeout: 5000 actions: - onFail: "block" - message: "AI security check failed" + onFail: 'block' + message: 'AI security check failed' aporia_validation: - summary: "[PARTNER] Aporia Project Validation" + summary: '[PARTNER] Aporia Project Validation' value: - name: "Aporia Policy Enforcement" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'Aporia Policy Enforcement' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "aporia.validateProject" + - id: 'aporia.validateProject' parameters: - projectID: "proj_abc123" + projectID: 'proj_abc123' timeout: 5000 actions: - onFail: "block" - message: "Aporia validation failed" + onFail: 'block' + message: 'Aporia validation failed' pillar_scanning: - summary: "[PARTNER] Pillar Security Scanning" + summary: '[PARTNER] Pillar Security Scanning' value: - name: "Comprehensive Security Scan" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'Comprehensive Security Scan' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "pillar.scanPrompt" + - id: 'pillar.scanPrompt' parameters: scanners: [ - "prompt_injection", - "pii", - "secrets", - "toxic_language", - "invisible_characters", + 'prompt_injection', + 'pii', + 'secrets', + 'toxic_language', + 'invisible_characters', ] timeout: 5000 - - id: "pillar.scanResponse" + - id: 'pillar.scanResponse' parameters: - scanners: ["pii", "secrets", "toxic_language"] + scanners: ['pii', 'secrets', 'toxic_language'] timeout: 5000 actions: - onFail: "block" - message: "Security scan detected issues" + onFail: 'block' + message: 'Security scan detected issues' patronus_comprehensive: - summary: "[PARTNER] Patronus AI Complete Suite" + summary: '[PARTNER] Patronus AI Complete Suite' value: - name: "Patronus Content Analysis" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'Patronus Content Analysis' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "patronus.pii" + - id: 'patronus.pii' parameters: redact: true timeout: 5000 - - id: "patronus.toxicity" + - id: 'patronus.toxicity' parameters: timeout: 5000 - - id: "patronus.noGenderBias" + - id: 'patronus.noGenderBias' parameters: timeout: 15000 - - id: "patronus.isHelpful" + - id: 'patronus.isHelpful' parameters: timeout: 15000 - - id: "patronus.custom" + - id: 'patronus.custom' parameters: - profile: "system:is-concise" + profile: 'system:is-concise' timeout: 15000 actions: - onFail: "block" - message: "Content failed Patronus analysis" + onFail: 'block' + message: 'Content failed Patronus analysis' azure_content_safety: - summary: "[PARTNER] Azure Content Safety Suite" + summary: '[PARTNER] Azure Content Safety Suite' value: - name: "Microsoft Azure Safety" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'Microsoft Azure Safety' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "azure.contentSafety" + - id: 'azure.contentSafety' parameters: - blocklistNames: ["company_blocklist"] - apiVersion: "2024-09-01" + blocklistNames: ['company_blocklist'] + apiVersion: '2024-09-01' severity: 2 - categories: ["Hate", "SelfHarm", "Sexual", "Violence"] + categories: ['Hate', 'SelfHarm', 'Sexual', 'Violence'] timeout: 5000 - - id: "azure.pii" + - id: 'azure.pii' parameters: - domain: "phi" - apiVersion: "2024-11-01" - modelVersion: "latest" + domain: 'phi' + apiVersion: '2024-11-01' + modelVersion: 'latest' redact: true timeout: 5000 actions: - onFail: "block" - message: "Azure safety checks failed" + onFail: 'block' + message: 'Azure safety checks failed' mistral_moderation: - summary: "[PARTNER] Mistral Content Moderation" + summary: '[PARTNER] Mistral Content Moderation' value: - name: "Mistral AI Moderation" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'Mistral AI Moderation' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "mistral.moderateContent" + - id: 'mistral.moderateContent' parameters: categories: [ - "sexual", - "hate_and_discrimination", - "violence_and_threats", - "selfharm", - "pii", + 'sexual', + 'hate_and_discrimination', + 'violence_and_threats', + 'selfharm', + 'pii', ] timeout: 5000 actions: - onFail: "block" - message: "Mistral moderation flagged content" + onFail: 'block' + message: 'Mistral moderation flagged content' bedrock_enterprise: - summary: "[PARTNER] AWS Bedrock Guardrails" + summary: '[PARTNER] AWS Bedrock Guardrails' value: - name: "Enterprise AWS Security" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'Enterprise AWS Security' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "bedrock.guard" + - id: 'bedrock.guard' parameters: - guardrailVersion: "DRAFT" - guardrailId: "gdrail123abc" + guardrailVersion: 'DRAFT' + guardrailId: 'gdrail123abc' redact: true timeout: 5000 actions: - onFail: "block" - message: "AWS Bedrock guardrail violation" + onFail: 'block' + message: 'AWS Bedrock guardrail violation' promptfoo_testing: - summary: "[PARTNER] Promptfoo Security Testing" + summary: '[PARTNER] Promptfoo Security Testing' value: - name: "Security Testing Suite" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'Security Testing Suite' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "promptfoo.guard" + - id: 'promptfoo.guard' parameters: timeout: 5000 - - id: "promptfoo.pii" + - id: 'promptfoo.pii' parameters: redact: true timeout: 5000 - - id: "promptfoo.harm" + - id: 'promptfoo.harm' parameters: timeout: 5000 actions: - onFail: "block" - message: "Promptfoo security tests failed" + onFail: 'block' + message: 'Promptfoo security tests failed' acuvity_comprehensive: - summary: "[PARTNER] Acuvity Multi-Vector Security" + summary: '[PARTNER] Acuvity Multi-Vector Security' value: - name: "Complete Security Analysis" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'Complete Security Analysis' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "acuvity.scan" + - id: 'acuvity.scan' parameters: prompt_injection: true prompt_injection_threshold: 0.5 @@ -2573,72 +2573,72 @@ paths: biased: true harmful: true language: true - language_values: "english" + language_values: 'english' pii: true pii_redact: true - pii_categories: ["email_address", "ssn", "credit_card"] + pii_categories: ['email_address', 'ssn', 'credit_card'] secrets: true secrets_redact: true secrets_categories: - ["aws_secret_key", "openai", "github"] + ['aws_secret_key', 'openai', 'github'] timeout: 5000 actions: - onFail: "block" - message: "Comprehensive security scan failed" + onFail: 'block' + message: 'Comprehensive security scan failed' lasso_classification: - summary: "[PARTNER] Lasso Security Classification" + summary: '[PARTNER] Lasso Security Classification' value: - name: "Content Classification" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'Content Classification' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "lasso.classify" + - id: 'lasso.classify' parameters: timeout: 5000 actions: - onFail: "block" - message: "Lasso classification failed" + onFail: 'block' + message: 'Lasso classification failed' panw_prisma: - summary: "[PARTNER] PANW Prisma AIRS Enterprise" + summary: '[PARTNER] PANW Prisma AIRS Enterprise' value: - name: "Enterprise Security Runtime" - workspace_id: "550e8400-e29b-41d4-a716-446655440000" + name: 'Enterprise Security Runtime' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' checks: - - id: "panw-prisma-airs.intercept" + - id: 'panw-prisma-airs.intercept' parameters: - profile_name: "enterprise_profile" - ai_model: "gpt-4" - app_user: "api_user_123" + profile_name: 'enterprise_profile' + ai_model: 'gpt-4' + app_user: 'api_user_123' actions: - onFail: "block" - message: "Prisma AIRS blocked request" + onFail: 'block' + message: 'Prisma AIRS blocked request' responses: - "200": + '200': description: Guardrail created successfully content: application/json: schema: - $ref: "#/components/schemas/CreateGuardrailResponse" - "400": + $ref: '#/components/schemas/CreateGuardrailResponse' + '400': description: Bad request - validation failed content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "403": + $ref: '#/components/schemas/ErrorResponse' + '403': description: Forbidden - insufficient permissions or guardrail not allowed content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "500": + $ref: '#/components/schemas/ErrorResponse' + '500': description: Internal server error content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" + $ref: '#/components/schemas/ErrorResponse' get: summary: List guardrails @@ -2675,24 +2675,24 @@ paths: minimum: 0 default: 0 responses: - "200": + '200': description: List of guardrails retrieved successfully content: application/json: schema: - $ref: "#/components/schemas/ListGuardrailsResponse" - "400": + $ref: '#/components/schemas/ListGuardrailsResponse' + '400': description: Bad request - invalid parameters content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "403": + $ref: '#/components/schemas/ErrorResponse' + '403': description: Forbidden - insufficient permissions content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" + $ref: '#/components/schemas/ErrorResponse' /guardrails/{guardrailId}: get: @@ -2711,33 +2711,33 @@ paths: examples: uuid: summary: Using UUID - value: "550e8400-e29b-41d4-a716-446655440000" + value: '550e8400-e29b-41d4-a716-446655440000' slug: summary: Using slug - value: "guard_abc123" + value: 'guard_abc123' responses: - "200": + '200': description: Guardrail details retrieved successfully content: application/json: schema: - $ref: "#/components/schemas/GuardrailDetails" - "403": + $ref: '#/components/schemas/GuardrailDetails' + '403': description: Forbidden - guardrail not found or insufficient permissions content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "500": + $ref: '#/components/schemas/ErrorResponse' + '500': description: Internal server error content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" + $ref: '#/components/schemas/ErrorResponse' put: summary: Update a guardrail - description: Updates an existing guardrail"s name, checks, or actions + description: Updates an existing guardrail's name, checks, or actions operationId: updateGuardrail tags: - Guardrails @@ -2753,26 +2753,26 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/UpdateGuardrailRequest" + $ref: '#/components/schemas/UpdateGuardrailRequest' responses: - "200": + '200': description: Guardrail updated successfully content: application/json: schema: - $ref: "#/components/schemas/UpdateGuardrailResponse" - "400": + $ref: '#/components/schemas/UpdateGuardrailResponse' + '400': description: Bad request - validation failed content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "403": + $ref: '#/components/schemas/ErrorResponse' + '403': description: Forbidden - guardrail not found or insufficient permissions content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" + $ref: '#/components/schemas/ErrorResponse' delete: summary: Delete a guardrail @@ -2788,20 +2788,20 @@ paths: schema: type: string responses: - "200": + '200': description: Guardrail deleted successfully - "403": + '403': description: Forbidden - guardrail not found or insufficient permissions content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "500": + $ref: '#/components/schemas/ErrorResponse' + '500': description: Internal server error content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" + $ref: '#/components/schemas/ErrorResponse' /images/generations: servers: *DataPlaneServers @@ -2815,14 +2815,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateImageRequest" + $ref: '#/components/schemas/CreateImageRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/ImagesResponse" + $ref: '#/components/schemas/ImagesResponse' security: - Portkey-Key: [] Virtual-Key: [] @@ -2844,12 +2844,12 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d "{ + -d '{ "model": "dall-e-3", "prompt": "A cute baby sea otter", "n": 1, "size": "1024x1024" - }" + }' - lang: python label: Default source: | @@ -2869,11 +2869,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -2889,12 +2889,12 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d "{ + -d '{ "model": "dall-e-3", "prompt": "A cute baby sea otter", "n": 1, "size": "1024x1024" - }" + }' - lang: python label: Self-Hosted source: | @@ -2917,12 +2917,12 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const portkey = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY", - baseURL: "SELF_HOSTED_GATEWAY_URL" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY', + baseURL: 'SELF_HOSTED_GATEWAY_URL' }); const image = await portkey.images.generate({ @@ -2946,14 +2946,14 @@ paths: content: multipart/form-data: schema: - $ref: "#/components/schemas/CreateImageEditRequest" + $ref: '#/components/schemas/CreateImageEditRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/ImagesResponse" + $ref: '#/components/schemas/ImagesResponse' security: - Portkey-Key: [] Virtual-Key: [] @@ -3000,11 +3000,11 @@ paths: label: Default source: | import fs from "fs"; - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -3024,13 +3024,13 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d "{ + -d '{ "image": "@otter.png", "mask": "@mask.png", "prompt": "A cute baby sea otter wearing a beret", "n": 2, "size": "1024x1024" - }" + }' - lang: python label: Self-Hosted source: | @@ -3055,12 +3055,12 @@ paths: label: Self-Hosted source: | import fs from "fs"; - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const portkey = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY", - baseURL: "SELF_HOSTED_GATEWAY_URL" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY', + baseURL: 'SELF_HOSTED_GATEWAY_URL' }); async function main() { @@ -3086,14 +3086,14 @@ paths: content: multipart/form-data: schema: - $ref: "#/components/schemas/CreateImageVariationRequest" + $ref: '#/components/schemas/CreateImageVariationRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/ImagesResponse" + $ref: '#/components/schemas/ImagesResponse' security: - Portkey-Key: [] Virtual-Key: [] @@ -3136,11 +3136,11 @@ paths: label: Default source: | import fs from "fs"; - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -3158,11 +3158,11 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d "{ + -d '{ "image": "@otter.png", "n": 2, "size": "1024x1024" - }" + }' - lang: python label: Self-Hosted source: | @@ -3185,12 +3185,12 @@ paths: label: Self-Hosted source: | import fs from "fs"; - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const portkey = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY", - baseURL: "SELF_HOSTED_GATEWAY_URL" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY', + baseURL: 'SELF_HOSTED_GATEWAY_URL' }); async function main() { @@ -3214,14 +3214,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateEmbeddingRequest" + $ref: '#/components/schemas/CreateEmbeddingRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/CreateEmbeddingResponse" + $ref: '#/components/schemas/CreateEmbeddingResponse' security: - Portkey-Key: [] Virtual-Key: [] @@ -3243,11 +3243,11 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "input": "The food was delicious and the waiter...", "model": "text-embedding-ada-002", "encoding_format": "float" - }" + }' - lang: python label: Default source: | @@ -3266,11 +3266,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -3291,11 +3291,11 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d "{ + -d '{ "input": "The food was delicious and the waiter...", "model": "text-embedding-ada-002", "encoding_format": "float" - }" + }' - lang: python label: Self-Hosted source: | @@ -3318,12 +3318,12 @@ paths: label: Self-Hosted source: | import fs from "fs"; - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const portkey = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY", - baseURL: "SELF_HOSTED_GATEWAY_URL" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY', + baseURL: 'SELF_HOSTED_GATEWAY_URL' }); async function main() { @@ -3350,24 +3350,24 @@ paths: Reranking is useful for improving search results by scoring and sorting documents based on semantic relevance to a query, rather than just keyword matching. parameters: - - $ref: "#/components/parameters/PortkeyTraceId" - - $ref: "#/components/parameters/PortkeySpanId" - - $ref: "#/components/parameters/PortkeyParentSpanId" - - $ref: "#/components/parameters/PortkeySpanName" - - $ref: "#/components/parameters/PortkeyMetadata" + - $ref: '#/components/parameters/PortkeyTraceId' + - $ref: '#/components/parameters/PortkeySpanId' + - $ref: '#/components/parameters/PortkeyParentSpanId' + - $ref: '#/components/parameters/PortkeySpanName' + - $ref: '#/components/parameters/PortkeyMetadata' requestBody: required: true content: application/json: schema: - $ref: "#/components/schemas/CreateRerankRequest" + $ref: '#/components/schemas/CreateRerankRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/CreateRerankResponse" + $ref: '#/components/schemas/CreateRerankResponse' security: - Portkey-Key: [] Virtual-Key: [] @@ -3389,7 +3389,7 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "model": "rerank-v3.5", "query": "What is the capital of France?", "documents": [ @@ -3398,7 +3398,7 @@ paths: "Madrid is the capital of Spain." ], "top_n": 2 - }" + }' - lang: python label: Default source: | @@ -3425,21 +3425,21 @@ paths: - lang: javascript label: Default source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { - const response = await client.post("/rerank", { - model: "rerank-v3.5", - query: "What is the capital of France?", + const response = await client.post('/rerank', { + model: 'rerank-v3.5', + query: 'What is the capital of France?', documents: [ - "Paris is the capital of France.", - "Berlin is the capital of Germany.", - "Madrid is the capital of Spain." + 'Paris is the capital of France.', + 'Berlin is the capital of Germany.', + 'Madrid is the capital of Spain.' ], top_n: 2 }); @@ -3455,7 +3455,7 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d "{ + -d '{ "model": "rerank-v3.5", "query": "What is the capital of France?", "documents": [ @@ -3464,7 +3464,7 @@ paths: "Madrid is the capital of Spain." ], "top_n": 2 - }" + }' - lang: python label: Self-Hosted source: | @@ -3492,22 +3492,22 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY", - baseURL: "SELF_HOSTED_GATEWAY_URL" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY', + baseURL: 'SELF_HOSTED_GATEWAY_URL' }); async function main() { - const response = await client.post("/rerank", { - model: "rerank-v3.5", - query: "What is the capital of France?", + const response = await client.post('/rerank', { + model: 'rerank-v3.5', + query: 'What is the capital of France?', documents: [ - "Paris is the capital of France.", - "Berlin is the capital of Germany.", - "Madrid is the capital of Spain." + 'Paris is the capital of France.', + 'Berlin is the capital of Germany.', + 'Madrid is the capital of Spain.' ], top_n: 2 }); @@ -3529,9 +3529,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateSpeechRequest" + $ref: '#/components/schemas/CreateSpeechRequest' responses: - "200": + '200': description: OK headers: Transfer-Encoding: @@ -3565,11 +3565,11 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "model": "tts-1", "input": "The quick brown fox jumped over the lazy dog.", "voice": "alloy" - }" \ + }' \ --output speech.mp3 - lang: python label: Default @@ -3594,11 +3594,11 @@ paths: source: | import fs from "fs"; import path from "path"; - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); const speechFile = path.resolve("./speech.mp3"); @@ -3621,11 +3621,11 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d "{ + -d '{ "model": "tts-1", "input": "The quick brown fox jumped over the lazy dog.", "voice": "alloy" - }" \ + }' \ --output speech.mp3 - lang: python label: Self-Hosted @@ -3651,12 +3651,12 @@ paths: source: | import fs from "fs"; import path from "path"; - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY", - baseUrl: "SELF_HOSTED_GATEWAY_URL" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY', + baseUrl: 'SELF_HOSTED_GATEWAY_URL' }); const speechFile = path.resolve("./speech.mp3"); @@ -3685,16 +3685,16 @@ paths: content: multipart/form-data: schema: - $ref: "#/components/schemas/CreateTranscriptionRequest" + $ref: '#/components/schemas/CreateTranscriptionRequest' responses: - "200": + '200': description: OK content: application/json: schema: oneOf: - - $ref: "#/components/schemas/CreateTranscriptionResponseJson" - - $ref: "#/components/schemas/CreateTranscriptionResponseVerboseJson" + - $ref: '#/components/schemas/CreateTranscriptionResponseJson' + - $ref: '#/components/schemas/CreateTranscriptionResponseVerboseJson' security: - Portkey-Key: [] @@ -3738,11 +3738,11 @@ paths: label: Default source: | import fs from "fs"; - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -3761,10 +3761,10 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d "{ + -d '{ "model": "whisper-1", "file": "@/path/to/file/audio.mp3" - }" \ + }' \ --output transcription.json - lang: python label: Self-Hosted @@ -3786,12 +3786,12 @@ paths: label: Self-Hosted source: | import fs from "fs"; - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY", - baseUrl: "SELF_HOSTED_GATEWAY_URL" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY', + baseUrl: 'SELF_HOSTED_GATEWAY_URL' }); const audioFile = fs.createReadStream("speech.mp3"); @@ -3818,16 +3818,16 @@ paths: content: multipart/form-data: schema: - $ref: "#/components/schemas/CreateTranslationRequest" + $ref: '#/components/schemas/CreateTranslationRequest' responses: - "200": + '200': description: OK content: application/json: schema: oneOf: - - $ref: "#/components/schemas/CreateTranslationResponseJson" - - $ref: "#/components/schemas/CreateTranslationResponseVerboseJson" + - $ref: '#/components/schemas/CreateTranslationResponseJson' + - $ref: '#/components/schemas/CreateTranslationResponseVerboseJson' security: - Portkey-Key: [] @@ -3871,11 +3871,11 @@ paths: label: Default source: | import fs from "fs"; - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -3894,10 +3894,10 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d "{ + -d '{ "model": "whisper-1", "file": "@/path/to/file/german.m4a" - }" \ + }' \ --output translation.json - lang: python label: Self-Hosted @@ -3919,12 +3919,12 @@ paths: label: Self-Hosted source: | import fs from "fs"; - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY", - baseUrl: "SELF_HOSTED_GATEWAY_URL" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY', + baseUrl: 'SELF_HOSTED_GATEWAY_URL' }); const audioFile = fs.createReadStream("speech.mp3"); @@ -3954,12 +3954,12 @@ paths: type: string description: Only return files with the given purpose. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/ListFilesResponse" + $ref: '#/components/schemas/ListFilesResponse' security: - Portkey-Key: [] @@ -3992,11 +3992,11 @@ paths: client.files.list() - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -4020,14 +4020,14 @@ paths: content: multipart/form-data: schema: - $ref: "#/components/schemas/CreateFileRequest" + $ref: '#/components/schemas/CreateFileRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/OpenAIFile" + $ref: '#/components/schemas/OpenAIFile' security: - Portkey-Key: [] @@ -4066,11 +4066,11 @@ paths: - lang: javascript source: | import fs from "fs"; - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -4099,12 +4099,12 @@ paths: type: string description: The ID of the file to use for this request. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/DeleteFileResponse" + $ref: '#/components/schemas/DeleteFileResponse' security: - Portkey-Key: [] @@ -4138,11 +4138,11 @@ paths: client.files.delete("file-abc123") - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -4166,12 +4166,12 @@ paths: type: string description: The ID of the file to use for this request. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/OpenAIFile" + $ref: '#/components/schemas/OpenAIFile' security: - Portkey-Key: [] @@ -4204,11 +4204,11 @@ paths: client.files.retrieve("file-abc123") - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -4234,7 +4234,7 @@ paths: type: string description: The ID of the file to use for this request. responses: - "200": + '200': description: OK content: application/json: @@ -4272,11 +4272,11 @@ paths: content = client.files.content("file-abc123") - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -4295,12 +4295,12 @@ paths: description: Finetune a provider model parameters: [] responses: - "200": + '200': description: The request has succeeded. content: application/json: schema: - $ref: "#/components/schemas/FineTuningJob" + $ref: '#/components/schemas/FineTuningJob' tags: - Finetune requestBody: @@ -4309,9 +4309,9 @@ paths: application/json: schema: anyOf: - - $ref: "#/components/schemas/OpenAIFinetuneJob" - - $ref: "#/components/schemas/BedrockFinetuneJob" - - $ref: "#/components/schemas/PortkeyFinetuneJob" + - $ref: '#/components/schemas/OpenAIFinetuneJob' + - $ref: '#/components/schemas/BedrockFinetuneJob' + - $ref: '#/components/schemas/PortkeyFinetuneJob' security: - Portkey-Key: [] @@ -4334,10 +4334,10 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d "{ + -d '{ "training_file": "file-BK7bzQj3FfZFXr7DbL6xJwfo", "model": "gpt-3.5-turbo" - }" + }' - lang: python label: Default source: | @@ -4355,11 +4355,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -4378,10 +4378,10 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d "{ + -d '{ "training_file": "file-BK7bzQj3FfZFXr7DbL6xJwfo", "model": "gpt-3.5-turbo" - }" + }' - lang: python label: Self-hosted source: | @@ -4400,12 +4400,12 @@ paths: - lang: javascript label: Self-hosted source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - baseUrl: "SELF_HOSTED_GATEWAY_URL", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + baseUrl: 'SELF_HOSTED_GATEWAY_URL', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -4423,7 +4423,7 @@ paths: tags: - Fine-tuning summary: | - List your organization"s fine-tuning jobs + List your organization's fine-tuning jobs parameters: - name: after in: query @@ -4439,12 +4439,12 @@ paths: type: integer default: 20 responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/ListPaginatedFineTuningJobsResponse" + $ref: '#/components/schemas/ListPaginatedFineTuningJobsResponse' security: - Portkey-Key: [] @@ -4480,11 +4480,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -4517,12 +4517,12 @@ paths: - lang: javascript label: Self-hosted source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - baseUrl: "SELF_HOSTED_GATEWAY_URL", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + baseUrl: 'SELF_HOSTED_GATEWAY_URL', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -4555,12 +4555,12 @@ paths: description: | The ID of the fine-tuning job. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/FineTuningJob" + $ref: '#/components/schemas/FineTuningJob' security: - Portkey-Key: [] @@ -4596,11 +4596,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -4631,12 +4631,12 @@ paths: - lang: javascript label: Self-hosted source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - baseUrl: "SELF_HOSTED_GATEWAY_URL", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + baseUrl: 'SELF_HOSTED_GATEWAY_URL', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -4678,12 +4678,12 @@ paths: type: integer default: 20 responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/ListFineTuningJobEventsResponse" + $ref: '#/components/schemas/ListFineTuningJobEventsResponse' security: - Portkey-Key: [] @@ -4722,11 +4722,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -4762,12 +4762,12 @@ paths: - lang: javascript label: Self-hosted source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - baseUrl: "SELF_HOSTED_GATEWAY_URL", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + baseUrl: 'SELF_HOSTED_GATEWAY_URL', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -4798,12 +4798,12 @@ paths: description: | The ID of the fine-tuning job to cancel. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/FineTuningJob" + $ref: '#/components/schemas/FineTuningJob' security: - Portkey-Key: [] @@ -4839,11 +4839,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -4873,12 +4873,12 @@ paths: - lang: javascript label: Self-hosted source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - baseUrl: "SELF_HOSTED_GATEWAY_URL", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + baseUrl: 'SELF_HOSTED_GATEWAY_URL', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -4919,12 +4919,12 @@ paths: type: integer default: 10 responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/ListFineTuningJobCheckpointsResponse" + $ref: '#/components/schemas/ListFineTuningJobCheckpointsResponse' security: - Portkey-Key: [] @@ -4967,11 +4967,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -4996,12 +4996,12 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY", - baseUrl: "SELF_HOSTED_GATEWAY_URL" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY', + baseUrl: 'SELF_HOSTED_GATEWAY_URL' }); async function main() { @@ -5024,7 +5024,7 @@ paths: - in: query name: ai_service required: false - description: Filter models by the AI service (e.g., "openai", "anthropic"). + description: Filter models by the AI service (e.g., 'openai', 'anthropic'). schema: type: string - in: query @@ -5062,20 +5062,20 @@ paths: enum: [asc, desc] default: asc responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/ListModelsResponse" + $ref: '#/components/schemas/ListModelsResponse' example: - object: "list" + object: 'list' total: 500 data: - - id: "@ai-provider-slug/gpt-5" - slug: "gpt-5" - canonical_slug: "gpt-5" - object: "model" + - id: '@ai-provider-slug/gpt-5' + slug: 'gpt-5' + canonical_slug: 'gpt-5' + object: 'model' security: - Portkey-Key: [] x-code-samples: @@ -5083,13 +5083,13 @@ paths: label: Default source: | # Example of sending a query parameter in the URL - curl "https://api.portkey.ai/v1/models?provider=openai" \ + curl 'https://api.portkey.ai/v1/models?provider=openai' \ -H "x-portkey-api-key: $PORTKEY_API_KEY" - lang: curl label: Self-Hosted source: | # Example of sending a query parameter in the URL - curl "https://YOUR_SELF_HOSTED_URL/models?provider=openai" \ + curl 'https://YOUR_SELF_HOSTED_URL/models?provider=openai' \ -H "x-portkey-api-key: $PORTKEY_API_KEY" - lang: python label: Default @@ -5123,10 +5123,10 @@ paths: - lang: javascript label: Default source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY" + apiKey: 'PORTKEY_API_KEY' }); async function main() { @@ -5140,11 +5140,11 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - baseUrl: "https://YOUR_SELF_HOSTED_URL" + apiKey: 'PORTKEY_API_KEY', + baseUrl: 'https://YOUR_SELF_HOSTED_URL' }); async function main() { @@ -5172,12 +5172,12 @@ paths: example: gpt-3.5-turbo description: The ID of the model to use for this request responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/Model" + $ref: '#/components/schemas/Model' security: - Portkey-Key: [] @@ -5210,11 +5210,11 @@ paths: client.models.retrieve("VAR_model_id") - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -5239,12 +5239,12 @@ paths: example: ft:gpt-3.5-turbo:acemeco:suffix:abc123 description: The model to delete responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/DeleteModelResponse" + $ref: '#/components/schemas/DeleteModelResponse' security: - Portkey-Key: [] @@ -5278,11 +5278,11 @@ paths: client.models.delete("ft:gpt-3.5-turbo:acemeco:suffix:abc123") - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -5299,20 +5299,20 @@ paths: tags: - Moderations summary: | - Identify potentially harmful content in text and images. **Only** works with [OpenAI"s Moderations endpoint](https://platform.openai.com/docs/guides/moderation) currently. + Identify potentially harmful content in text and images. **Only** works with [OpenAI's Moderations endpoint](https://platform.openai.com/docs/guides/moderation) currently. requestBody: required: true content: application/json: schema: - $ref: "#/components/schemas/CreateModerationRequest" + $ref: '#/components/schemas/CreateModerationRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/CreateModerationResponse" + $ref: '#/components/schemas/CreateModerationResponse' security: - Portkey-Key: [] @@ -5335,9 +5335,9 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d "{ + -d '{ "input": "I want to kill them." - }" + }' - lang: python label: Default source: | @@ -5353,11 +5353,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -5373,9 +5373,9 @@ paths: -H "Content-Type: application/json" \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ - -d "{ + -d '{ "input": "I want to kill them." - }" + }' - lang: python label: Self-Hosted source: | @@ -5392,12 +5392,12 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY", - baseURL: "SELF_HOSTED_GATEWAY_URL" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY', + baseURL: 'SELF_HOSTED_GATEWAY_URL' }); async function main() { @@ -5430,7 +5430,7 @@ paths: schema: type: string default: desc - enum: ["asc", "desc"] + enum: ['asc', 'desc'] - name: after in: query description: &pagination_after_param_description | @@ -5444,12 +5444,12 @@ paths: schema: type: string responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/ListAssistantsResponse" + $ref: '#/components/schemas/ListAssistantsResponse' security: - Portkey-Key: [] @@ -5488,11 +5488,11 @@ paths: print(my_assistants.data) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -5570,14 +5570,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateAssistantRequest" + $ref: '#/components/schemas/CreateAssistantRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/AssistantObject" + $ref: '#/components/schemas/AssistantObject' security: - Portkey-Key: [] @@ -5600,12 +5600,12 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "OpenAI-Beta: assistants=v2" \ - -d "{ + -d '{ "instructions": "You are a personal math tutor. When asked a question, write and run Python code to answer the question.", "name": "Math Tutor", "tools": [{"type": "code_interpreter"}], "model": "gpt-4-turbo" - }" + }' - lang: python source: | from portkey_ai import Portkey @@ -5624,11 +5624,11 @@ paths: print(my_assistant) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -5678,12 +5678,12 @@ paths: type: string description: The ID of the assistant to retrieve. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/AssistantObject" + $ref: '#/components/schemas/AssistantObject' security: - Portkey-Key: [] @@ -5719,11 +5719,11 @@ paths: print(my_assistant) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -5771,14 +5771,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ModifyAssistantRequest" + $ref: '#/components/schemas/ModifyAssistantRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/AssistantObject" + $ref: '#/components/schemas/AssistantObject' security: - Portkey-Key: [] @@ -5801,11 +5801,11 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "OpenAI-Beta: assistants=v2" \ - -d "{ + -d '{ "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.", "tools": [{"type": "file_search"}], "model": "gpt-4-turbo" - }" + }' - lang: python source: | from portkey_ai import Portkey @@ -5826,11 +5826,11 @@ paths: print(my_updated_assistant) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -5886,12 +5886,12 @@ paths: type: string description: The ID of the assistant to delete. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/DeleteAssistantResponse" + $ref: '#/components/schemas/DeleteAssistantResponse' security: - Portkey-Key: [] @@ -5928,11 +5928,11 @@ paths: print(response) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -5960,17 +5960,17 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateResponse" + $ref: '#/components/schemas/CreateResponse' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/Response" + $ref: '#/components/schemas/Response' text/event-stream: schema: - $ref: "#/components/schemas/ResponseStreamEvent" + $ref: '#/components/schemas/ResponseStreamEvent' /responses/{response_id}: servers: *DataPlaneServers get: @@ -5992,7 +5992,7 @@ paths: schema: type: array items: - $ref: "#/components/schemas/Includable" + $ref: '#/components/schemas/Includable' description: > Specify additional output data to include in the response. Currently @@ -6006,12 +6006,12 @@ paths: - `computer_call_output.output.image_url`: Include image urls from the computer call output. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/Response" + $ref: '#/components/schemas/Response' delete: operationId: deleteResponse tags: @@ -6027,14 +6027,14 @@ paths: example: resp_677efb5139a88190b512bc3fef8e535d description: The ID of the response to delete. responses: - "200": + '200': description: OK - "404": + '404': description: Not Found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /responses/{response_id}/input_items: servers: *DataPlaneServers get: @@ -6084,12 +6084,12 @@ paths: description: | An item ID to list items before, used in pagination. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/ResponseItemList" + $ref: '#/components/schemas/ResponseItemList' /threads: servers: *DataPlaneServers post: @@ -6101,14 +6101,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateThreadRequest" + $ref: '#/components/schemas/CreateThreadRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/ThreadObject" + $ref: '#/components/schemas/ThreadObject' security: - Portkey-Key: [] @@ -6131,7 +6131,7 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "OpenAI-Beta: assistants=v2" \ - -d "{ + -d '{ "messages": [{ "role": "user", "content": "Hello, what is AI?" @@ -6139,7 +6139,7 @@ paths: "role": "user", "content": "How does AI work? Explain it in simple terms." }] - }" + }' - lang: python source: | from portkey_ai import Portkey @@ -6165,11 +6165,11 @@ paths: print(message_thread) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -6214,12 +6214,12 @@ paths: type: string description: The ID of the thread to retrieve. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/ThreadObject" + $ref: '#/components/schemas/ThreadObject' security: - Portkey-Key: [] @@ -6255,11 +6255,11 @@ paths: print(my_thread) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -6300,14 +6300,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ModifyThreadRequest" + $ref: '#/components/schemas/ModifyThreadRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/ThreadObject" + $ref: '#/components/schemas/ThreadObject' security: - Portkey-Key: [] @@ -6330,12 +6330,12 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "OpenAI-Beta: assistants=v2" \ - -d "{ + -d '{ "metadata": { "modified": "true", "user": "abc123" } - }" + }' - lang: python source: | from portkey_ai import Portkey @@ -6355,11 +6355,11 @@ paths: print(my_updated_thread) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -6398,12 +6398,12 @@ paths: type: string description: The ID of the thread to delete. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/DeleteThreadResponse" + $ref: '#/components/schemas/DeleteThreadResponse' security: - Portkey-Key: [] @@ -6440,11 +6440,11 @@ paths: print(response) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -6487,7 +6487,7 @@ paths: schema: type: string default: desc - enum: ["asc", "desc"] + enum: ['asc', 'desc'] - name: after in: query description: *pagination_after_param_description @@ -6505,12 +6505,12 @@ paths: schema: type: string responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/ListMessagesResponse" + $ref: '#/components/schemas/ListMessagesResponse' security: - Portkey-Key: [] @@ -6546,11 +6546,11 @@ paths: print(thread_messages.data) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -6628,14 +6628,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateMessageRequest" + $ref: '#/components/schemas/CreateMessageRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/MessageObject" + $ref: '#/components/schemas/MessageObject' security: - Portkey-Key: [] @@ -6658,10 +6658,10 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "OpenAI-Beta: assistants=v2" \ - -d "{ + -d '{ "role": "user", "content": "How does AI work? Explain it in simple terms." - }" + }' - lang: python source: | from portkey_ai import Portkey @@ -6679,11 +6679,11 @@ paths: print(thread_message) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -6739,12 +6739,12 @@ paths: type: string description: The ID of the message to retrieve. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/MessageObject" + $ref: '#/components/schemas/MessageObject' security: - Portkey-Key: [] @@ -6783,11 +6783,11 @@ paths: print(message) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -6844,14 +6844,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ModifyMessageRequest" + $ref: '#/components/schemas/ModifyMessageRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/MessageObject" + $ref: '#/components/schemas/MessageObject' security: - Portkey-Key: [] @@ -6874,12 +6874,12 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "OpenAI-Beta: assistants=v2" \ - -d "{ + -d '{ "metadata": { "modified": "true", "user": "abc123" } - }" + }' - lang: python source: | from portkey_ai import Portkey @@ -6900,11 +6900,11 @@ paths: print(message) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -6917,7 +6917,7 @@ paths: user: "abc123", }, } - }" + }' response: | { "id": "msg_abc123", @@ -6961,12 +6961,12 @@ paths: type: string description: The ID of the message to delete. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/DeleteMessageResponse" + $ref: '#/components/schemas/DeleteMessageResponse' security: - Portkey-Key: [] @@ -7005,11 +7005,11 @@ paths: print(deleted_message) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -7039,14 +7039,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateThreadAndRunRequest" + $ref: '#/components/schemas/CreateThreadAndRunRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/RunObject" + $ref: '#/components/schemas/RunObject' security: - Portkey-Key: [] @@ -7069,14 +7069,14 @@ paths: -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ -H "OpenAI-Beta: assistants=v2" \ - -d "{ + -d '{ "assistant_id": "asst_abc123", "thread": { "messages": [ {"role": "user", "content": "Explain deep learning to a 5 year old."} ] } - }" + }' - lang: python source: | from portkey_ai import Portkey @@ -7098,11 +7098,11 @@ paths: print(run) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -7181,7 +7181,7 @@ paths: schema: type: string default: desc - enum: ["asc", "desc"] + enum: ['asc', 'desc'] - name: after in: query description: *pagination_after_param_description @@ -7193,12 +7193,12 @@ paths: schema: type: string responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/ListRunsResponse" + $ref: '#/components/schemas/ListRunsResponse' security: - Portkey-Key: [] @@ -7237,11 +7237,11 @@ paths: print(runs) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -7373,7 +7373,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateRunRequest" + $ref: '#/components/schemas/CreateRunRequest' security: - Portkey-Key: [] @@ -7389,12 +7389,12 @@ paths: Custom-Host: [] responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/RunObject" + $ref: '#/components/schemas/RunObject' x-code-samples: - lang: curl source: | @@ -7403,9 +7403,9 @@ paths: -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ -H "OpenAI-Beta: assistants=v2" \ - -d "{ + -d '{ "assistant_id": "asst_abc123" - }" + }' - lang: python source: | from portkey_ai import Portkey @@ -7423,11 +7423,11 @@ paths: print(run) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -7498,12 +7498,12 @@ paths: type: string description: The ID of the run to retrieve. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/RunObject" + $ref: '#/components/schemas/RunObject' security: - Portkey-Key: [] @@ -7542,11 +7542,11 @@ paths: print(run) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -7622,14 +7622,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ModifyRunRequest" + $ref: '#/components/schemas/ModifyRunRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/RunObject" + $ref: '#/components/schemas/RunObject' security: - Portkey-Key: [] @@ -7652,11 +7652,11 @@ paths: -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ -H "OpenAI-Beta: assistants=v2" \ - -d "{ + -d '{ "metadata": { "user_id": "user_abc123" } - }" + }' - lang: python source: | from portkey_ai import Portkey @@ -7675,11 +7675,11 @@ paths: print(run) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -7755,7 +7755,7 @@ paths: tags: - Assistants summary: | - When a run has the `status: "requires_action"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they"re all completed. All outputs must be submitted in a single request. + When a run has the `status: "requires_action"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request. parameters: - in: path name: thread_id @@ -7774,14 +7774,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/SubmitToolOutputsRunRequest" + $ref: '#/components/schemas/SubmitToolOutputsRunRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/RunObject" + $ref: '#/components/schemas/RunObject' security: - Portkey-Key: [] @@ -7804,14 +7804,14 @@ paths: -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ -H "OpenAI-Beta: assistants=v2" \ - -d "{ + -d '{ "tool_outputs": [ { "tool_call_id": "call_001", "output": "70 degrees and sunny." } ] - }" + }' - lang: python source: | from portkey_ai import Portkey @@ -7835,11 +7835,11 @@ paths: print(run) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -7935,12 +7935,12 @@ paths: type: string description: The ID of the run to cancel. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/RunObject" + $ref: '#/components/schemas/RunObject' security: - Portkey-Key: [] @@ -7980,11 +7980,11 @@ paths: print(run) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -8065,7 +8065,7 @@ paths: schema: type: string default: desc - enum: ["asc", "desc"] + enum: ['asc', 'desc'] - name: after in: query description: *pagination_after_param_description @@ -8077,12 +8077,12 @@ paths: schema: type: string responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/ListRunStepsResponse" + $ref: '#/components/schemas/ListRunStepsResponse' security: - Portkey-Key: [] @@ -8122,11 +8122,11 @@ paths: print(run_steps) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -8201,12 +8201,12 @@ paths: type: string description: The ID of the run step to retrieve. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/RunStepObject" + $ref: '#/components/schemas/RunStepObject' security: - Portkey-Key: [] @@ -8247,11 +8247,11 @@ paths: print(run_step) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -8312,7 +8312,7 @@ paths: schema: type: string default: desc - enum: ["asc", "desc"] + enum: ['asc', 'desc'] - name: after in: query description: *pagination_after_param_description @@ -8324,12 +8324,12 @@ paths: schema: type: string responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/ListVectorStoresResponse" + $ref: '#/components/schemas/ListVectorStoresResponse' security: - Portkey-Key: [] @@ -8365,11 +8365,11 @@ paths: print(vector_stores) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -8425,14 +8425,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateVectorStoreRequest" + $ref: '#/components/schemas/CreateVectorStoreRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/VectorStoreObject" + $ref: '#/components/schemas/VectorStoreObject' security: - Portkey-Key: [] @@ -8455,9 +8455,9 @@ paths: -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ -H "OpenAI-Beta: assistants=v2" - -d "{ + -d '{ "name": "Support FAQ" - }" + }' - lang: python source: | from portkey_ai import Portkey @@ -8473,11 +8473,11 @@ paths: print(vector_store) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -8518,12 +8518,12 @@ paths: type: string description: The ID of the vector store to retrieve. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/VectorStoreObject" + $ref: '#/components/schemas/VectorStoreObject' security: - Portkey-Key: [] @@ -8561,11 +8561,11 @@ paths: print(vector_store) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -8599,14 +8599,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/UpdateVectorStoreRequest" + $ref: '#/components/schemas/UpdateVectorStoreRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/VectorStoreObject" + $ref: '#/components/schemas/VectorStoreObject' security: - Portkey-Key: [] @@ -8629,9 +8629,9 @@ paths: -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ -H "OpenAI-Beta: assistants=v2" - -d "{ + -d '{ "name": "Support FAQ" - }" + }' - lang: python source: | from portkey_ai import Portkey @@ -8648,11 +8648,11 @@ paths: print(vector_store) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -8695,12 +8695,12 @@ paths: type: string description: The ID of the vector store to delete. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/DeleteVectorStoreResponse" + $ref: '#/components/schemas/DeleteVectorStoreResponse' security: - Portkey-Key: [] @@ -8739,11 +8739,11 @@ paths: print(deleted_vector_store) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -8787,7 +8787,7 @@ paths: schema: type: string default: desc - enum: ["asc", "desc"] + enum: ['asc', 'desc'] - name: after in: query description: *pagination_after_param_description @@ -8800,17 +8800,17 @@ paths: type: string - name: filter in: query - description: "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`." + description: 'Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.' schema: type: string - enum: ["in_progress", "completed", "failed", "cancelled"] + enum: ['in_progress', 'completed', 'failed', 'cancelled'] responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/ListVectorStoreFilesResponse" + $ref: '#/components/schemas/ListVectorStoreFilesResponse' security: - Portkey-Key: [] @@ -8848,11 +8848,11 @@ paths: print(vector_store_files) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -8903,14 +8903,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateVectorStoreFileRequest" + $ref: '#/components/schemas/CreateVectorStoreFileRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/VectorStoreFileObject" + $ref: '#/components/schemas/VectorStoreFileObject' security: - Portkey-Key: [] @@ -8933,9 +8933,9 @@ paths: -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ -H "OpenAI-Beta: assistants=v2" \ - -d "{ + -d '{ "file_id": "file-abc123" - }" + }' - lang: python source: | from portkey_ai import Portkey @@ -8952,11 +8952,11 @@ paths: print(vector_store_file) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -9003,12 +9003,12 @@ paths: example: file-abc123 description: The ID of the file being retrieved. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/VectorStoreFileObject" + $ref: '#/components/schemas/VectorStoreFileObject' security: - Portkey-Key: [] @@ -9047,11 +9047,11 @@ paths: print(vector_store_file) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -9091,12 +9091,12 @@ paths: type: string description: The ID of the file to delete. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/DeleteVectorStoreFileResponse" + $ref: '#/components/schemas/DeleteVectorStoreFileResponse' security: - Portkey-Key: [] @@ -9136,11 +9136,11 @@ paths: print(deleted_vector_store_file) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -9179,14 +9179,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateVectorStoreFileBatchRequest" + $ref: '#/components/schemas/CreateVectorStoreFileBatchRequest' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/VectorStoreFileBatchObject" + $ref: '#/components/schemas/VectorStoreFileBatchObject' security: - Portkey-Key: [] @@ -9209,9 +9209,9 @@ paths: -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json \ -H "OpenAI-Beta: assistants=v2" \ - -d "{ + -d '{ "file_ids": ["file-abc123", "file-abc456"] - }" + }' - lang: python source: | from portkey_ai import Portkey @@ -9228,11 +9228,11 @@ paths: print(vector_store_file_batch) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -9284,12 +9284,12 @@ paths: example: vsfb_abc123 description: The ID of the file batch being retrieved. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/VectorStoreFileBatchObject" + $ref: '#/components/schemas/VectorStoreFileBatchObject' security: - Portkey-Key: [] @@ -9328,11 +9328,11 @@ paths: print(vector_store_file_batch) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -9380,12 +9380,12 @@ paths: type: string description: The ID of the file batch to cancel. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/VectorStoreFileBatchObject" + $ref: '#/components/schemas/VectorStoreFileBatchObject' security: - Portkey-Key: [] @@ -9425,11 +9425,11 @@ paths: print(deleted_vector_store_file_batch) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -9489,7 +9489,7 @@ paths: schema: type: string default: desc - enum: ["asc", "desc"] + enum: ['asc', 'desc'] - name: after in: query description: *pagination_after_param_description @@ -9502,17 +9502,17 @@ paths: type: string - name: filter in: query - description: "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`." + description: 'Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.' schema: type: string - enum: ["in_progress", "completed", "failed", "cancelled"] + enum: ['in_progress', 'completed', 'failed', 'cancelled'] responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/ListVectorStoreFilesResponse" + $ref: '#/components/schemas/ListVectorStoreFilesResponse' security: - Portkey-Key: [] @@ -9551,11 +9551,11 @@ paths: print(vector_store_files) - lang: javascript source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -9602,17 +9602,17 @@ paths: application/json: schema: anyOf: - - $ref: "#/components/schemas/OpenAIBatchJob" - - $ref: "#/components/schemas/BedrockBatchJob" - - $ref: "#/components/schemas/VertexBatchJob" - - $ref: "#/components/schemas/PortkeyBatchJob" + - $ref: '#/components/schemas/OpenAIBatchJob' + - $ref: '#/components/schemas/BedrockBatchJob' + - $ref: '#/components/schemas/VertexBatchJob' + - $ref: '#/components/schemas/PortkeyBatchJob' responses: - "200": + '200': description: Batch created successfully. content: application/json: schema: - $ref: "#/components/schemas/Batch" + $ref: '#/components/schemas/Batch' security: - Portkey-Key: [] @@ -9635,11 +9635,11 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "input_file_id": "file-abc123", "endpoint": "/v1/chat/completions", "completion_window": "24h" - }" + }' - lang: python label: Default source: | @@ -9658,11 +9658,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -9683,11 +9683,11 @@ paths: -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "input_file_id": "file-abc123", "endpoint": "/v1/chat/completions", "completion_window": "24h" - }" + }' - lang: python label: Self-Hosted source: | @@ -9707,12 +9707,12 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - baseUrl: "SELF_HOSTED_GATEWAY_URL", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + baseUrl: 'SELF_HOSTED_GATEWAY_URL', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -9731,7 +9731,7 @@ paths: operationId: listBatches tags: - Batch - summary: List your organization"s batches. + summary: List your organization's batches. parameters: - in: query name: after @@ -9747,12 +9747,12 @@ paths: type: integer default: 20 responses: - "200": + '200': description: Batch listed successfully. content: application/json: schema: - $ref: "#/components/schemas/ListBatchesResponse" + $ref: '#/components/schemas/ListBatchesResponse' security: - Portkey-Key: [] @@ -9789,11 +9789,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -9827,12 +9827,12 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - baseUrl: "SELF_HOSTED_GATEWAY_URL", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + baseUrl: 'SELF_HOSTED_GATEWAY_URL', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -9860,7 +9860,7 @@ paths: type: string description: The ID of the batch to retrieve output for. responses: - "200": + '200': description: Batch output returned successfully. content: application/octet-stream: @@ -9903,11 +9903,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -9939,12 +9939,12 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - baseUrl: "SELF_HOSTED_GATEWAY_URL", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + baseUrl: 'SELF_HOSTED_GATEWAY_URL', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -9970,12 +9970,12 @@ paths: type: string description: The ID of the batch to retrieve. responses: - "200": + '200': description: Batch retrieved successfully. content: application/json: schema: - $ref: "#/components/schemas/Batch" + $ref: '#/components/schemas/Batch' security: - Portkey-Key: [] @@ -10012,11 +10012,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -10048,12 +10048,12 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - baseUrl: "SELF_HOSTED_GATEWAY_URL", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + baseUrl: 'SELF_HOSTED_GATEWAY_URL', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -10079,12 +10079,12 @@ paths: type: string description: The ID of the batch to cancel. responses: - "200": - description: Batch is cancelling. Returns the cancelling batch"s details. + '200': + description: Batch is cancelling. Returns the cancelling batch's details. content: application/json: schema: - $ref: "#/components/schemas/Batch" + $ref: '#/components/schemas/Batch' security: - Portkey-Key: [] @@ -10122,11 +10122,11 @@ paths: - lang: javascript label: Default source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -10159,12 +10159,12 @@ paths: - lang: javascript label: Self-Hosted source: | - import Portkey from "portkey-ai"; + import Portkey from 'portkey-ai'; const client = new Portkey({ - apiKey: "PORTKEY_API_KEY", - baseUrl: "SELF_HOSTED_GATEWAY_URL", - virtualKey: "PROVIDER_VIRTUAL_KEY" + apiKey: 'PORTKEY_API_KEY', + baseUrl: 'SELF_HOSTED_GATEWAY_URL', + virtualKey: 'PROVIDER_VIRTUAL_KEY' }); async function main() { @@ -10183,7 +10183,7 @@ paths: - Configs operationId: listConfigs responses: - "200": + '200': description: A list of configs content: application/json: @@ -10230,21 +10230,21 @@ paths: example-1: value: { - "success": true, - "data": + 'success': true, + 'data': [ { - "id": "4e54a1a4-109c-43ee-b0f7-11e7d60b0066", - "name": "Pplx Cache Test", - "slug": "pc-pplx-c-ca7a87", - "organisation_id": "472d2804-d054-4226-b4ae-9d4e2e61e69e", - "workspace_id": "472d2804-d054-4226-b4ae-9d4e2e61e69e", - "is_default": 0, - "status": "active", - "owner_id": "c4c7996d-be62-429d-b787-5d48fe94da86", - "updated_by": "439268ba-94a2-4031-9ca7-ca88ddda5096", - "created_at": "2024-05-12T21:37:06.000Z", - "last_updated_at": "2024-05-23T23:36:06.000Z", + 'id': '4e54a1a4-109c-43ee-b0f7-11e7d60b0066', + 'name': 'Pplx Cache Test', + 'slug': 'pc-pplx-c-ca7a87', + 'organisation_id': '472d2804-d054-4226-b4ae-9d4e2e61e69e', + 'workspace_id': '472d2804-d054-4226-b4ae-9d4e2e61e69e', + 'is_default': 0, + 'status': 'active', + 'owner_id': 'c4c7996d-be62-429d-b787-5d48fe94da86', + 'updated_by': '439268ba-94a2-4031-9ca7-ca88ddda5096', + 'created_at': '2024-05-12T21:37:06.000Z', + 'last_updated_at': '2024-05-23T23:36:06.000Z', }, ], } @@ -10335,13 +10335,13 @@ paths: example-1: value: { - "name": "New config", - "config": { "retry": { "attempts": 3 } }, - "workspace_id": "", - "isDefault": 1, + 'name': 'New config', + 'config': { 'retry': { 'attempts': 3 } }, + 'workspace_id': '', + 'isDefault': 1, } responses: - "200": + '200': description: Config created successfully content: application/json: @@ -10363,11 +10363,11 @@ paths: example-1: value: { - "success": true, - "data": + 'success': true, + 'data': { - "id": "f3d8d070-f29d-43a3-bf97-3159c60f4ce0", - "version_id": "0db4065b-ead2-4daa-bf5e-7e9106585133", + 'id': 'f3d8d070-f29d-43a3-bf97-3159c60f4ce0', + 'version_id': '0db4065b-ead2-4daa-bf5e-7e9106585133', }, } x-code-samples: @@ -10483,7 +10483,7 @@ paths: schema: type: string responses: - "200": + '200': description: Config deleted successfully content: application/json: @@ -10554,7 +10554,7 @@ paths: schema: type: string responses: - "200": + '200': description: Config details content: application/json: @@ -10603,27 +10603,27 @@ paths: example-1: value: { - "success": true, - "data": + 'success': true, + 'data': { - "config": + 'config': { - "retry": + 'retry': { - "attempts": 5, - "on_status_codes": [429, 529], + 'attempts': 5, + 'on_status_codes': [429, 529], }, - "cache": { "mode": "simple", "max_age": 3600 }, - "strategy": { "mode": "fallback" }, - "targets": + 'cache': { 'mode': 'simple', 'max_age': 3600 }, + 'strategy': { 'mode': 'fallback' }, + 'targets': [ { - "provider": "openai", - "virtual_key": "main-258f4d", + 'provider': 'openai', + 'virtual_key': 'main-258f4d', }, { - "provider": "azure-openai", - "virtual_key": "azure-test-4110dd", + 'provider': 'azure-openai', + 'virtual_key': 'azure-test-4110dd', }, ], }, @@ -10642,7 +10642,7 @@ paths: # Retrieve the configuration config = portkey.configs.retrieve( - slug="CONFIG_SLUG" + slug='CONFIG_SLUG' ) print(config) @@ -10656,7 +10656,7 @@ paths: }) const config=await portkey.configs.retrieve({ - slug:"CONFIG_SLUG" + slug:'CONFIG_SLUG' }) console.log(config); @@ -10673,7 +10673,7 @@ paths: # Retrieve the configuration config = portkey.configs.retrieve( - slug="CONFIG_SLUG" + slug='CONFIG_SLUG' ) print(config) @@ -10688,7 +10688,7 @@ paths: }) const config=await portkey.configs.retrieve({ - slug:"CONFIG_SLUG" + slug:'CONFIG_SLUG' }) console.log(config); @@ -10725,12 +10725,12 @@ paths: example-1: value: { - "name": "testConf", - "config": { "virtual_key": "copy-of-anthrop-b20259" }, - "status": "active", + 'name': 'testConf', + 'config': { 'virtual_key': 'copy-of-anthrop-b20259' }, + 'status': 'active', } responses: - "200": + '200': description: Config updated successfully content: application/json: @@ -10749,10 +10749,10 @@ paths: example-1: value: { - "success": true, - "data": + 'success': true, + 'data': { - "version_id": "abe447e2-f6aa-4229-93b7-8ee3183b6667", + 'version_id': 'abe447e2-f6aa-4229-93b7-8ee3183b6667', }, } x-code-samples: @@ -10866,7 +10866,7 @@ paths: schema: type: string responses: - "200": + '200': description: A list of config versions content: application/json: @@ -10927,27 +10927,27 @@ paths: example-1: value: { - "object": "list", - "total": 1, - "data": + 'object': 'list', + 'total': 1, + 'data': [ { - "id": "daab995b-8d3b-42c5-a490-47217fbf4e0e", - "name": "PII Redaction Guardrail", - "workspace_id": "8610029e-692a-4df6-9052-3fa3eff69911", - "slug": "pc-pii-re-7f1051", - "organisation_id": "472d2804-d054-4226-b4ae-9d4e2e61e69e", - "is_default": 0, - "status": "active", - "owner_id": "c4c7996d-be62-429d-b787-5d48fe94da86", - "updated_by": "c4c7996d-be62-429d-b787-5d48fe94da86", - "created_at": "2025-10-17T19:11:47.000Z", - "last_updated_at": "2025-10-17T19:11:47.000Z", - "config": "{"input_guardrails":["pg-patron-1d0224"]}", - "format": "json", - "type": "ORG_CONFIG", - "version_id": "8c1a4fbf-26d9-49df-82ca-ab772ba397d2", - "object": "config", + 'id': 'daab995b-8d3b-42c5-a490-47217fbf4e0e', + 'name': 'PII Redaction Guardrail', + 'workspace_id': '8610029e-692a-4df6-9052-3fa3eff69911', + 'slug': 'pc-pii-re-7f1051', + 'organisation_id': '472d2804-d054-4226-b4ae-9d4e2e61e69e', + 'is_default': 0, + 'status': 'active', + 'owner_id': 'c4c7996d-be62-429d-b787-5d48fe94da86', + 'updated_by': 'c4c7996d-be62-429d-b787-5d48fe94da86', + 'created_at': '2025-10-17T19:11:47.000Z', + 'last_updated_at': '2025-10-17T19:11:47.000Z', + 'config': '{"input_guardrails":["pg-patron-1d0224"]}', + 'format': 'json', + 'type': 'ORG_CONFIG', + 'version_id': '8c1a4fbf-26d9-49df-82ca-ab772ba397d2', + 'object': 'config', }, ], } @@ -10955,8 +10955,8 @@ paths: - lang: curl label: Default source: | - curl --location "https://api.portkey.ai/v1/configs/pc-pii-re-7f1051/versions" \ - --header "x-portkey-api-key: PORTKEY_API_KEY" + curl --location 'https://api.portkey.ai/v1/configs/pc-pii-re-7f1051/versions' \ + --header 'x-portkey-api-key: PORTKEY_API_KEY' /feedback: servers: *ControlPlaneServers @@ -10971,14 +10971,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/FeedbackRequest" + $ref: '#/components/schemas/FeedbackRequest' responses: - "200": + '200': description: Feedback successfully saved content: application/json: schema: - $ref: "#/components/schemas/FeedbackResponse" + $ref: '#/components/schemas/FeedbackResponse' x-code-samples: - lang: python label: Default @@ -11014,7 +11014,7 @@ paths: curl -X POST https://api.portkey.ai/v1/feedback \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{"trace_id":"REQUEST_TRACE_ID","value":1}" + -d '{"trace_id":"REQUEST_TRACE_ID","value":1}' - lang: python label: Self-Hosted source: | @@ -11057,7 +11057,7 @@ paths: curl -X POST SELF_HOSTED_CONTROL_PLANE_URL/feedback \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{"trace_id":"REQUEST_TRACE_ID","value":1}" + -d '{"trace_id":"REQUEST_TRACE_ID","value":1}' /feedback/{id}: servers: *ControlPlaneServers @@ -11080,14 +11080,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/FeedbackUpdateRequest" + $ref: '#/components/schemas/FeedbackUpdateRequest' responses: - "200": + '200': description: Feedback successfully updated content: application/json: schema: - $ref: "#/components/schemas/FeedbackResponse" + $ref: '#/components/schemas/FeedbackResponse' x-code-samples: - lang: python label: Default @@ -11123,7 +11123,7 @@ paths: curl -X POST https://api.portkey.ai/v1/feedback/{id} \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{"value":1}" + -d '{"value":1}' - lang: python label: Self-Hosted source: | @@ -11166,7 +11166,7 @@ paths: curl -X POST SELF_HOSTED_CONTROL_PLANE_URL/feedback/{id} \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{"value":1}" + -d '{"value":1}' /integrations: servers: *ControlPlaneServers @@ -11199,7 +11199,7 @@ paths: description: For type=workspace, the API will only return Workpace-Scoped integrations. For type=organisation, the API will only return Global (organisation level) integrations. For type=all, both types of integrations will be returned. responses: - "200": + '200': description: Successful response content: application/json: @@ -11215,7 +11215,7 @@ paths: data: type: array items: - $ref: "#/components/schemas/IntegrationList" + $ref: '#/components/schemas/IntegrationList' x-code-samples: - lang: python label: Default @@ -11289,9 +11289,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateIntegrationRequest" + $ref: '#/components/schemas/CreateIntegrationRequest' responses: - "200": + '200': description: Successful response content: application/json: @@ -11343,11 +11343,11 @@ paths: curl -X POST https://api.portkey.ai/v1/integrations \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name": "openai-production", "ai_provider_id": "openai", "key": "sk-..." - }" + }' - lang: python label: Self-Hosted source: | @@ -11389,11 +11389,11 @@ paths: curl -X POST SELF_HOSTED_CONTROL_PLANE_URL/integrations \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name": "openai-production", "ai_provider_id": "openai", "key": "sk-..." - }" + }' /integrations/{slug}: servers: *ControlPlaneServers @@ -11408,12 +11408,12 @@ paths: schema: type: string responses: - "200": + '200': description: Successful response content: application/json: schema: - $ref: "#/components/schemas/IntegrationDetailResponse" + $ref: '#/components/schemas/IntegrationDetailResponse' x-code-samples: - lang: python label: Default @@ -11427,7 +11427,7 @@ paths: # Get a specific virtual key virtual_key = portkey.virtual_keys.retrieve( - slug="VIRTUAL_KEY_SLUG" + slug='VIRTUAL_KEY_SLUG' ) print(virtual_key) @@ -11441,7 +11441,7 @@ paths: }) const vKey=await portkey.virtualKeys.retrieve({ - slug:"VIRTUAL_KEY_SLUG" + slug:'VIRTUAL_KEY_SLUG' }) console.log(vKey); - lang: curl @@ -11467,7 +11467,7 @@ paths: # Get a specific virtual key virtual_key = portkey.virtual_keys.retrieve( - slug="VIRTUAL_KEY_SLUG" + slug='VIRTUAL_KEY_SLUG' ) print(virtual_key) @@ -11482,7 +11482,7 @@ paths: }) const vKey=await portkey.virtualKeys.retrieve({ - slug:"VIRTUAL_KEY_SLUG" + slug:'VIRTUAL_KEY_SLUG' }) console.log(vKey); @@ -11501,9 +11501,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/UpdateIntegrationRequest" + $ref: '#/components/schemas/UpdateIntegrationRequest' responses: - "200": + '200': description: Successful response content: application/json: @@ -11522,7 +11522,7 @@ paths: # Update a specific integration integration = portkey.integrations.update( - slug="INTEGRATION_SLUG", + slug="INTEGRATION_SLUG', name="updated-name", note="hello" ) @@ -11549,20 +11549,20 @@ paths: curl -X PUT "https://api.portkey.ai/v1/integrations/INTEGRATION_SLUG" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name": "updated-name", "note": "hello" - }" + }' - lang: curl label: Self-Hosted source: | curl -X PUT "SELF_HOSTED_CONTROL_PLANE_URL/integrations/INTEGRATION_SLUG" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name": "updated-name", "note": "hello" - }" + }' - lang: python label: Self-Hosted source: | @@ -11576,7 +11576,7 @@ paths: # Update a specific integration integration = portkey.integrations.update( - slug="INTEGRATION_SLUG", + slug="INTEGRATION_SLUG', name="updated-name", note="hello" ) @@ -11593,7 +11593,7 @@ paths: }) const integration = await portkey.integrations.update({ - slug:"INTEGRATION_SLUG", + slug:'INTEGRATION_SLUG', name:"updated-name", note:"hello" }) @@ -11610,7 +11610,7 @@ paths: schema: type: string responses: - "200": + '200': description: Successful response content: application/json: @@ -11643,7 +11643,7 @@ paths: }) const result=await portkey.integrations.delete({ - slug:"INTEGRATION_SLUG", + slug:'INTEGRATION_SLUG', }) console.log(result); - lang: curl @@ -11699,12 +11699,12 @@ paths: schema: type: string responses: - "200": + '200': description: List of integration models content: application/json: schema: - $ref: "#/components/schemas/IntegrationModelsResponse" + $ref: '#/components/schemas/IntegrationModelsResponse' put: summary: Bulk update integration models @@ -11724,9 +11724,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/BulkUpdateModelsRequest" + $ref: '#/components/schemas/BulkUpdateModelsRequest' responses: - "200": + '200': description: Models updated successfully content: application/json: @@ -11750,9 +11750,9 @@ paths: description: Comma-separated list of model slugs to delete schema: type: string - example: "gpt-4,gpt-3.5-turbo" + example: 'gpt-4,gpt-3.5-turbo' responses: - "200": + '200': description: Models deleted successfully content: application/json: @@ -11772,12 +11772,12 @@ paths: schema: type: string responses: - "200": + '200': description: List of workspace access configurations content: application/json: schema: - $ref: "#/components/schemas/IntegrationWorkspacesResponse" + $ref: '#/components/schemas/IntegrationWorkspacesResponse' put: summary: Bulk update workspace access @@ -11797,9 +11797,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/BulkUpdateWorkspacesRequest" + $ref: '#/components/schemas/BulkUpdateWorkspacesRequest' responses: - "200": + '200': description: Workspace access updated successfully content: application/json: @@ -11830,7 +11830,7 @@ paths: description: Not required when using workspace API keys. Required when using organisation admin keys responses: - "200": + '200': description: Successful response content: application/json: @@ -11846,7 +11846,7 @@ paths: data: type: array items: - $ref: "#/components/schemas/Providers" + $ref: '#/components/schemas/Providers' x-code-samples: - lang: python label: Default @@ -11944,9 +11944,9 @@ paths: type: string nullable: true usage_limits: - $ref: "#/components/schemas/UsageLimits" + $ref: '#/components/schemas/UsageLimits' rate_limits: - $ref: "#/components/schemas/RateLimits" + $ref: '#/components/schemas/RateLimits' expires_at: type: string format: date-time @@ -11956,19 +11956,19 @@ paths: examples: generic: value: - name: "My first provider" - note: "Provider description" - integration_id: "my-openai-integration" + name: 'My first provider' + note: 'Provider description' + integration_id: 'my-openai-integration' usage_limits: { - "credit_limit": 10, - "periodic_reset": "monthly", - "alert_threshold": 9, + 'credit_limit': 10, + 'periodic_reset': 'monthly', + 'alert_threshold': 9, } - workspace_id: "" - slug: "first-openai-provider" + workspace_id: '' + slug: 'first-openai-provider' responses: - "200": + '200': description: Successful response content: application/json: @@ -12019,11 +12019,11 @@ paths: curl -X POST https://api.portkey.ai/v1/providers \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name": "openai provider", "integration_id": "", "workspace_id": "" - }" + }' - lang: python label: Self-Hosted source: | @@ -12065,11 +12065,11 @@ paths: curl -X POST SELF_HOSTED_CONTROL_PLANE_URL/providers \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name": "openai provider", "integrationId": "", "workspaceId": "" - }" + }' /providers/{slug}: servers: *ControlPlaneServers @@ -12090,12 +12090,12 @@ paths: required: true description: Provider slug responses: - "200": + '200': description: Successful response content: application/json: schema: - $ref: "#/components/schemas/Providers" + $ref: '#/components/schemas/Providers' x-code-samples: - lang: python label: Default @@ -12200,10 +12200,10 @@ paths: note: type: string usage_limits: - $ref: "#/components/schemas/UsageLimits" + $ref: '#/components/schemas/UsageLimits' nullable: true rate_limits: - $ref: "#/components/schemas/RateLimits" + $ref: '#/components/schemas/RateLimits' expires_at: type: string format: date-time @@ -12212,7 +12212,7 @@ paths: type: boolean responses: - "200": + '200': description: Successful response content: application/json: @@ -12266,20 +12266,20 @@ paths: curl -X PUT "https://api.portkey.ai/v1/providers/PROVIDER_SLUG?workspace_id=" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name": "updated-name", "note": "updated-note" - }" + }' - lang: curl label: Self-Hosted source: | curl -X PUT "SELF_HOSTED_CONTROL_PLANE_URL/providers/PROVIDER_SLUG?workspace_id=" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name": "updated-name", "note": "updated-note" - }" + }' - lang: python label: Self-Hosted source: | @@ -12335,7 +12335,7 @@ paths: required: true description: Provider slug responses: - "200": + '200': description: Successful response content: application/json: @@ -12436,7 +12436,7 @@ paths: description: Page size, default to 50 responses: - "200": + '200': description: Successful response content: application/json: @@ -12452,8 +12452,8 @@ paths: data: type: array items: - $ref: "#/components/schemas/VirtualKeys" - "401": + $ref: '#/components/schemas/VirtualKeys' + '401': description: Unauthorized response content: application/json: @@ -12470,7 +12470,7 @@ paths: example: success: false data: - message: "Unauthorised Request" + message: 'Unauthorised Request' x-code-samples: - lang: python label: Default @@ -12616,81 +12616,81 @@ paths: type: boolean deploymentName: type: string - required: ["apiVersion", "deploymentName"] + required: ['apiVersion', 'deploymentName'] usage_limits: - $ref: "#/components/schemas/UsageLimits" + $ref: '#/components/schemas/UsageLimits' rate_limits: - $ref: "#/components/schemas/RateLimits" + $ref: '#/components/schemas/RateLimits' expires_at: type: string format: date-time secret_mappings: type: array items: - $ref: "#/components/schemas/SecretMapping" + $ref: '#/components/schemas/SecretMapping' description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "model_config." (e.g. "model_config.awsSecretAccessKey"). Each target_field must be unique. When "key" is mapped, the key field becomes optional. examples: generic: value: - name: "My first virtual key" - provider: "openai" - key: "sk-jhkfkjs8d9f7jksfghkjhfg" - note: "Virtual key description" + name: 'My first virtual key' + provider: 'openai' + key: 'sk-jhkfkjs8d9f7jksfghkjhfg' + note: 'Virtual key description' usage_limits: { - "credit_limit": 10, - "periodic_reset": "monthly", - "alert_threshold": 9, + 'credit_limit': 10, + 'periodic_reset': 'monthly', + 'alert_threshold': 9, } - workspace_id: "" + workspace_id: '' azure-openai: value: - provider: "azure-openai" - key: "openai-test" - name: "Key 1 Azure Open AI" - note: "description" + provider: 'azure-openai' + key: 'openai-test' + name: 'Key 1 Azure Open AI' + note: 'description' deploymentConfig: [ { - "apiVersion": "a", - "alias": "b", - "deploymentName": "c", + 'apiVersion': 'a', + 'alias': 'b', + 'deploymentName': 'c', is_default: true, }, { - "apiVersion": "a", - "alias": "b", - "deploymentName": "c", + 'apiVersion': 'a', + 'alias': 'b', + 'deploymentName': 'c', is_default: false, }, ] - resourceName: "c" + resourceName: 'c' bedrock: value: - provider: "bedrock" - key: "openai-test" - name: "Bedrock Key" - note: "description" - awsAccessKeyId: "a" - awsSecretAccessKey: "b" - awsRegion: "c" + provider: 'bedrock' + key: 'openai-test' + name: 'Bedrock Key' + note: 'description' + awsAccessKeyId: 'a' + awsSecretAccessKey: 'b' + awsRegion: 'c' vertex-ai: value: - provider: "vertex-ai" - key: "vertex test" - name: "Vertex AI Key" - note: "description" - vertexProjectId: "a" - vertexRegion: "b" + provider: 'vertex-ai' + key: 'vertex test' + name: 'Vertex AI Key' + note: 'description' + vertexProjectId: 'a' + vertexRegion: 'b' workers-ai: value: - provider: "vertex-ai" - key: "cloudflare test" - name: "CF Workers AI Key" - note: "description" - workersAiAccountId: "a" + provider: 'vertex-ai' + key: 'cloudflare test' + name: 'CF Workers AI Key' + note: 'description' + workersAiAccountId: 'a' responses: - "200": + '200': description: Successful response content: application/json: @@ -12704,7 +12704,7 @@ paths: properties: slug: type: string - "401": + '401': description: Unauthorized response content: application/json: @@ -12721,7 +12721,7 @@ paths: example: success: false data: - message: "Unauthorised Request" + message: 'Unauthorised Request' x-code-samples: - lang: python label: Default @@ -12762,11 +12762,11 @@ paths: curl -X POST https://api.portkey.ai/v1/virtual-keys \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name": "openaiVKey", "provider": "openai", "key": "PROVIDER_API_KEY" - }" + }' - lang: python label: Self-Hosted source: | @@ -12808,11 +12808,11 @@ paths: curl -X POST SELF_HOSTED_CONTROL_PLANE_URL/virtual-keys \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name": "openaiVKey", "provider": "openai", "key": "PROVIDER_API_KEY" - }" + }' /virtual-keys/{slug}: servers: *ControlPlaneServers @@ -12827,13 +12827,13 @@ paths: schema: type: string responses: - "200": + '200': description: Successful response content: application/json: schema: - $ref: "#/components/schemas/VirtualKeys" - "401": + $ref: '#/components/schemas/VirtualKeys' + '401': description: Unauthorized response content: application/json: @@ -12850,7 +12850,7 @@ paths: example: success: false data: - message: "Unauthorised Request" + message: 'Unauthorised Request' x-code-samples: - lang: python label: Default @@ -12864,7 +12864,7 @@ paths: # Get a specific virtual key virtual_key = portkey.virtual_keys.retrieve( - slug="VIRTUAL_KEY_SLUG" + slug='VIRTUAL_KEY_SLUG' ) print(virtual_key) @@ -12878,7 +12878,7 @@ paths: }) const vKey=await portkey.virtualKeys.retrieve({ - slug:"VIRTUAL_KEY_SLUG" + slug:'VIRTUAL_KEY_SLUG' }) console.log(vKey); - lang: curl @@ -12904,7 +12904,7 @@ paths: # Get a specific virtual key virtual_key = portkey.virtual_keys.retrieve( - slug="VIRTUAL_KEY_SLUG" + slug='VIRTUAL_KEY_SLUG' ) print(virtual_key) @@ -12919,7 +12919,7 @@ paths: }) const vKey=await portkey.virtualKeys.retrieve({ - slug:"VIRTUAL_KEY_SLUG" + slug:'VIRTUAL_KEY_SLUG' }) console.log(vKey); @@ -12960,23 +12960,23 @@ paths: type: boolean deploymentName: type: string - required: ["apiVersion", "deploymentName"] + required: ['apiVersion', 'deploymentName'] usage_limits: - $ref: "#/components/schemas/UsageLimits" + $ref: '#/components/schemas/UsageLimits' secret_mappings: type: array items: - $ref: "#/components/schemas/SecretMapping" + $ref: '#/components/schemas/SecretMapping' description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "model_config." (e.g. "model_config.awsSecretAccessKey"). Each target_field must be unique. responses: - "200": + '200': description: Successful response content: application/json: schema: type: object - "401": + '401': description: Unauthorized response content: application/json: @@ -12993,7 +12993,7 @@ paths: example: success: false data: - message: "Unauthorised Request" + message: 'Unauthorised Request' x-code-samples: - lang: python label: Default @@ -13007,7 +13007,7 @@ paths: # Update a specific virtual key updated_virtual_key = portkey.virtual_keys.update( - slug="VIRTUAL_KEY_SLUG", + slug='VIRTUAL_KEY_SLUG', name="openaiVKey", note="hello", rate_limits=[{"type": "requests", "unit": "rpm", "value": 696}] @@ -13024,7 +13024,7 @@ paths: }) const updatedVKey=await portkey.virtualKeys.update({ - slug:"VIRTUAL_KEY_SLUG", + slug:'VIRTUAL_KEY_SLUG', name:"openaiVKey", note:"hello", rate_limits: [{type: "requests", unit: "rpm", value: 696}] @@ -13036,7 +13036,7 @@ paths: curl -X PUT "https://api.portkey.ai/v1/virtual_keys/VIRTUAL_KEY_SLUG" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name": "openaiVKey", "note": "hello", "rate_limits": [ @@ -13046,14 +13046,14 @@ paths: "value": 696 } ] - }" + }' - lang: curl label: Self-Hosted source: | curl -X PUT "SELF_HOSTED_CONTROL_PLANE_URL/virtual_keys/VIRTUAL_KEY_SLUG" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name": "openaiVKey", "note": "hello", "rate_limits": [ @@ -13063,7 +13063,7 @@ paths: "value": 696 } ] - }" + }' - lang: python label: Self-Hosted source: | @@ -13077,7 +13077,7 @@ paths: # Update a specific virtual key updated_virtual_key = portkey.virtual_keys.update( - slug="VIRTUAL_KEY_SLUG", + slug='VIRTUAL_KEY_SLUG', name="openaiVKey", note="hello", rate_limits=[{"type": "requests", "unit": "rpm", "value": 696}] @@ -13095,7 +13095,7 @@ paths: }) const updatedVkey=await portkey.virtualKeys.update({ - slug:"VIRTUAL_KEY_SLUG", + slug:'VIRTUAL_KEY_SLUG', name:"openaiVKey", note:"hello", rate_limits: [{type: "requests", unit: "rpm", value: 696}] @@ -13113,14 +13113,14 @@ paths: schema: type: string responses: - "200": + '200': description: Successful response content: application/json: schema: type: object - "401": + '401': description: Unauthorized response content: application/json: @@ -13137,7 +13137,7 @@ paths: example: success: false data: - message: "Unauthorised Request" + message: 'Unauthorised Request' x-code-samples: - lang: python label: Default @@ -13151,7 +13151,7 @@ paths: # Delete a specific virtual key result = portkey.virtual_keys.delete( - slug="VIRTUAL_KEY_SLUG" + slug='VIRTUAL_KEY_SLUG' ) print(result) @@ -13165,7 +13165,7 @@ paths: }) const result=await portkey.virtualKeys.delete({ - slug:"VIRTUAL_KEY_SLUG", + slug:'VIRTUAL_KEY_SLUG', }) console.log(result); - lang: curl @@ -13189,7 +13189,7 @@ paths: # Delete a specific virtual key result = portkey.virtual_keys.delete( - slug="VIRTUAL_KEY_SLUG" + slug='VIRTUAL_KEY_SLUG' ) print(result) @@ -13204,7 +13204,7 @@ paths: }) const result=await portkey.virtualKeys.delete({ - slug:"VIRTUAL_KEY_SLUG", + slug:'VIRTUAL_KEY_SLUG', }) console.log(result); @@ -13216,12 +13216,12 @@ paths: description: Send an invite to user for your organization parameters: [] responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/SuccessInvite" + $ref: '#/components/schemas/SuccessInvite' tags: - User-invites requestBody: @@ -13229,7 +13229,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateInvite" + $ref: '#/components/schemas/CreateInvite' x-code-samples: - lang: python label: Default @@ -13296,7 +13296,7 @@ paths: curl -X POST https://api.portkey.ai/v1/admin/users/invites -H "x-portkey-api-key: PORTKEY_API_KEY" -H "Content-Type: application/json" - -d "{ + -d '{ "email": "user@example.com", "role": "member", "workspaces": [ @@ -13313,14 +13313,14 @@ paths: "logs.view" ] } - }" + }' - lang: curl label: Self-Hosted source: | curl -X POST SELF_HOSTED_CONTROL_PLANE_URL/admin/users/invites -H "x-portkey-api-key: PORTKEY_API_KEY" -H "Content-Type: application/json" - -d "{ + -d '{ "email": "user@example.com", "role": "member", "workspaces": [ @@ -13337,7 +13337,7 @@ paths: "logs.view" ] } - }" + }' - lang: python label: Self-Hosted source: | @@ -13410,12 +13410,12 @@ paths: in: query schema: type: integer - example: "1" + example: '1' - name: currentPage in: query schema: type: integer - example: "0" + example: '0' - name: role in: query schema: @@ -13423,13 +13423,13 @@ paths: enum: - admin - member - example: "admin" + example: 'admin' - name: email in: query schema: type: string format: email - example: "foo@bar.com" + example: 'foo@bar.com' - name: status in: query schema: @@ -13439,9 +13439,9 @@ paths: - cancelled - accepted - expired - example: "pending" + example: 'pending' responses: - "200": + '200': description: OK headers: Content-Type: @@ -13451,7 +13451,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/InviteList" + $ref: '#/components/schemas/InviteList' example: object: list total: 2 @@ -13460,14 +13460,14 @@ paths: id: 419641fb-1458-47d6-94d0-e308159b3ec2 email: horace.slughorn@example.com role: member - created_at: "2023-12-12 13:56:32" - expires_at: "2023-12-12 13:56:32" - accepted_at: "2023-12-12 13:56:32" + created_at: '2023-12-12 13:56:32' + expires_at: '2023-12-12 13:56:32' + accepted_at: '2023-12-12 13:56:32' status: pending invited_by: a90e74fb-269e-457b-8b59-9426cdd8907e workspaces: - - workspace_id: "" - role: "" + - workspace_id: '' + role: '' x-code-samples: - lang: python label: Default @@ -13554,7 +13554,7 @@ paths: required: true description: string responses: - "200": + '200': description: OK headers: Content-Type: @@ -13564,20 +13564,20 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Invite" + $ref: '#/components/schemas/Invite' example: object: invite id: 419641fb-1458-47d6-94d0-e308159b3ec2 email: horace.slughorn@example.com role: member - created_at: "2023-12-12 13:56:32" - expires_at: "2023-12-12 13:56:32" - accepted_at: "2023-12-12 13:56:32" + created_at: '2023-12-12 13:56:32' + expires_at: '2023-12-12 13:56:32' + accepted_at: '2023-12-12 13:56:32' status: pending invited_by: 8dcfa174-c5ed-42c7-8a63-be755cc6e3123 workspaces: - - workspace_id: "" - role: "" + - workspace_id: '' + role: '' x-code-samples: - lang: python label: Default @@ -13591,7 +13591,7 @@ paths: # Get a user invite user = portkey.admin.users.invites.retrieve( - invite_id="INVITE_ID" + invite_id='INVITE_ID' ) print(user) @@ -13605,7 +13605,7 @@ paths: }) const user=await portkey.admin.users.invites.retrieve({ - inviteId: "INVITE_ID", + inviteId: 'INVITE_ID', }); console.log(user); - lang: curl @@ -13631,7 +13631,7 @@ paths: # Get a user invite user = portkey.admin.users.invites.retrieve( - invite_id="INVITE_ID" + invite_id='INVITE_ID' ) print(user) @@ -13646,7 +13646,7 @@ paths: }) const user=await portkey.admin.users.invites.retrieve({ - inviteId: "INVITE_ID", + inviteId: 'INVITE_ID', }); console.log(user); delete: @@ -13660,7 +13660,7 @@ paths: type: string required: true responses: - "200": + '200': description: OK headers: Content-Type: @@ -13762,7 +13762,7 @@ paths: type: string required: true responses: - "200": + '200': description: OK headers: Content-Type: @@ -13868,17 +13868,17 @@ paths: in: header schema: type: string - example: "{{PORTKEY_API_KEY}}" + example: '{{PORTKEY_API_KEY}}' - name: pageSize in: query schema: type: integer - example: "1" + example: '1' - name: currentPage in: query schema: type: integer - example: "0" + example: '0' - name: role in: query schema: @@ -13887,15 +13887,15 @@ paths: - admin - member - owner - example: "admin" + example: 'admin' - name: email in: query schema: type: string format: email - example: "foo@bar.com" + example: 'foo@bar.com' responses: - "200": + '200': description: OK headers: Content-Type: @@ -13905,7 +13905,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/UserList" + $ref: '#/components/schemas/UserList' example: total: 2 object: list @@ -13916,8 +13916,8 @@ paths: last_name: slughorn role: member email: horace.slughorn@example.com - created_at: "2024-01-25 11:35:07" - last_updated_at: "2024-01-25 11:35:07" + created_at: '2024-01-25 11:35:07' + last_updated_at: '2024-01-25 11:35:07' x-code-samples: - lang: python label: Default @@ -13999,7 +13999,7 @@ paths: type: string required: true responses: - "200": + '200': description: OK headers: Content-Type: @@ -14009,7 +14009,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/User" + $ref: '#/components/schemas/User' example: object: user id: 61e08f60-4822-465e-ba23-39f85cd741cb @@ -14017,9 +14017,9 @@ paths: last_name: slughorn role: member email: horace.slughorn@example.com - created_at: "2024-01-25 11:35:07" - last_updated_at: "2024-01-25 11:35:07" - workspace_ids: ["ws-shared-123"] + created_at: '2024-01-25 11:35:07' + last_updated_at: '2024-01-25 11:35:07' + workspace_ids: ['ws-shared-123'] x-code-sample: - lang: python label: Default @@ -14033,7 +14033,7 @@ paths: # Get a specific user user = portkey.admin.users.retrieve( - user_id="USER_ID" + user_id='USER_ID' ) print(user) @@ -14047,7 +14047,7 @@ paths: apiKey: "PORTKEY_API_KEY", }) const user = await portkey.admin.users.retrieve({ - userId: "USER_ID", + userId: 'USER_ID', }); console.log(user); @@ -14074,7 +14074,7 @@ paths: # Get a specific user user = portkey.admin.users.retrieve( - user_id="USER_ID" + user_id='USER_ID' ) print(user) @@ -14088,7 +14088,7 @@ paths: baseUrl: "SELF_HOSTED_CONTROL_PLANE_URL" }) const user = await portkey.admin.users.retrieve({ - userId: "USER_ID", + userId: 'USER_ID', }); console.log(user); @@ -14104,7 +14104,7 @@ paths: type: string required: true responses: - "200": + '200': description: OK headers: Content-Type: @@ -14129,7 +14129,7 @@ paths: # Delete a user user = portkey.admin.users.delete( - user_id="USER_ID" + user_id='USER_ID' ) print(user) @@ -14143,7 +14143,7 @@ paths: }) const user=await portkey.admin.users.delete({ - userId: "USER_ID", + userId: 'USER_ID', }) console.log(user); @@ -14170,7 +14170,7 @@ paths: # Delete a user user = portkey.admin.users.delete( - user_id="USER_ID" + user_id='USER_ID' ) print(user) @@ -14185,7 +14185,7 @@ paths: }) const user=await portkey.admin.users.delete({ - userId: "USER_ID", + userId: 'USER_ID', }) console.log(user); @@ -14213,7 +14213,7 @@ paths: type: string required: true responses: - "200": + '200': description: OK headers: Content-Type: @@ -14238,7 +14238,7 @@ paths: # Update a user user = portkey.admin.users.update( - user_id="USER_ID", + user_id='USER_ID', role="member" ) @@ -14253,7 +14253,7 @@ paths: }) const user = await portkey.admin.users.update({ - userId: "USER_ID", + userId: 'USER_ID', role: "member" }) @@ -14263,13 +14263,13 @@ paths: source: | curl -X PUT "https://api.portkey.ai/v1/admin/users/USER_ID" -H "x-portkey-api-key: PORTKEY_API_KEY" - -d "{"role":"member"}" + -d '{"role":"member"}' - lang: curl label: Self-Hosted source: | curl -X PUT "SELF_HOSTED_CONTROL_PLANE_URL/admin/users/USER_ID" -H "x-portkey-api-key: PORTKEY_API_KEY" - -d "{"role":"member"}" + -d '{"role":"member"}' - lang: python label: Self-Hosted source: | @@ -14283,7 +14283,7 @@ paths: # Update a user user = portkey.admin.users.update( - user_id="USER_ID", + user_id='USER_ID', role="member" ) @@ -14299,7 +14299,7 @@ paths: }) const user = await portkey.admin.users.update({ - userId: "USER_ID", + userId: 'USER_ID', role: "member" }) @@ -14348,7 +14348,7 @@ paths: type: string required: true responses: - "200": + '200': description: OK content: application/json: @@ -14391,7 +14391,7 @@ paths: workspaceId: "WORKSPACE_SLUG", users:[{ id:"USER_ID", - role:"member" + role:'member' }] }) console.log(user); @@ -14400,13 +14400,13 @@ paths: source: | curl -X POST "https://api.portkey.ai/v1/admin/workspaces/{workspaceId}/users" -H "x-portkey-api-key: PORTKEY_API_KEY" - -d "{"users":[{"id":"USER_ID","role":"member"}]}" + -d '{"users":[{"id":"USER_ID","role":"member"}]}' - lang: curl label: Self-Hosted source: | curl -X POST "SELF_HOSTED_CONTROL_PLANE_URL/admin/workspaces/{workspaceId}/users" -H "x-portkey-api-key: PORTKEY_API_KEY" - -d "{"users":[{"id":"USER_ID","role":"member"}]}" + -d '{"users":[{"id":"USER_ID","role":"member"}]}' - lang: python label: Self-Hosted source: | @@ -14444,7 +14444,7 @@ paths: workspaceId: "WORKSPACE_SLUG", users: [{ id: "USER_ID", - role: "member" + role: 'member' }] }) @@ -14476,21 +14476,21 @@ paths: in: query schema: type: string - enum: ["admin", "manager", "member"] - example: "admin" + enum: ['admin', 'manager', 'member'] + example: 'admin' - name: email in: query schema: type: string - example: "foo@bar.com" + example: 'foo@bar.com' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/WorkspaceMemberList" + $ref: '#/components/schemas/WorkspaceMemberList' x-code-samples: - lang: python label: Default @@ -14518,7 +14518,7 @@ paths: }) const user=await portkey.admin.workspaces.users.list({ - workspaceId: "WORKSPACE_SLUG", + workspaceId: 'WORKSPACE_SLUG', }) console.log(user); - lang: curl @@ -14558,7 +14558,7 @@ paths: }) const user=await portkey.admin.workspaces.users.list({ - workspaceId: "WORKSPACE_SLUG", + workspaceId: 'WORKSPACE_SLUG', }) console.log(user); @@ -14594,7 +14594,7 @@ paths: type: string required: true responses: - "200": + '200': description: OK headers: Content-Type: @@ -14619,9 +14619,9 @@ paths: # Update user in workspace updated_user = portkey.admin.workspaces.users.update( - workspace_id="WORKSPACE_SLUG", + workspace_id='WORKSPACE_SLUG', user_id="USER_ID", - role="member" + role='member' ) print(updated_user) @@ -14635,9 +14635,9 @@ paths: }) const user=await portkey.admin.workspaces.users.update({ - workspaceId: "WORKSPACE_SLUG", + workspaceId: 'WORKSPACE_SLUG', userId:"USER_ID", - role:"member" + role:'member' }) console.log(user); - lang: curl @@ -14645,13 +14645,13 @@ paths: source: | curl -X PUT "https://api.portkey.ai/v1/admin/workspaces/{workspaceId}/users/{userId}" -H "x-portkey-api-key: PORTKEY_API_KEY" - -d "{"role":"member"}" + -d '{"role":"member"}' - lang: curl label: Self-Hosted source: | curl -X PUT "SELF_HOSTED_CONTROL_PLANE_URL/admin/workspaces/{workspaceId}/users/{userId}" -H "x-portkey-api-key: PORTKEY_API_KEY" - -d "{"role":"member"}" + -d '{"role":"member"}' - lang: python label: Self-Hosted source: | @@ -14665,9 +14665,9 @@ paths: # Update user in workspace updated_user = portkey.admin.workspaces.users.update( - workspace_id="WORKSPACE_SLUG", + workspace_id='WORKSPACE_SLUG', user_id="USER_ID", - role="member" + role='member' ) print(updated_user) @@ -14682,9 +14682,9 @@ paths: }) const user=await portkey.admin.workspaces.users.update({ - workspaceId: "WORKSPACE_SLUG", + workspaceId: 'WORKSPACE_SLUG', userId:"USER_ID", - role:"member" + role:'member' }) console.log(user); @@ -14704,7 +14704,7 @@ paths: type: string required: true responses: - "200": + '200': description: OK headers: Content-Type: @@ -14729,8 +14729,8 @@ paths: # Delete user from workspace result = portkey.admin.workspaces.users.delete( - workspace_id="WORKSPACE_SLUG", - user_id="USER_ID" + workspace_id='WORKSPACE_SLUG', + user_id='USER_ID' ) # Print the result (if any) @@ -14745,8 +14745,8 @@ paths: }) user = await portkey.admin.workspaces.users.delete({ - workspaceId: "WORKSPACE_SLUG", - userId:"USER_ID" + workspaceId: 'WORKSPACE_SLUG', + userId:'USER_ID' }) console.log(user) @@ -14773,8 +14773,8 @@ paths: # Delete user from workspace result = portkey.admin.workspaces.users.delete( - workspace_id="WORKSPACE_SLUG", - user_id="USER_ID" + workspace_id='WORKSPACE_SLUG', + user_id='USER_ID' ) # Print the result (if any) @@ -14790,8 +14790,8 @@ paths: }) user = await portkey.admin.workspaces.users.delete({ - workspaceId: "WORKSPACE_SLUG", - userId:"USER_ID" + workspaceId: 'WORKSPACE_SLUG', + userId:'USER_ID' }) console.log(user) @@ -14812,7 +14812,7 @@ paths: type: string required: true responses: - "200": + '200': description: OK headers: Content-Type: @@ -14822,7 +14822,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/WorkspaceMember" + $ref: '#/components/schemas/WorkspaceMember' example: object: workspace-user id: 66dc015d-0270-11f1-8eec-0e27d7367989 @@ -14830,8 +14830,8 @@ paths: last_name: Doe org_role: admin role: admin - created_at: "2026-03-09T07:55:25.000Z" - last_updated_at: "2026-03-09T07:55:25.000Z" + created_at: '2026-03-09T07:55:25.000Z' + last_updated_at: '2026-03-09T07:55:25.000Z' status: active workspace_id: bf276bb9-4cef-4d87-b69b-b23a6ed6b1dd email: john.doe@example.com @@ -14883,8 +14883,8 @@ paths: }) const user=await portkey.admin.workspaces.users.retrieve({ - workspaceId: "WORKSPACE_SLUG", - userId:"USER_ID", + workspaceId: 'WORKSPACE_SLUG', + userId:'USER_ID', }) console.log(user); - lang: curl @@ -14926,8 +14926,8 @@ paths: }) const user=await portkey.admin.workspaces.users.retrieve({ - workspaceId: "WORKSPACE_SLUG", - userId:"USER_ID", + workspaceId: 'WORKSPACE_SLUG', + userId:'USER_ID', }) console.log(user); @@ -14961,11 +14961,11 @@ paths: usage_limits: type: array items: - $ref: "#/components/schemas/UsageLimits" + $ref: '#/components/schemas/UsageLimits' rate_limits: type: array items: - $ref: "#/components/schemas/RateLimits" + $ref: '#/components/schemas/RateLimits' example: name: My Workspace @@ -14975,7 +14975,7 @@ paths: environment: production foo: bar responses: - "200": + '200': description: OK headers: Content-Type: @@ -14985,7 +14985,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Workspace" + $ref: '#/components/schemas/Workspace' x-code-samples: - lang: python label: Default @@ -14999,7 +14999,7 @@ paths: # Add a workspace workspace = portkey.admin.workspaces.create( - name="WORKSPACE_NAME_0909", + name='WORKSPACE_NAME_0909', description="WORKSPACE_DESCRIPTION", defaults={ "metadata": { @@ -15020,7 +15020,7 @@ paths: }) const workspace=await portkey.admin.workspaces.create({ - name: "WORKSPACE_NAME_0909", + name: 'WORKSPACE_NAME_0909', description: "WORKSPACE_DESCRIPTION", defaults: { metadata: { @@ -15036,7 +15036,7 @@ paths: curl -X POST https://api.portkey.ai/v1/admin/workspaces \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name": "WORKSPACE_NAME_0909", "description": "WORKSPACE_DESCRIPTION", "defaults": { @@ -15045,14 +15045,14 @@ paths: "foo": "bar" } } - }" + }' - lang: curl label: Self-Hosted source: | curl -X POST SELF_HOSTED_CONTROL_PLANE_URL/admin/workspaces \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name": "WORKSPACE_NAME_0909", "description": "WORKSPACE_DESCRIPTION", "defaults": { @@ -15061,7 +15061,7 @@ paths: "foo": "bar" } } - }" + }' - lang: python label: Self-Hosted source: | @@ -15075,7 +15075,7 @@ paths: # Add a workspace workspace = portkey.admin.workspaces.create( - name="WORKSPACE_NAME_0909", + name='WORKSPACE_NAME_0909', description="WORKSPACE_DESCRIPTION", defaults={ "metadata": { @@ -15097,7 +15097,7 @@ paths: }) const workspace = await portkey.admin.workspaces.create({ - name: "WORKSPACE_NAME_0909", + name: 'WORKSPACE_NAME_0909', description: "WORKSPACE_DESCRIPTION", defaults: { metadata: { @@ -15118,23 +15118,23 @@ paths: in: query schema: type: integer - example: "1" + example: '1' - name: current_page in: query schema: type: integer - example: "0" + example: '0' - name: name in: query schema: type: string - example: "workspace" - description: "Workspace name to filter results, case sensitive" + example: 'workspace' + description: 'Workspace name to filter results, case sensitive' - name: exact_name in: query schema: type: string - description: "Workspace name filter with strict check" + description: 'Workspace name filter with strict check' - name: status in: query schema: @@ -15142,10 +15142,10 @@ paths: enum: - active - archived - example: "active,archived" - description: "Workspace status to filter results, comma separated" + example: 'active,archived' + description: 'Workspace status to filter results, comma separated' responses: - "200": + '200': description: OK headers: Content-Type: @@ -15155,7 +15155,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/WorkspaceList" + $ref: '#/components/schemas/WorkspaceList' example: total: 2 object: list @@ -15163,14 +15163,14 @@ paths: - id: test-prod-ws-12345 name: Test prod workspace description: This is a production workspace - created_at: "2023-07-13 13:51:27" - last_updated_at: "2023-07-13 14:51:27" + created_at: '2023-07-13 13:51:27' + last_updated_at: '2023-07-13 14:51:27' object: workspace - id: test-prod-ws-12345 name: Test prod workspace description: This is a production workspace - created_at: "2023-07-13 13:51:27" - last_updated_at: "2023-07-13 14:51:27" + created_at: '2023-07-13 13:51:27' + last_updated_at: '2023-07-13 14:51:27' object: workspace x-code-samples: - lang: python @@ -15268,11 +15268,11 @@ paths: usage_limits: type: array items: - $ref: "#/components/schemas/UsageLimits" + $ref: '#/components/schemas/UsageLimits' rate_limits: type: array items: - $ref: "#/components/schemas/RateLimits" + $ref: '#/components/schemas/RateLimits' example: name: My Workspace @@ -15287,7 +15287,7 @@ paths: type: string required: true responses: - "200": + '200': description: OK headers: Content-Type: @@ -15312,9 +15312,9 @@ paths: # Update workspace workspace = portkey.admin.workspaces.update( - workspace_id="WORKSPACE_ID", - name="WORKSPACE 0909", - description="This is a test description", + workspace_id='WORKSPACE_ID', + name='WORKSPACE 0909', + description='This is a test description', defaults={ "x": "y" } @@ -15331,9 +15331,9 @@ paths: }) const workspace=await portkey.admin.workspaces.update({ - workspaceId: "WORKSPACE_ID", - name: "WORKSPACE 0909", - description: "This is a test description", + workspaceId: 'WORKSPACE_ID', + name: 'WORKSPACE 0909', + description: 'This is a test description', defaults: { x: "y" } @@ -15345,14 +15345,14 @@ paths: curl -X PUT "https://api.portkey.ai/v1/admin/workspaces/{workspaceId}" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{"name":"WORKSPACE 0909","description":"This is a test description","defaults":{"x":"y"}}" + -d '{"name":"WORKSPACE 0909","description":"This is a test description","defaults":{"x":"y"}}' - lang: curl label: Self-Hosted source: | curl -X PUT "SELF_HOSTED_CONTROL_PLANE_URL/admin/workspaces/{workspaceId}" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{"name":"WORKSPACE 0909","description":"This is a test description","defaults":{"x":"y"}}" + -d '{"name":"WORKSPACE 0909","description":"This is a test description","defaults":{"x":"y"}}' - lang: python label: Self-Hosted source: | @@ -15366,9 +15366,9 @@ paths: # Update workspace workspace = portkey.admin.workspaces.update( - workspace_id="WORKSPACE_ID", - name="WORKSPACE 0909", - description="This is a test description", + workspace_id='WORKSPACE_ID', + name='WORKSPACE 0909', + description='This is a test description', defaults={ x: "y" } @@ -15386,9 +15386,9 @@ paths: }) const workspace=await portkey.admin.workspaces.update({ - workspaceId: "WORKSPACE_ID", - name: "WORKSPACE 0909", - description: "This is a test description", + workspaceId: 'WORKSPACE_ID', + name: 'WORKSPACE 0909', + description: 'This is a test description', defaults: { x: "y" } @@ -15406,7 +15406,7 @@ paths: type: string required: true responses: - "200": + '200': description: OK headers: Content-Type: @@ -15416,7 +15416,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/WorkspaceWithUsers" + $ref: '#/components/schemas/WorkspaceWithUsers' x-code-samples: - lang: python label: Default @@ -15430,7 +15430,7 @@ paths: # Get workspace details workspace = portkey.admin.workspaces.retrieve( - workspace_id="WORKSPACE_SLUG" + workspace_id='WORKSPACE_SLUG' ) print(workspace) @@ -15444,7 +15444,7 @@ paths: }) const workspace=await portkey.admin.workspaces.retrieve({ - workspaceId: "WORKSPACE_SLUG", + workspaceId: 'WORKSPACE_SLUG', }) console.log(workspace); - lang: curl @@ -15470,7 +15470,7 @@ paths: # Get workspace details workspace = portkey.admin.workspaces.retrieve( - workspace_id="WORKSPACE_SLUG" + workspace_id='WORKSPACE_SLUG' ) print(workspace) @@ -15485,7 +15485,7 @@ paths: }) const workspace=await portkey.admin.workspaces.retrieve({ - workspaceId: "WORKSPACE_SLUG", + workspaceId: 'WORKSPACE_SLUG', }) console.log(workspace); @@ -15500,7 +15500,7 @@ paths: type: string required: true responses: - "200": + '200': description: OK x-code-samples: - lang: python @@ -15515,7 +15515,7 @@ paths: # Delete workspace result = portkey.admin.workspaces.delete( - workspace_id="WORKSPACE_SLUG" + workspace_id='WORKSPACE_SLUG' ) print(result) @@ -15529,7 +15529,7 @@ paths: }) const workspace=await portkey.admin.workspaces.delete({ - workspaceId: "WORKSPACE_SLUG", + workspaceId: 'WORKSPACE_SLUG', }) console.log(workspace); - lang: curl @@ -15555,7 +15555,7 @@ paths: # Delete workspace result = portkey.admin.workspaces.delete( - workspace_id="WORKSPACE_SLUG" + workspace_id='WORKSPACE_SLUG' ) print(result) @@ -15570,7 +15570,7 @@ paths: }) const workspace=await portkey.admin.workspaces.delete({ - workspaceId: "WORKSPACE_SLUG", + workspaceId: 'WORKSPACE_SLUG', }) console.log(workspace); @@ -15587,22 +15587,22 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateMcpIntegration" + $ref: '#/components/schemas/CreateMcpIntegration' examples: default: summary: Minimal (required fields only) value: - name: "My MCP Server" - url: "https://mcp.example.com/mcp" - auth_type: "none" - transport: "http" + name: 'My MCP Server' + url: 'https://mcp.example.com/mcp' + auth_type: 'none' + transport: 'http' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/McpIntegrationCreateResponse" + $ref: '#/components/schemas/McpIntegrationCreateResponse' get: operationId: McpIntegrations_list tags: @@ -15646,12 +15646,12 @@ paths: schema: type: string responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/McpIntegrationListResponse" + $ref: '#/components/schemas/McpIntegrationListResponse' /mcp-integrations/{mcpIntegrationId}: servers: *ControlPlaneServers @@ -15668,12 +15668,12 @@ paths: - MCP Integrations summary: Get MCP Integration responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/McpIntegration" + $ref: '#/components/schemas/McpIntegration' put: operationId: McpIntegrations_update tags: @@ -15683,9 +15683,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/UpdateMcpIntegration" + $ref: '#/components/schemas/UpdateMcpIntegration' responses: - "200": + '200': description: OK content: application/json: @@ -15697,7 +15697,7 @@ paths: - MCP Integrations summary: Delete MCP Integration responses: - "200": + '200': description: OK content: application/json: @@ -15725,14 +15725,14 @@ paths: type: string description: When set, response uses data/total shape instead of workspaces responses: - "200": + '200': description: OK content: application/json: schema: oneOf: - - $ref: "#/components/schemas/McpIntegrationWorkspacesListResponse" - - $ref: "#/components/schemas/McpIntegrationWorkspacesLegacyResponse" + - $ref: '#/components/schemas/McpIntegrationWorkspacesListResponse' + - $ref: '#/components/schemas/McpIntegrationWorkspacesLegacyResponse' put: operationId: McpIntegrationWorkspaces_bulkUpdate tags: @@ -15743,9 +15743,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/BulkUpdateMcpIntegrationWorkspaces" + $ref: '#/components/schemas/BulkUpdateMcpIntegrationWorkspaces' responses: - "200": + '200': description: OK content: application/json: @@ -15790,12 +15790,12 @@ paths: - resource - resource_template responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/McpIntegrationCapabilitiesListResponse" + $ref: '#/components/schemas/McpIntegrationCapabilitiesListResponse' put: operationId: McpIntegrationCapabilities_bulkUpdate tags: @@ -15806,14 +15806,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/BulkUpdateMcpIntegrationCapabilities" + $ref: '#/components/schemas/BulkUpdateMcpIntegrationCapabilities' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/McpIntegrationCapabilitiesBulkUpdateResponse" + $ref: '#/components/schemas/McpIntegrationCapabilitiesBulkUpdateResponse' /mcp-integrations/{mcpIntegrationId}/metadata: servers: *ControlPlaneServers parameters: @@ -15829,12 +15829,12 @@ paths: - MCP Integrations > Metadata summary: Get MCP Integration Metadata responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/McpIntegrationMetadata" + $ref: '#/components/schemas/McpIntegrationMetadata' /mcp-servers: servers: *ControlPlaneServers @@ -15849,20 +15849,20 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateMcpServer" + $ref: '#/components/schemas/CreateMcpServer' examples: default: summary: Minimal (required fields only) value: - name: "My MCP Server" - mcp_integration_id: "MCP_INTEGRATION_ID_OR_SLUG" + name: 'My MCP Server' + mcp_integration_id: 'MCP_INTEGRATION_ID_OR_SLUG' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/McpServerCreateResponse" + $ref: '#/components/schemas/McpServerCreateResponse' get: operationId: McpServers_list tags: @@ -15899,12 +15899,12 @@ paths: type: string maxLength: 255 responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/McpServerListResponse" + $ref: '#/components/schemas/McpServerListResponse' /mcp-servers/{mcpServerId}: servers: *ControlPlaneServers @@ -15921,12 +15921,12 @@ paths: - MCP Servers summary: Get MCP Server responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/McpServer" + $ref: '#/components/schemas/McpServer' put: operationId: McpServers_update tags: @@ -15936,9 +15936,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/UpdateMcpServer" + $ref: '#/components/schemas/UpdateMcpServer' responses: - "200": + '200': description: OK content: application/json: @@ -15950,7 +15950,7 @@ paths: - MCP Servers summary: Delete MCP Server responses: - "200": + '200': description: OK content: application/json: @@ -15973,12 +15973,12 @@ paths: summary: Test MCP Server Connection description: Test connectivity to the MCP server via its integration URL. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/McpServerTestResponse" + $ref: '#/components/schemas/McpServerTestResponse' /mcp-servers/{mcpServerId}/capabilities: servers: *ControlPlaneServers @@ -16018,12 +16018,12 @@ paths: - resource - resource_template responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/McpServerCapabilitiesListResponse" + $ref: '#/components/schemas/McpServerCapabilitiesListResponse' put: operationId: McpServerCapabilities_bulkUpdate tags: @@ -16034,14 +16034,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/BulkUpdateMcpServerCapabilities" + $ref: '#/components/schemas/BulkUpdateMcpServerCapabilities' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/McpServerCapabilitiesBulkUpdateResponse" + $ref: '#/components/schemas/McpServerCapabilitiesBulkUpdateResponse' /mcp-servers/{mcpServerId}/user-access: servers: *ControlPlaneServers @@ -16077,12 +16077,12 @@ paths: type: string description: Search by user name or email responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/McpServerUserAccessListResponse" + $ref: '#/components/schemas/McpServerUserAccessListResponse' put: operationId: McpServerUserAccess_bulkUpdate tags: @@ -16092,14 +16092,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/BulkUpdateMcpServerUserAccess" + $ref: '#/components/schemas/BulkUpdateMcpServerUserAccess' responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/McpServerUserAccessBulkUpdateResponse" + $ref: '#/components/schemas/McpServerUserAccessBulkUpdateResponse' /mcp-servers/{mcpServerId}/connections: servers: *ControlPlaneServers @@ -16140,12 +16140,12 @@ paths: maximum: 500 default: 100 responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/McpServerConnectionsListResponse" + $ref: '#/components/schemas/McpServerConnectionsListResponse' delete: operationId: McpServerConnections_delete tags: @@ -16164,12 +16164,12 @@ paths: type: string description: Workspace ID or slug. Required when using org admin API key; optional when API key is workspace-scoped. responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/McpServerConnectionDeleteResponse" + $ref: '#/components/schemas/McpServerConnectionDeleteResponse' /logs: servers: *DataPlaneServers @@ -16184,12 +16184,12 @@ paths: application/json: schema: oneOf: - - $ref: "#/components/schemas/CustomLog" + - $ref: '#/components/schemas/CustomLog' - type: array items: - $ref: "#/components/schemas/CustomLog" + $ref: '#/components/schemas/CustomLog' responses: - "200": + '200': description: Successful response x-code-samples: - lang: python @@ -16263,7 +16263,7 @@ paths: curl -X POST "https://api.portkey.ai/v1/logs" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "request": { "url": "https://api.someprovider.com/model/generate", "method": "POST", @@ -16280,14 +16280,14 @@ paths: "user_id": "123", "user_name": "John Doe" } - }" + }' - lang: curl label: Self-Hosted source: | curl -X POST "SELF_HOSTED_GATEWAY_URL/logs" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "request": { "url": "https://api.someprovider.com/model/generate", "method": "POST", @@ -16304,7 +16304,7 @@ paths: "user_id": "123", "user_name": "John Doe" } - }" + }' - lang: python label: Self-Hosted source: | @@ -16385,12 +16385,12 @@ paths: schema: type: string responses: - "200": + '200': description: Successful response content: application/json: schema: - $ref: "#/components/schemas/LogObject" + $ref: '#/components/schemas/LogObject' /logs/exports/{exportId}: servers: *ControlPlaneServers get: @@ -16404,12 +16404,12 @@ paths: schema: type: string responses: - "200": + '200': description: Successful response content: application/json: schema: - $ref: "#/components/schemas/ExportItem" + $ref: '#/components/schemas/ExportItem' x-code-samples: - lang: python label: Default @@ -16464,7 +16464,7 @@ paths: ) res = portkey.logs.exports.retrieve( - export_id="EXPORT_ID" + export_id='EXPORT_ID' ) print(res) @@ -16480,7 +16480,7 @@ paths: async function main() { const res= await portkey.logs.exports.retrieve({ - exportId:"EXPORT_ID" + exportId:'EXPORT_ID' });; console.log(res); @@ -16506,18 +16506,18 @@ paths: workspace_id: type: string filters: - $ref: "#/components/schemas/GenerationsFilterSchema" + $ref: '#/components/schemas/GenerationsFilterSchema' requested_data: - $ref: "#/components/schemas/LogExportsRequestedData" + $ref: '#/components/schemas/LogExportsRequestedData' required: - filters responses: - "200": + '200': description: Successful response content: application/json: schema: - $ref: "#/components/schemas/UpdateExportResponse" + $ref: '#/components/schemas/UpdateExportResponse' x-code-samples: - lang: python label: Default @@ -16565,14 +16565,14 @@ paths: curl -X PUT "https://api.portkey.ai/v1/logs/exports/EXPORT_ID" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{"workspace_id":"WORKSPACE_ID","filters":{"time_of_generation_max":"2024-07-25"}}" + -d '{"workspace_id":"WORKSPACE_ID","filters":{"time_of_generation_max":"2024-07-25"}}' - lang: curl label: Self-Hosted source: | curl -X PUT "SELF_HOSTED_CONTROL_PLANE_URL/logs/exports/EXPORT_ID" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{"workspace_id":"WORKSPACE_ID","filters":{"time_of_generation_max":"2024-07-25"}}" + -d '{"workspace_id":"WORKSPACE_ID","filters":{"time_of_generation_max":"2024-07-25"}}' - lang: python label: Self-Hosted source: | @@ -16584,10 +16584,10 @@ paths: ) res = portkey.logs.exports.update( - export_id="EXPORT_ID", - workspace_id="WORKSPACE_ID", + export_id='EXPORT_ID', + workspace_id='WORKSPACE_ID', filters={ - "time_of_generation_max": "2024-07-25" + 'time_of_generation_max': '2024-07-25' } ) @@ -16628,12 +16628,12 @@ paths: schema: type: string responses: - "200": + '200': description: Successful response content: application/json: schema: - $ref: "#/components/schemas/ExportListResponse" + $ref: '#/components/schemas/ExportListResponse' x-code-samples: - lang: python label: Default @@ -16724,19 +16724,19 @@ paths: workspace_id: type: string filters: - $ref: "#/components/schemas/GenerationsFilterSchema" + $ref: '#/components/schemas/GenerationsFilterSchema' requested_data: - $ref: "#/components/schemas/LogExportsRequestedData" + $ref: '#/components/schemas/LogExportsRequestedData' required: - filters - requested_data responses: - "200": + '200': description: Successful response content: application/json: schema: - $ref: "#/components/schemas/UpdateExportResponse" + $ref: '#/components/schemas/UpdateExportResponse' x-code-samples: - lang: python label: Default @@ -16749,8 +16749,8 @@ paths: res = portkey.logs.exports.create( filters={ - "time_of_generation_min": "2024-10-20", - "time_of_generation_max": "2024-10-30" + 'time_of_generation_min': "2024-10-20", + 'time_of_generation_max': "2024-10-30" }, workspace_id="WORKSPACE_ID", description="This is random description", @@ -16830,7 +16830,7 @@ paths: curl -X POST "https://api.portkey.ai/v1/logs/exports" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "workspace_id": "WORKSPACE_ID", "filters": { "time_of_generation_min": "2024-10-20", @@ -16859,7 +16859,7 @@ paths: "prompt_slug", "metadata" ] - }" + }' - lang: python label: Self-Hosted source: | @@ -16872,8 +16872,8 @@ paths: res = portkey.logs.exports.create( filters={ - "time_of_generation_min": "2024-10-20", - "time_of_generation_max": "2024-10-30" + 'time_of_generation_min': "2024-10-20", + 'time_of_generation_max': "2024-10-30" }, workspace_id="WORKSPACE_ID", description="This is random description", @@ -16962,12 +16962,12 @@ paths: schema: type: string responses: - "200": + '200': description: Successful response content: application/json: schema: - $ref: "#/components/schemas/ExportTaskResponse" + $ref: '#/components/schemas/ExportTaskResponse' x-code-samples: - lang: python label: Default @@ -16979,7 +16979,7 @@ paths: ) res = portkey.logs.exports.start( - export_id="EXPORT_ID" + export_id='EXPORT_ID' ) print(res) @@ -16994,7 +16994,7 @@ paths: async function main() { const res = await portkey.logs.exports.start({ - exportId:"EXPORT_ID" + exportId:'EXPORT_ID' }); console.log(res); @@ -17018,7 +17018,7 @@ paths: ) res = portkey.logs.exports.start( - export_id="EXPORT_ID" + export_id='EXPORT_ID' ) print(res) @@ -17034,7 +17034,7 @@ paths: async function main() { const res = await portkey.logs.exports.start({ - exportId:"EXPORT_ID" + exportId:'EXPORT_ID' }); console.log(res); @@ -17055,12 +17055,12 @@ paths: schema: type: string responses: - "200": + '200': description: Successful response content: application/json: schema: - $ref: "#/components/schemas/ExportTaskResponse" + $ref: '#/components/schemas/ExportTaskResponse' x-code-samples: - lang: python label: Default @@ -17072,7 +17072,7 @@ paths: ) res = portkey.logs.exports.cancel( - export_id="EXPORT_ID" + export_id='EXPORT_ID' ) print(res) @@ -17087,7 +17087,7 @@ paths: async function main() { const res = await portkey.logs.exports.cancel({ - exportId:"EXPORT_ID" + exportId:'EXPORT_ID' }); console.log(res); @@ -17111,7 +17111,7 @@ paths: ) res = portkey.logs.exports.cancel( - export_id="EXPORT_ID" + export_id='EXPORT_ID' ) print(res) @@ -17127,7 +17127,7 @@ paths: async function main() { const res = await portkey.logs.exports.cancel({ - exportId:"EXPORT_ID" + exportId:'EXPORT_ID' }); console.log(res); @@ -17148,12 +17148,12 @@ paths: schema: type: string responses: - "200": + '200': description: Successful response content: application/json: schema: - $ref: "#/components/schemas/DownloadLogsResponse" + $ref: '#/components/schemas/DownloadLogsResponse' x-code-samples: - lang: python label: Default @@ -17165,7 +17165,7 @@ paths: ) res = portkey.logs.exports.download( - export_id="EXPORT_ID" + export_id='EXPORT_ID' ) print(res) @@ -17180,7 +17180,7 @@ paths: async function main() { const config=await portkey.logs.exports.download({ - exportId:"EXPORT_ID" + exportId:'EXPORT_ID' });; console.log(config); @@ -17204,7 +17204,7 @@ paths: ) res = portkey.logs.exports.download( - export_id="EXPORT_ID" + export_id='EXPORT_ID' ) print(res) @@ -17220,7 +17220,7 @@ paths: async function main() { const config=await portkey.logs.exports.download({ - exportId:"EXPORT_ID" + exportId:'EXPORT_ID' });; console.log(config); @@ -17337,12 +17337,12 @@ paths: minimum: 0 maximum: 100 responses: - "200": + '200': description: Successful response content: application/json: schema: - $ref: "#/components/schemas/AuditLogObjectList" + $ref: '#/components/schemas/AuditLogObjectList' /api-keys/{type}/{sub-type}: servers: *ControlPlaneServers @@ -17357,21 +17357,21 @@ paths: in: path schema: type: string - enum: ["organisation", "workspace"] + enum: ['organisation', 'workspace'] required: true - name: sub-type in: path schema: type: string - enum: ["user", "service"] + enum: ['user', 'service'] required: true requestBody: content: application/json: schema: - $ref: "#/components/schemas/CreateApiKeyObject" + $ref: '#/components/schemas/CreateApiKeyObject' responses: - "200": + '200': description: OK headers: Content-Type: @@ -17386,14 +17386,14 @@ paths: id: type: string format: uuid - example: "183f497a-2a7f-4f47-992e-26213fa863we" + example: '183f497a-2a7f-4f47-992e-26213fa863we' key: type: string - example: "abssofjosfjs" + example: 'abssofjosfjs' object: type: string - enum: ["api-key"] - example: "api-key" + enum: ['api-key'] + example: 'api-key' x-code-samples: - lang: python label: Default @@ -17468,7 +17468,7 @@ paths: curl -X POST https://api.portkey.ai/v1/api-keys/organisation/service -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name":"API_KEY_NAME_0909", "type":"organisation", "sub-type":"service", @@ -17489,14 +17489,14 @@ paths: "virtual_keys.list", "virtual_keys.copy" ] - }" + }' - lang: curl label: Self-Hosted source: | curl -X POST SELF_HOSTED_CONTROL_PLANE_URL/api-keys/organisation/service -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name":"API_KEY_NAME_0909", "type":"organisation", "sub-type":"service", @@ -17517,7 +17517,7 @@ paths: "virtual_keys.list", "virtual_keys.copy" ] - }" + }' - lang: javascript label: Self-Hosted source: | @@ -17635,7 +17635,7 @@ paths: curl -X POST https://api.portkey.ai/v1/api-keys/workspace/user -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name":"User API Key", "type":"workspace", "sub-type":"user", @@ -17645,7 +17645,7 @@ paths: "completions.write", "logs.view" ] - }" + }' /api-keys: servers: @@ -17660,19 +17660,19 @@ paths: in: query schema: type: integer - example: "1" + example: '1' - name: current_page in: query schema: type: integer - example: "0" + example: '0' - name: workspace_id in: query schema: type: string - example: "ws-shared-123" + example: 'ws-shared-123' responses: - "200": + '200': description: OK headers: Content-Type: @@ -17682,7 +17682,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ApiKeyObjectList" + $ref: '#/components/schemas/ApiKeyObjectList' x-code-samples: - lang: python label: Default @@ -17765,7 +17765,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/UpdateApiKeyObject" + $ref: '#/components/schemas/UpdateApiKeyObject' examples: update_api_key: summary: Update key metadata and limits @@ -17787,7 +17787,7 @@ paths: format: uuid required: true responses: - "200": + '200': description: OK headers: Content-Type: @@ -17917,7 +17917,7 @@ paths: curl -X PUT "https://api.portkey.ai/v1/api-keys/{id}" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name":"API_KEY_NAME_0909", "rate_limits":[ { @@ -17974,14 +17974,14 @@ paths: "workspace_users.list", "analytics.view" ] - }" + }' - lang: curl label: Self-Hosted source: | curl -X PUT "SELF_HOSTED_CONTROL_PLANE_URL/api-keys/{id}" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name":"API_KEY_NAME_0909", "rate_limits":[ { @@ -18038,7 +18038,7 @@ paths: "workspace_users.list", "analytics.view" ] - }" + }' - lang: python label: Self-Hosted source: | @@ -18165,7 +18165,7 @@ paths: format: uuid required: true responses: - "200": + '200': description: OK headers: Content-Type: @@ -18175,7 +18175,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ApiKeyObject" + $ref: '#/components/schemas/ApiKeyObject' x-code-samples: - lang: python label: Default @@ -18262,7 +18262,7 @@ paths: format: uuid required: true responses: - "200": + '200': description: OK headers: Content-Type: @@ -18359,7 +18359,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/RotateApiKeyRequest" + $ref: '#/components/schemas/RotateApiKeyRequest' examples: default: summary: Rotate with a custom transition period @@ -18373,7 +18373,7 @@ paths: format: uuid required: true responses: - "200": + '200': description: OK headers: Content-Type: @@ -18383,7 +18383,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/RotateApiKeyResponse" + $ref: '#/components/schemas/RotateApiKeyResponse' x-code-samples: - lang: python label: Default @@ -18424,9 +18424,9 @@ paths: curl -X POST "https://api.portkey.ai/v1/api-keys/{id}/rotate" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "key_transition_period_ms": 3600000 - }" + }' - lang: python label: Self-Hosted source: | @@ -18466,9 +18466,9 @@ paths: curl -X POST "SELF_HOSTED_CONTROL_PLANE_URL/api-keys/{id}/rotate" \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "key_transition_period_ms": 3600000 - }" + }' /policies/usage-limits: post: @@ -18484,7 +18484,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateUsageLimitsPolicyRequest" + $ref: '#/components/schemas/CreateUsageLimitsPolicyRequest' examples: monthlyCostLimit: summary: Monthly Cost Limit per API Key @@ -18512,21 +18512,21 @@ paths: credit_limit: 1000000 periodic_reset: weekly responses: - "200": + '200': description: Policy created successfully content: application/json: schema: - $ref: "#/components/schemas/CreatePolicyResponse" - "400": + $ref: '#/components/schemas/CreatePolicyResponse' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy not found - "500": + '500': description: Server error get: @@ -18538,7 +18538,7 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/WorkspaceIdQuery" + - $ref: '#/components/parameters/WorkspaceIdQuery' - name: status in: query description: Filter by status @@ -18554,24 +18554,24 @@ paths: schema: type: string enum: [cost, tokens] - - $ref: "#/components/parameters/PageSize" - - $ref: "#/components/parameters/CurrentPage" + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/CurrentPage' responses: - "200": + '200': description: List of usage limits policies content: application/json: schema: - $ref: "#/components/schemas/UsageLimitsPolicyListResponse" - "400": + $ref: '#/components/schemas/UsageLimitsPolicyListResponse' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy not found - "500": + '500': description: Server error /policies/usage-limits/{policyUsageLimitsId}: @@ -18584,7 +18584,7 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/PolicyUsageLimitsId" + - $ref: '#/components/parameters/PolicyUsageLimitsId' - name: status in: query description: Filter by status @@ -18601,21 +18601,21 @@ paths: type: boolean default: false responses: - "200": + '200': description: Usage limits policy details content: application/json: schema: - $ref: "#/components/schemas/UsageLimitsPolicyResponse" - "400": + $ref: '#/components/schemas/UsageLimitsPolicyResponse' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy not found - "500": + '500': description: Server error put: @@ -18627,19 +18627,19 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/PolicyUsageLimitsId" + - $ref: '#/components/parameters/PolicyUsageLimitsId' requestBody: required: true content: application/json: schema: - $ref: "#/components/schemas/UpdateUsageLimitsPolicyRequest" + $ref: '#/components/schemas/UpdateUsageLimitsPolicyRequest' example: credit_limit: 2000.0 alert_threshold: 1500.0 reset_usage_for_value: api-key-123 responses: - "200": + '200': description: OK headers: Content-Type: @@ -18651,15 +18651,15 @@ paths: schema: type: object example: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy not found - "500": + '500': description: Server error delete: @@ -18671,9 +18671,9 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/PolicyUsageLimitsId" + - $ref: '#/components/parameters/PolicyUsageLimitsId' responses: - "200": + '200': description: OK headers: Content-Type: @@ -18685,15 +18685,15 @@ paths: schema: type: object example: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy not found - "500": + '500': description: Server error /policies/usage-limits/{policyUsageLimitsId}/entities: @@ -18706,7 +18706,7 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/PolicyUsageLimitsId" + - $ref: '#/components/parameters/PolicyUsageLimitsId' - name: status in: query description: Filter by entity usage status @@ -18728,23 +18728,23 @@ paths: type: integer minimum: 1 maximum: 100 - - $ref: "#/components/parameters/CurrentPage" + - $ref: '#/components/parameters/CurrentPage' responses: - "200": + '200': description: List of entities for the policy content: application/json: schema: - $ref: "#/components/schemas/UsageLimitsPolicyEntityListResponse" - "400": + $ref: '#/components/schemas/UsageLimitsPolicyEntityListResponse' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy not found - "500": + '500': description: Server error /policies/usage-limits/{policyUsageLimitsId}/entities/{entityId}/reset: @@ -18757,25 +18757,25 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/PolicyUsageLimitsId" - - $ref: "#/components/parameters/UsageLimitsPolicyEntityId" + - $ref: '#/components/parameters/PolicyUsageLimitsId' + - $ref: '#/components/parameters/UsageLimitsPolicyEntityId' responses: - "200": + '200': description: Entity usage reset successfully content: application/json: schema: type: object example: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy or entity not found - "500": + '500': description: Server error /policies/rate-limits: @@ -18792,7 +18792,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateRateLimitsPolicyRequest" + $ref: '#/components/schemas/CreateRateLimitsPolicyRequest' examples: requestsPerMinute: summary: 100 Requests per Minute per API Key @@ -18819,19 +18819,19 @@ paths: unit: rph value: 10000 responses: - "200": + '200': description: Policy created successfully content: application/json: schema: - $ref: "#/components/schemas/CreatePolicyResponse" - "400": + $ref: '#/components/schemas/CreatePolicyResponse' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "500": + '500': description: Server error get: @@ -18843,7 +18843,7 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/WorkspaceIdQuery" + - $ref: '#/components/parameters/WorkspaceIdQuery' - name: status in: query description: Filter by status @@ -18866,24 +18866,24 @@ paths: schema: type: string enum: [rpm, rph, rpd] - - $ref: "#/components/parameters/PageSize" - - $ref: "#/components/parameters/CurrentPage" + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/CurrentPage' responses: - "200": + '200': description: List of rate limits policies content: application/json: schema: - $ref: "#/components/schemas/RateLimitsPolicyListResponse" - "400": + $ref: '#/components/schemas/RateLimitsPolicyListResponse' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy not found - "500": + '500': description: Server error /policies/rate-limits/{rateLimitsPolicyId}: @@ -18896,7 +18896,7 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/RateLimitsPolicyId" + - $ref: '#/components/parameters/RateLimitsPolicyId' - name: status in: query description: Filter by status @@ -18906,21 +18906,21 @@ paths: enum: [active, archived] default: active responses: - "200": + '200': description: Rate limits policy details content: application/json: schema: - $ref: "#/components/schemas/RateLimitsPolicyResponse" - "400": + $ref: '#/components/schemas/RateLimitsPolicyResponse' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy not found - "500": + '500': description: Server error put: @@ -18932,18 +18932,18 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/RateLimitsPolicyId" + - $ref: '#/components/parameters/RateLimitsPolicyId' requestBody: required: true content: application/json: schema: - $ref: "#/components/schemas/UpdateRateLimitsPolicyRequest" + $ref: '#/components/schemas/UpdateRateLimitsPolicyRequest' example: value: 200 unit: rph responses: - "200": + '200': description: OK headers: Content-Type: @@ -18955,15 +18955,15 @@ paths: schema: type: object example: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy not found - "500": + '500': description: Server error delete: @@ -18975,9 +18975,9 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/RateLimitsPolicyId" + - $ref: '#/components/parameters/RateLimitsPolicyId' responses: - "200": + '200': description: OK headers: Content-Type: @@ -18989,15 +18989,15 @@ paths: schema: type: object example: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy not found - "500": + '500': description: Server error /analytics/graphs/requests: @@ -19007,30 +19007,30 @@ paths: - Analytics > Graphs summary: Get requests graph parameters: - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -19082,30 +19082,30 @@ paths: - Analytics > Graphs summary: Get cost graph parameters: - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -19165,30 +19165,30 @@ paths: - Analytics > Graphs summary: Get latency graph parameters: - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -19265,30 +19265,30 @@ paths: - Analytics > Graphs summary: Get tokens graph parameters: - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -19348,30 +19348,30 @@ paths: - Analytics > Graphs summary: Get users graph. Returns unique user count across different time buckets parameters: - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -19423,30 +19423,30 @@ paths: - Analytics > Graphs summary: Get users requests graph. Returns average requests per user across different time buckets parameters: - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -19506,30 +19506,30 @@ paths: - Analytics > Graphs summary: Get errors graph parameters: - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -19581,30 +19581,30 @@ paths: - Analytics > Graphs summary: Get percentage error rate graph parameters: - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -19656,30 +19656,30 @@ paths: - Analytics > Graphs summary: Get status code wise stacked error graph parameters: - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -19739,30 +19739,30 @@ paths: - Analytics > Graphs summary: Get status code wise grouped error graph. parameters: - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -19817,30 +19817,30 @@ paths: - Analytics > Graphs summary: Get retry and fallback rescued requests graph parameters: - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -19880,10 +19880,10 @@ paths: properties: retry_success_count: type: integer - description: "Retry attempt count at which the request was rescued" + description: 'Retry attempt count at which the request was rescued' count: type: integer - description: "Total requests rescued at this retry attempt" + description: 'Total requests rescued at this retry attempt' fallback: type: integer description: Total requests rescued using fallback for this data point bucket @@ -19908,30 +19908,30 @@ paths: - Analytics > Graphs summary: Get cache hit rate graph parameters: - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -20003,30 +20003,30 @@ paths: - Analytics > Graphs summary: Get cache hit latency graph parameters: - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -20072,30 +20072,30 @@ paths: - Analytics > Graphs summary: Get feedbacks graph parameters: - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -20147,30 +20147,30 @@ paths: - Analytics > Graphs summary: Get score-wise feedbacks distribution graph parameters: - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -20221,30 +20221,30 @@ paths: - Analytics > Graphs summary: Get weighted feedbacks graph. Weighted feedback is (value * score) parameters: - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -20296,30 +20296,30 @@ paths: - Analytics > Graphs summary: Get feedbacks per ai_models graph parameters: - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -20368,30 +20368,30 @@ paths: - Analytics > Summary summary: Get cache summary data for the selected time period parameters: - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -20433,32 +20433,32 @@ paths: - Analytics > Groups summary: Get metadata users grouped data. parameters: - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/CurrentPage" - - $ref: "#/components/parameters/PageSize" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/CurrentPage' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -20506,32 +20506,32 @@ paths: - Analytics > Groups summary: Get ai model grouped data. parameters: - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/CurrentPage" - - $ref: "#/components/parameters/PageSize" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/CurrentPage' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -20581,32 +20581,32 @@ paths: schema: type: string required: true - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/CurrentPage" - - $ref: "#/components/parameters/PageSize" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceSlug' + - $ref: '#/components/parameters/TimeOfGenerationMin' + - $ref: '#/components/parameters/TimeOfGenerationMax' + - $ref: '#/components/parameters/TotalUnitsMin' + - $ref: '#/components/parameters/TotalUnitsMax' + - $ref: '#/components/parameters/CostMin' + - $ref: '#/components/parameters/CostMax' + - $ref: '#/components/parameters/PromptTokenMin' + - $ref: '#/components/parameters/PromptTokenMax' + - $ref: '#/components/parameters/CompletionTokenMin' + - $ref: '#/components/parameters/CompletionTokenMax' + - $ref: '#/components/parameters/StatusCode' + - $ref: '#/components/parameters/WeightedFeedbackMin' + - $ref: '#/components/parameters/WeightedFeedbackMax' + - $ref: '#/components/parameters/VirtualKeys' + - $ref: '#/components/parameters/Configs' + - $ref: '#/components/parameters/ApiKeyIds' + - $ref: '#/components/parameters/CurrentPage' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/Metadata' + - $ref: '#/components/parameters/AiOrgModel' + - $ref: '#/components/parameters/TraceId' + - $ref: '#/components/parameters/SpanId' + - $ref: '#/components/parameters/PromptSlug' responses: - "200": + '200': description: OK headers: Content-Type: @@ -20711,12 +20711,12 @@ paths: type: string example: gpt-5 responses: - "200": + '200': description: Pricing configuration for the specified model content: application/json: schema: - $ref: "#/components/schemas/ModelPricingConfig" + $ref: '#/components/schemas/ModelPricingConfig' examples: openai-gpt4: summary: OpenAI GPT-4 @@ -20808,7 +20808,7 @@ paths: search: price: 3.5 currency: USD - "404": + '404': description: Model or provider not found content: application/json: @@ -20861,7 +20861,7 @@ paths: default: 20 description: Items per page (1-100), defaults to 20 responses: - "200": + '200': description: Successful response content: application/json: @@ -20876,7 +20876,7 @@ paths: data: type: array items: - $ref: "#/components/schemas/SecretReferenceListItem" + $ref: '#/components/schemas/SecretReferenceListItem' security: - Portkey-Key: [] x-code-samples: @@ -20901,9 +20901,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateSecretReferenceRequest" + $ref: '#/components/schemas/CreateSecretReferenceRequest' responses: - "200": + '200': description: Successful response content: application/json: @@ -20918,9 +20918,9 @@ paths: object: type: string enum: [secret-reference] - "400": + '400': description: Validation failure (schema, duplicate slug, invalid workspaces, conflicting allow_all_workspaces + allowed_workspaces) - "403": + '403': description: secretReferences feature not enabled on subscription security: - Portkey-Key: [] @@ -20931,7 +20931,7 @@ paths: curl -X POST https://api.portkey.ai/v1/secret-references \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name": "my-aws-secret", "manager_type": "aws_sm", "auth_config": { @@ -20941,14 +20941,14 @@ paths: "aws_region": "us-east-1" }, "secret_path": "prod/api-keys/openai" - }" + }' - lang: curl label: Self-Hosted source: | curl -X POST SELF_HOSTED_CONTROL_PLANE_URL/secret-references \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name": "my-aws-secret", "manager_type": "aws_sm", "auth_config": { @@ -20958,7 +20958,7 @@ paths: "aws_region": "us-east-1" }, "secret_path": "prod/api-keys/openai" - }" + }' /secret-references/{secretReferenceId}: servers: *ControlPlaneServers @@ -20975,13 +20975,13 @@ paths: type: string description: UUID or slug of the secret reference responses: - "200": + '200': description: Successful response content: application/json: schema: - $ref: "#/components/schemas/SecretReferenceDetailResponse" - "404": + $ref: '#/components/schemas/SecretReferenceDetailResponse' + '404': description: Secret reference not found security: - Portkey-Key: [] @@ -21014,17 +21014,17 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/UpdateSecretReferenceRequest" + $ref: '#/components/schemas/UpdateSecretReferenceRequest' responses: - "200": + '200': description: Successful response content: application/json: schema: type: object - "400": + '400': description: Validation failure or no valid fields to update - "404": + '404': description: Secret reference not found security: - Portkey-Key: [] @@ -21035,20 +21035,20 @@ paths: curl -X PUT https://api.portkey.ai/v1/secret-references/SECRET_REFERENCE_ID \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name": "updated-secret-name", "secret_path": "prod/api-keys/updated" - }" + }' - lang: curl label: Self-Hosted source: | curl -X PUT SELF_HOSTED_CONTROL_PLANE_URL/secret-references/SECRET_REFERENCE_ID \ -H "x-portkey-api-key: PORTKEY_API_KEY" \ -H "Content-Type: application/json" \ - -d "{ + -d '{ "name": "updated-secret-name", "secret_path": "prod/api-keys/updated" - }" + }' delete: operationId: deleteSecretReference @@ -21063,15 +21063,15 @@ paths: type: string description: UUID or slug of the secret reference responses: - "200": + '200': description: Successful response content: application/json: schema: type: object - "400": + '400': description: Secret reference is in use by integrations or virtual keys - "404": + '404': description: Secret reference not found security: - Portkey-Key: [] @@ -21099,7 +21099,7 @@ components: name: x-portkey-virtual-key Provider-Auth: type: http - scheme: "bearer" + scheme: 'bearer' Provider-Name: type: apiKey in: header @@ -21121,7 +21121,7 @@ components: schema: type: string format: date-time - example: "2026-02-23T14:20:31+05:30" + example: '2026-02-23T14:20:31+05:30' description: Minimum time of generation in ISO8601 format (YYYY-MM-DDTHH:MM:SS±HH:MM). TimeOfGenerationMax: in: query @@ -21130,7 +21130,7 @@ components: schema: type: string format: date-time - example: "2026-02-24T14:20:31+05:30" + example: '2026-02-24T14:20:31+05:30' description: Maximum time of generation in ISO8601 format (YYYY-MM-DDTHH:MM:SS±HH:MM). TotalUnitsMin: in: query @@ -21271,7 +21271,7 @@ components: schema: type: string description: Stringifed json object with key value metadata pairs - example: "{"_user":"user_1", "env": "staging"}" + example: '{"_user":"user_1", "env": "staging"}' AiOrgModel: in: query name: ai_org_model @@ -21385,34 +21385,34 @@ components: description: Complete pricing configuration for a model properties: pay_as_you_go: - $ref: "#/components/schemas/ModelPayAsYouGo" + $ref: '#/components/schemas/ModelPayAsYouGo' calculate: - $ref: "#/components/schemas/ModelCalculateConfig" + $ref: '#/components/schemas/ModelCalculateConfig' currency: type: string enum: [USD] description: Currency code (always USD) finetune_config: - $ref: "#/components/schemas/ModelFinetuneConfig" + $ref: '#/components/schemas/ModelFinetuneConfig' ModelPayAsYouGo: type: object description: Token-based pricing (all prices in USD cents) properties: request_token: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' response_token: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' cache_write_input_token: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' cache_read_input_token: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' request_audio_token: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' response_audio_token: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' cache_read_audio_input_token: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' additional_units: type: object description: | @@ -21425,9 +21425,9 @@ components: - `image_token`: Image generation tokens - `video_duration_seconds_*`: Video generation (OpenAI Sora) additionalProperties: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' image: - $ref: "#/components/schemas/ModelImagePricing" + $ref: '#/components/schemas/ModelImagePricing' ModelTokenPrice: type: object @@ -21446,7 +21446,7 @@ components: additionalProperties: type: object additionalProperties: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' example: standard: 1024x1024: @@ -21464,9 +21464,9 @@ components: description: Cost calculation formulas properties: request: - $ref: "#/components/schemas/ModelCalculateOperation" + $ref: '#/components/schemas/ModelCalculateOperation' response: - $ref: "#/components/schemas/ModelCalculateOperation" + $ref: '#/components/schemas/ModelCalculateOperation' ModelCalculateOperation: type: object @@ -21481,8 +21481,8 @@ components: description: Operands for the operation items: oneOf: - - $ref: "#/components/schemas/ModelCalculateOperation" - - $ref: "#/components/schemas/ModelValueReference" + - $ref: '#/components/schemas/ModelCalculateOperation' + - $ref: '#/components/schemas/ModelValueReference' ModelValueReference: type: object @@ -21503,9 +21503,9 @@ components: description: Fine-tuning pricing configuration properties: pay_per_token: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' pay_per_hour: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' Error: type: object @@ -21531,7 +21531,7 @@ components: type: object properties: error: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' required: - error @@ -21547,9 +21547,9 @@ components: workspaces: type: array items: - $ref: "#/components/schemas/WorkspaceInvite" + $ref: '#/components/schemas/WorkspaceInvite' role: - $ref: "#/components/schemas/InviteRole" + $ref: '#/components/schemas/InviteRole' workspace_api_key_details: type: object properties: @@ -21580,7 +21580,7 @@ components: type: string description: Workspace Slug role: - $ref: "#/components/schemas/WorkspaceInviteRole" + $ref: '#/components/schemas/WorkspaceInviteRole' WorkspaceInviteRole: type: string enum: @@ -21615,7 +21615,7 @@ components: data: type: array items: - $ref: "#/components/schemas/Model" + $ref: '#/components/schemas/Model' required: - object - data @@ -21642,29 +21642,29 @@ components: anyOf: - type: string - type: string - enum: ["gpt-3.5-turbo-instruct", "davinci-002", "babbage-002"] + enum: ['gpt-3.5-turbo-instruct', 'davinci-002', 'babbage-002'] x-oaiTypeLabel: string prompt: description: &completions_prompt_description | The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document. - default: "<|endoftext|>" + default: '<|endoftext|>' nullable: true oneOf: - type: string - default: "" - example: "This is a test." + default: '' + example: 'This is a test.' - type: array items: type: string - default: "" - example: "This is a test." + default: '' + example: 'This is a test.' - type: array minItems: 1 items: type: integer - example: "[1212, 318, 257, 1332, 13]" + example: '[1212, 318, 257, 1332, 13]' - type: array minItems: 1 items: @@ -21672,7 +21672,7 @@ components: minItems: 1 items: type: integer - example: "[[1212, 318, 257, 1332, 13]]" + example: '[[1212, 318, 257, 1332, 13]]' best_of: type: integer default: 1 @@ -21698,7 +21698,7 @@ components: maximum: 2 nullable: true description: &completions_frequency_penalty_description | - Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model"s likelihood to repeat the same line verbatim. + Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation/parameter-details) logit_bias: &completions_logit_bias @@ -21733,7 +21733,7 @@ components: description: &completions_max_tokens_description | The maximum number of [tokens](https://platform.openai.com/tokenizer?view=bpe) that can be generated in the completion. - The token count of your prompt plus `max_tokens` cannot exceed the model"s context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. + The token count of your prompt plus `max_tokens` cannot exceed the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. n: type: integer minimum: 1 @@ -21752,7 +21752,7 @@ components: maximum: 2 nullable: true description: &completions_presence_penalty_description | - Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model"s likelihood to talk about new topics. + Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation/parameter-details) seed: &completions_seed_param @@ -21779,7 +21779,7 @@ components: maxItems: 4 items: type: string - example: "["\n"]" + example: '["\n"]' stream: description: > Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-UShttps://platform.openai.com/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) @@ -21788,7 +21788,7 @@ components: nullable: true default: false stream_options: - $ref: "#/components/schemas/ChatCompletionStreamOptions" + $ref: '#/components/schemas/ChatCompletionStreamOptions' suffix: description: | The suffix that comes after a completion of inserted text. @@ -21797,7 +21797,7 @@ components: default: null nullable: true type: string - example: "test." + example: 'test.' temperature: type: number minimum: 0 @@ -21854,7 +21854,7 @@ components: The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, or `content_filter` if content was omitted due to a flag from our content filters. - enum: ["stop", "length", "content_filter"] + enum: ['stop', 'length', 'content_filter'] index: type: integer logprobs: @@ -21898,7 +21898,7 @@ components: description: The object type, which is always "text_completion" enum: [text_completion] usage: - $ref: "#/components/schemas/CompletionUsage" + $ref: '#/components/schemas/CompletionUsage' required: - id - object @@ -21931,8 +21931,8 @@ components: ChatCompletionRequestMessageContentPart: oneOf: - - $ref: "#/components/schemas/ChatCompletionRequestMessageContentPartText" - - $ref: "#/components/schemas/ChatCompletionRequestMessageContentPartImage" + - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartText' + - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartImage' x-oaiExpandable: true ChatCompletionRequestMessageContentPartImage: @@ -21941,7 +21941,7 @@ components: properties: type: type: string - enum: ["image_url"] + enum: ['image_url'] description: The type of the content part. image_url: type: object @@ -21953,8 +21953,8 @@ components: detail: type: string description: Specifies the detail level of the image. Learn more in the [Vision guide](https://platform.openai.com/docs/guides/vision/low-or-high-fidelity-image-understanding). - enum: ["auto", "low", "high"] - default: "auto" + enum: ['auto', 'low', 'high'] + default: 'auto' required: - url required: @@ -21967,7 +21967,7 @@ components: properties: type: type: string - enum: ["text"] + enum: ['text'] description: The type of the content part. text: type: string @@ -21982,7 +21982,7 @@ components: properties: type: type: string - enum: ["thinking"] + enum: ['thinking'] description: The type of the content part. thinking: type: string @@ -21997,7 +21997,7 @@ components: properties: type: type: string - enum: ["redacted_thinking"] + enum: ['redacted_thinking'] description: The type of the content part. data: type: string @@ -22008,12 +22008,12 @@ components: ChatCompletionRequestMessage: oneOf: - - $ref: "#/components/schemas/ChatCompletionRequestSystemMessage" - - $ref: "#/components/schemas/ChatCompletionRequestDeveloperMessage" - - $ref: "#/components/schemas/ChatCompletionRequestUserMessage" - - $ref: "#/components/schemas/ChatCompletionRequestAssistantMessage" - - $ref: "#/components/schemas/ChatCompletionRequestToolMessage" - - $ref: "#/components/schemas/ChatCompletionRequestFunctionMessage" + - $ref: '#/components/schemas/ChatCompletionRequestSystemMessage' + - $ref: '#/components/schemas/ChatCompletionRequestDeveloperMessage' + - $ref: '#/components/schemas/ChatCompletionRequestUserMessage' + - $ref: '#/components/schemas/ChatCompletionRequestAssistantMessage' + - $ref: '#/components/schemas/ChatCompletionRequestToolMessage' + - $ref: '#/components/schemas/ChatCompletionRequestFunctionMessage' x-oaiExpandable: true ChatCompletionRequestSystemMessage: @@ -22025,7 +22025,7 @@ components: type: string role: type: string - enum: ["system"] + enum: ['system'] description: The role of the messages author, in this case `system`. name: type: string @@ -22044,7 +22044,7 @@ components: type: string role: type: string - enum: ["developer"] + enum: ['developer'] description: The role of the messages author, in this case `Developer`. name: type: string @@ -22068,12 +22068,12 @@ components: description: An array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts. Image input is only supported when using the `gpt-4-visual-preview` model. title: Array of content parts items: - $ref: "#/components/schemas/ChatCompletionRequestMessageContentPart" + $ref: '#/components/schemas/ChatCompletionRequestMessageContentPart' minItems: 1 x-oaiExpandable: true role: type: string - enum: ["user"] + enum: ['user'] description: The role of the messages author, in this case `user`. name: type: string @@ -22093,17 +22093,17 @@ components: The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified. role: type: string - enum: ["assistant"] + enum: ['assistant'] description: The role of the messages author, in this case `assistant`. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: - $ref: "#/components/schemas/ChatCompletionMessageToolCalls" + $ref: '#/components/schemas/ChatCompletionMessageToolCalls' function_call: type: object deprecated: true - description: "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model." + description: 'Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.' nullable: true properties: arguments: @@ -22147,8 +22147,8 @@ components: filters: description: A filter to apply based on file attributes. oneOf: - - $ref: "#/components/schemas/ComparisonFilter" - - $ref: "#/components/schemas/CompoundFilter" + - $ref: '#/components/schemas/ComparisonFilter' + - $ref: '#/components/schemas/CompoundFilter' x-oaiExpandable: true ranking_options: description: Ranking options for search. @@ -22235,7 +22235,7 @@ components: description: | The name of the file. attributes: - $ref: "#/components/schemas/VectorStoreFileAttributes" + $ref: '#/components/schemas/VectorStoreFileAttributes' score: type: number format: float @@ -22247,7 +22247,7 @@ components: - type - status - queries - # TODO(apeng): This is only because we don"t support tools yet. Use allOf once we do. + # TODO(apeng): This is only because we don't support tools yet. Use allOf once we do. FineTuneChatCompletionRequestAssistantMessage: type: object title: Assistant message @@ -22259,7 +22259,7 @@ components: The contents of the assistant message. Required unless `function_call` is specified. role: type: string - enum: ["assistant"] + enum: ['assistant'] description: The role of the messages author, in this case `assistant`. name: type: string @@ -22281,7 +22281,7 @@ components: weight: type: integer enum: [0, 1] - description: "Controls whether the assistant message is trained against (0 or 1)" + description: 'Controls whether the assistant message is trained against (0 or 1)' required: - role @@ -22291,7 +22291,7 @@ components: properties: role: type: string - enum: ["tool"] + enum: ['tool'] description: The role of the messages author, in this case `tool`. content: type: string @@ -22311,7 +22311,7 @@ components: properties: role: type: string - enum: ["function"] + enum: ['function'] description: The role of the messages author, in this case `function`. content: nullable: true @@ -22325,13 +22325,13 @@ components: - content - name - # TODO(apeng): This is only because we don"t support tools yet. Add back deprecated once we do. + # TODO(apeng): This is only because we don't support tools yet. Add back deprecated once we do. FineTuneChatCompletionRequestFunctionMessage: allOf: - type: object title: Function message deprecated: false - - $ref: "#/components/schemas/ChatCompletionRequestFunctionMessage" + - $ref: '#/components/schemas/ChatCompletionRequestFunctionMessage' FunctionParameters: type: object @@ -22349,7 +22349,7 @@ components: type: string description: The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. parameters: - $ref: "#/components/schemas/FunctionParameters" + $ref: '#/components/schemas/FunctionParameters' required: - name @@ -22369,10 +22369,10 @@ components: properties: type: type: string - enum: ["function"] + enum: ['function'] description: The type of the tool. Currently, only `function` is supported. function: - $ref: "#/components/schemas/FunctionObject" + $ref: '#/components/schemas/FunctionObject' required: - type - function @@ -22393,7 +22393,7 @@ components: `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools. enum: [none, auto, required] - - $ref: "#/components/schemas/ChatCompletionNamedToolChoice" + - $ref: '#/components/schemas/ChatCompletionNamedToolChoice' x-oaiExpandable: true ChatCompletionNamedToolChoice: @@ -22402,7 +22402,7 @@ components: properties: type: type: string - enum: ["function"] + enum: ['function'] description: The type of the tool. Currently, only `function` is supported. function: type: object @@ -22442,16 +22442,16 @@ components: - transcript OutputContent: oneOf: - - $ref: "#/components/schemas/OutputText" - - $ref: "#/components/schemas/Refusal" + - $ref: '#/components/schemas/OutputText' + - $ref: '#/components/schemas/Refusal' OutputItem: anyOf: - - $ref: "#/components/schemas/OutputMessage" - - $ref: "#/components/schemas/FileSearchToolCall" - - $ref: "#/components/schemas/FunctionToolCall" - - $ref: "#/components/schemas/WebSearchToolCall" - - $ref: "#/components/schemas/ComputerToolCall" - - $ref: "#/components/schemas/ReasoningItem" + - $ref: '#/components/schemas/OutputMessage' + - $ref: '#/components/schemas/FileSearchToolCall' + - $ref: '#/components/schemas/FunctionToolCall' + - $ref: '#/components/schemas/WebSearchToolCall' + - $ref: '#/components/schemas/ComputerToolCall' + - $ref: '#/components/schemas/ReasoningItem' x-oaiExpandable: true discriminator: propertyName: type @@ -22486,7 +22486,7 @@ components: x-oaiExpandable: true items: x-oaiExpandable: true - $ref: "#/components/schemas/OutputContent" + $ref: '#/components/schemas/OutputContent' status: type: string description: > @@ -22527,7 +22527,7 @@ components: The annotations of the text output. items: x-oaiExpandable: true - $ref: "#/components/schemas/Annotation" + $ref: '#/components/schemas/Annotation' required: - type - text @@ -22541,7 +22541,7 @@ components: type: array description: The tool calls generated by the model, such as function calls. items: - $ref: "#/components/schemas/ChatCompletionMessageToolCall" + $ref: '#/components/schemas/ChatCompletionMessageToolCall' ChatCompletionMessageToolCall: type: object @@ -22552,7 +22552,7 @@ components: description: The ID of the tool call. type: type: string - enum: ["function"] + enum: ['function'] description: The type of the tool. Currently, only `function` is supported. function: type: object @@ -22582,7 +22582,7 @@ components: description: The ID of the tool call. type: type: string - enum: ["function"] + enum: ['function'] description: The type of the tool. Currently, only `function` is supported. function: type: object @@ -22596,7 +22596,7 @@ components: required: - index - # Note, this isn"t referenced anywhere, but is kept as a convenience to record all possible roles in one place. + # Note, this isn't referenced anywhere, but is kept as a convenience to record all possible roles in one place. ChatCompletionRole: type: string description: The role of the author of a message @@ -22623,9 +22623,9 @@ components: type: object description: A block of content in a chat completion message. oneOf: - - $ref: "#/components/schemas/ChatCompletionRequestMessageContentPartText" - - $ref: "#/components/schemas/ChatCompletionMessageContentPartThinking" - - $ref: "#/components/schemas/ChatCompletionMessageContentPartRedactedThinking" + - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartText' + - $ref: '#/components/schemas/ChatCompletionMessageContentPartThinking' + - $ref: '#/components/schemas/ChatCompletionMessageContentPartRedactedThinking' ChatCompletionResponseMessage: type: object @@ -22636,15 +22636,15 @@ components: description: The contents of the message. nullable: true tool_calls: - $ref: "#/components/schemas/ChatCompletionMessageToolCalls" + $ref: '#/components/schemas/ChatCompletionMessageToolCalls' role: type: string - enum: ["assistant"] + enum: ['assistant'] description: The role of the author of this message. function_call: type: object deprecated: true - description: "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model." + description: 'Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.' properties: arguments: type: string @@ -22661,7 +22661,7 @@ components: description: The content blocks of the message. This is only present for certain providers with strict-open-ai-compliance flag set to false items: type: object - $ref: "#/components/schemas/ChatCompletionMessageContentBlock" + $ref: '#/components/schemas/ChatCompletionMessageContentBlock' required: - role - content @@ -22677,7 +22677,7 @@ components: function_call: deprecated: true type: object - description: "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model." + description: 'Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.' properties: arguments: type: string @@ -22688,10 +22688,10 @@ components: tool_calls: type: array items: - $ref: "#/components/schemas/ChatCompletionMessageToolCallChunk" + $ref: '#/components/schemas/ChatCompletionMessageToolCallChunk' role: type: string - enum: ["system", "user", "assistant", "tool"] + enum: ['system', 'user', 'assistant', 'tool'] description: The role of the author of this message. CreateChatCompletionRequest: @@ -22702,45 +22702,45 @@ components: type: array minItems: 1 items: - $ref: "#/components/schemas/ChatCompletionRequestMessage" + $ref: '#/components/schemas/ChatCompletionRequestMessage' model: description: ID of the model to use. See the [model endpoint compatibility](https://platform.openai.com/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API. - example: "gpt-5" + example: 'gpt-5' anyOf: - type: string - type: string enum: [ - "gpt-5", - "gpt-5-mini", - "gpt-5-nano", - "o4-mini", - "o3", - "o3-mini", - "o1", - "o1-mini", - "gpt-4o", - "gpt-4o-mini", - "gpt-4o-2024-05-13", - "gpt-4-turbo", - "gpt-4-turbo-2024-04-09", - "gpt-4-0125-preview", - "gpt-4-turbo-preview", - "gpt-4-1106-preview", - "gpt-4-vision-preview", - "gpt-4", - "gpt-4-0314", - "gpt-4-0613", - "gpt-4-32k", - "gpt-4-32k-0314", - "gpt-4-32k-0613", - "gpt-3.5-turbo", - "gpt-3.5-turbo-16k", - "gpt-3.5-turbo-0301", - "gpt-3.5-turbo-0613", - "gpt-3.5-turbo-1106", - "gpt-3.5-turbo-0125", - "gpt-3.5-turbo-16k-0613", + 'gpt-5', + 'gpt-5-mini', + 'gpt-5-nano', + 'o4-mini', + 'o3', + 'o3-mini', + 'o1', + 'o1-mini', + 'gpt-4o', + 'gpt-4o-mini', + 'gpt-4o-2024-05-13', + 'gpt-4-turbo', + 'gpt-4-turbo-2024-04-09', + 'gpt-4-0125-preview', + 'gpt-4-turbo-preview', + 'gpt-4-1106-preview', + 'gpt-4-vision-preview', + 'gpt-4', + 'gpt-4-0314', + 'gpt-4-0613', + 'gpt-4-32k', + 'gpt-4-32k-0314', + 'gpt-4-32k-0613', + 'gpt-3.5-turbo', + 'gpt-3.5-turbo-16k', + 'gpt-3.5-turbo-0301', + 'gpt-3.5-turbo-0613', + 'gpt-3.5-turbo-1106', + 'gpt-3.5-turbo-0125', + 'gpt-3.5-turbo-16k-0613', ] x-oaiTypeLabel: string frequency_penalty: @@ -22818,9 +22818,9 @@ components: Using `json_schema` is preferred for models that support it. oneOf: - - $ref: "#/components/schemas/ResponseFormatText" - - $ref: "#/components/schemas/ResponseFormatJsonSchema" - - $ref: "#/components/schemas/ResponseFormatJsonObject" + - $ref: '#/components/schemas/ResponseFormatText' + - $ref: '#/components/schemas/ResponseFormatJsonSchema' + - $ref: '#/components/schemas/ResponseFormatJsonObject' seed: type: integer minimum: -9223372036854775808 @@ -22852,7 +22852,7 @@ components: nullable: true default: false stream_options: - $ref: "#/components/schemas/ChatCompletionStreamOptions" + $ref: '#/components/schemas/ChatCompletionStreamOptions' thinking: type: object nullable: true @@ -22861,9 +22861,9 @@ components: properties: type: type: string - enum: ["enabled", "disabled"] + enum: ['enabled', 'disabled'] description: Enables or disables the thinking mode capability. - default: "disabled" + default: 'disabled' budget_tokens: type: integer description: | @@ -22873,7 +22873,7 @@ components: example: 2030 required: - type - example: { "type": "enabled", "budget_tokens": 2030 } + example: { 'type': 'enabled', 'budget_tokens': 2030 } temperature: type: number minimum: 0 @@ -22896,11 +22896,11 @@ components: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. items: - $ref: "#/components/schemas/ChatCompletionTool" + $ref: '#/components/schemas/ChatCompletionTool' tool_choice: - $ref: "#/components/schemas/ChatCompletionToolChoiceOption" + $ref: '#/components/schemas/ChatCompletionToolChoiceOption' parallel_tool_calls: - $ref: "#/components/schemas/ParallelToolCalls" + $ref: '#/components/schemas/ParallelToolCalls' user: *end_user_param_configuration function_call: deprecated: true @@ -22919,7 +22919,7 @@ components: `none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function. enum: [none, auto] - - $ref: "#/components/schemas/ChatCompletionFunctionCallOption" + - $ref: '#/components/schemas/ChatCompletionFunctionCallOption' x-oaiExpandable: true functions: deprecated: true @@ -22931,7 +22931,7 @@ components: minItems: 1 maxItems: 128 items: - $ref: "#/components/schemas/ChatCompletionFunctions" + $ref: '#/components/schemas/ChatCompletionFunctions' required: - model @@ -22964,17 +22964,17 @@ components: `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function. enum: [ - "stop", - "length", - "tool_calls", - "content_filter", - "function_call", + 'stop', + 'length', + 'tool_calls', + 'content_filter', + 'function_call', ] index: type: integer description: The index of the choice in the list of choices. message: - $ref: "#/components/schemas/ChatCompletionResponseMessage" + $ref: '#/components/schemas/ChatCompletionResponseMessage' logprobs: &chat_completion_response_logprobs description: Log probability information for the choice. type: object @@ -22984,7 +22984,7 @@ components: description: A list of message content tokens with log probability information. type: array items: - $ref: "#/components/schemas/ChatCompletionTokenLogprob" + $ref: '#/components/schemas/ChatCompletionTokenLogprob' nullable: true required: - content @@ -23005,7 +23005,7 @@ components: description: The object type, which is always `chat.completion`. enum: [chat.completion] usage: - $ref: "#/components/schemas/CompletionUsage" + $ref: '#/components/schemas/CompletionUsage' required: - choices - created @@ -23036,12 +23036,12 @@ components: description: &chat_completion_function_finish_reason_description | The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, or `function_call` if the model called a function. - enum: ["stop", "length", "function_call", "content_filter"] + enum: ['stop', 'length', 'function_call', 'content_filter'] index: type: integer description: The index of the choice in the list of choices. message: - $ref: "#/components/schemas/ChatCompletionResponseMessage" + $ref: '#/components/schemas/ChatCompletionResponseMessage' created: type: integer description: The Unix timestamp (in seconds) of when the chat completion was created. @@ -23059,7 +23059,7 @@ components: description: The object type, which is always `chat.completion`. enum: [chat.completion] usage: - $ref: "#/components/schemas/CompletionUsage" + $ref: '#/components/schemas/CompletionUsage' required: - choices - created @@ -23107,7 +23107,7 @@ components: data: type: array items: - $ref: "#/components/schemas/FineTuningJob" + $ref: '#/components/schemas/FineTuningJob' has_more: type: boolean object: @@ -23138,18 +23138,18 @@ components: - index properties: delta: - $ref: "#/components/schemas/ChatCompletionStreamResponseDelta" + $ref: '#/components/schemas/ChatCompletionStreamResponseDelta' logprobs: *chat_completion_response_logprobs finish_reason: type: string description: *chat_completion_finish_reason_description enum: [ - "stop", - "length", - "tool_calls", - "content_filter", - "function_call", + 'stop', + 'length', + 'tool_calls', + 'content_filter', + 'function_call', ] nullable: true index: @@ -23206,15 +23206,15 @@ components: prompt: description: A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`. type: string - example: "A cute baby sea otter" + example: 'A cute baby sea otter' model: anyOf: - type: string - type: string - enum: ["dall-e-2", "dall-e-3"] + enum: ['dall-e-2', 'dall-e-3'] x-oaiTypeLabel: string - default: "dall-e-2" - example: "dall-e-3" + default: 'dall-e-2' + example: 'dall-e-3' nullable: true description: The model to use for image generation. n: &images_n @@ -23227,29 +23227,29 @@ components: description: The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported. quality: type: string - enum: ["standard", "hd"] - default: "standard" - example: "standard" + enum: ['standard', 'hd'] + default: 'standard' + example: 'standard' description: The quality of the image that will be generated. `hd` creates images with finer details and greater consistency across the image. This param is only supported for `dall-e-3`. response_format: &images_response_format type: string - enum: ["url", "b64_json"] - default: "url" - example: "url" + enum: ['url', 'b64_json'] + default: 'url' + example: 'url' nullable: true description: The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. size: &images_size type: string - enum: ["256x256", "512x512", "1024x1024", "1792x1024", "1024x1792"] - default: "1024x1024" - example: "1024x1024" + enum: ['256x256', '512x512', '1024x1024', '1792x1024', '1024x1792'] + default: '1024x1024' + example: '1024x1024' nullable: true description: The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. Must be one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3` models. style: type: string - enum: ["vivid", "natural"] - default: "vivid" - example: "vivid" + enum: ['vivid', 'natural'] + default: 'vivid' + example: 'vivid' nullable: true description: The style of the generated images. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for `dall-e-3`. user: *end_user_param_configuration @@ -23263,7 +23263,7 @@ components: data: type: array items: - $ref: "#/components/schemas/Image" + $ref: '#/components/schemas/Image' required: - created - data @@ -23300,7 +23300,7 @@ components: The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. parameters: - $ref: "#/components/schemas/FunctionParameters" + $ref: '#/components/schemas/FunctionParameters' strict: type: boolean nullable: true @@ -23446,7 +23446,7 @@ components: - output FunctionToolCallOutputResource: allOf: - - $ref: "#/components/schemas/FunctionToolCallOutput" + - $ref: '#/components/schemas/FunctionToolCallOutput' - type: object properties: id: @@ -23457,7 +23457,7 @@ components: - id FunctionToolCallResource: allOf: - - $ref: "#/components/schemas/FunctionToolCall" + - $ref: '#/components/schemas/FunctionToolCall' - type: object properties: id: @@ -23519,9 +23519,9 @@ components: - format InputContent: oneOf: - - $ref: "#/components/schemas/InputText" - - $ref: "#/components/schemas/InputImage" - - $ref: "#/components/schemas/InputFile" + - $ref: '#/components/schemas/InputText' + - $ref: '#/components/schemas/InputImage' + - $ref: '#/components/schemas/InputFile' x-oaiExpandable: true InputFile: type: object @@ -23594,15 +23594,15 @@ components: - detail InputItem: oneOf: - - $ref: "#/components/schemas/EasyInputMessage" + - $ref: '#/components/schemas/EasyInputMessage' - type: object title: Item description: | An item representing part of the context for the response to be generated by the model. Can contain text, images, and audio inputs, as well as previous assistant responses and tool call outputs. - $ref: "#/components/schemas/Item" - - $ref: "#/components/schemas/ItemReference" + $ref: '#/components/schemas/Item' + - $ref: '#/components/schemas/ItemReference' discriminator: propertyName: type InputMessage: @@ -23642,7 +23642,7 @@ components: - completed - incomplete content: - $ref: "#/components/schemas/InputMessageContentList" + $ref: '#/components/schemas/InputMessageContentList' required: - role - content @@ -23657,10 +23657,10 @@ components: x-oaiExpandable: true items: x-oaiExpandable: true - $ref: "#/components/schemas/InputContent" + $ref: '#/components/schemas/InputContent' InputMessageResource: allOf: - - $ref: "#/components/schemas/InputMessage" + - $ref: '#/components/schemas/InputMessage' - type: object properties: id: @@ -23699,7 +23699,7 @@ components: prompt: description: A text description of the desired image(s). The maximum length is 1000 characters. type: string - example: "A cute baby sea otter wearing a beret" + example: 'A cute baby sea otter wearing a beret' mask: description: An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`. type: string @@ -23708,10 +23708,10 @@ components: anyOf: - type: string - type: string - enum: ["dall-e-2"] + enum: ['dall-e-2'] x-oaiTypeLabel: string - default: "dall-e-2" - example: "dall-e-2" + default: 'dall-e-2' + example: 'dall-e-2' nullable: true description: The model to use for image generation. Only `dall-e-2` is supported at this time. n: @@ -23724,9 +23724,9 @@ components: description: The number of images to generate. Must be between 1 and 10. size: &dalle2_images_size type: string - enum: ["256x256", "512x512", "1024x1024"] - default: "1024x1024" - example: "1024x1024" + enum: ['256x256', '512x512', '1024x1024'] + default: '1024x1024' + example: '1024x1024' nullable: true description: The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`. response_format: *images_response_format @@ -23746,10 +23746,10 @@ components: anyOf: - type: string - type: string - enum: ["dall-e-2"] + enum: ['dall-e-2'] x-oaiTypeLabel: string - default: "dall-e-2" - example: "dall-e-2" + default: 'dall-e-2' + example: 'dall-e-2' nullable: true description: The model to use for image generation. Only `dall-e-2` is supported at this time. n: *images_n @@ -23760,7 +23760,7 @@ components: - image CreateModelResponseProperties: allOf: - - $ref: "#/components/schemas/ModelResponseProperties" + - $ref: '#/components/schemas/ModelResponseProperties' CreateModerationRequest: type: object properties: @@ -23768,25 +23768,25 @@ components: description: The input text to classify oneOf: - type: string - default: "" - example: "I want to kill them." + default: '' + example: 'I want to kill them.' - type: array items: type: string - default: "" - example: "I want to kill them." + default: '' + example: 'I want to kill them.' model: description: | Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`. The default is `text-moderation-latest` which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use `text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy of `text-moderation-stable` may be slightly lower than for `text-moderation-latest`. nullable: false - default: "text-moderation-latest" - example: "text-moderation-stable" + default: 'text-moderation-latest' + example: 'text-moderation-stable' anyOf: - type: string - type: string - enum: ["text-moderation-latest", "text-moderation-stable"] + enum: ['text-moderation-latest', 'text-moderation-stable'] x-oaiTypeLabel: string required: - input @@ -23865,37 +23865,37 @@ components: properties: hate: type: number - description: The score for the category "hate". + description: The score for the category 'hate'. hate/threatening: type: number - description: The score for the category "hate/threatening". + description: The score for the category 'hate/threatening'. harassment: type: number - description: The score for the category "harassment". + description: The score for the category 'harassment'. harassment/threatening: type: number - description: The score for the category "harassment/threatening". + description: The score for the category 'harassment/threatening'. self-harm: type: number - description: The score for the category "self-harm". + description: The score for the category 'self-harm'. self-harm/intent: type: number - description: The score for the category "self-harm/intent". + description: The score for the category 'self-harm/intent'. self-harm/instructions: type: number - description: The score for the category "self-harm/instructions". + description: The score for the category 'self-harm/instructions'. sexual: type: number - description: The score for the category "sexual". + description: The score for the category 'sexual'. sexual/minors: type: number - description: The score for the category "sexual/minors". + description: The score for the category 'sexual/minors'. violence: type: number - description: The score for the category "violence". + description: The score for the category 'violence'. violence/graphic: type: number - description: The score for the category "violence/graphic". + description: The score for the category 'violence/graphic'. required: - hate - hate/threatening @@ -23918,8 +23918,8 @@ components: - results CreateResponse: allOf: - - $ref: "#/components/schemas/CreateModelResponseProperties" - - $ref: "#/components/schemas/ResponseProperties" + - $ref: '#/components/schemas/CreateModelResponseProperties' + - $ref: '#/components/schemas/ResponseProperties' - type: object properties: input: @@ -23955,7 +23955,7 @@ components: different content types. items: x-oaiExpandable: true - $ref: "#/components/schemas/InputItem" + $ref: '#/components/schemas/InputItem' include: type: array description: > @@ -23973,7 +23973,7 @@ components: from the computer call output. items: x-oaiExpandable: true - $ref: "#/components/schemas/Includable" + $ref: '#/components/schemas/Includable' nullable: true parallel_tool_calls: type: boolean @@ -24014,7 +24014,7 @@ components: data: type: array items: - $ref: "#/components/schemas/OpenAIFile" + $ref: '#/components/schemas/OpenAIFile' object: type: string enum: [list] @@ -24037,7 +24037,7 @@ components: Use "assistants" for [Assistants](https://platform.openai.com/docs/api-reference/assistants) and [Message](https://platform.openai.com/docs/api-reference/messages) files, "vision" for Assistants image file inputs, "batch" for [Batch API](https://platform.openai.com/docs/guides/batch), and "fine-tune" for [Fine-tuning](https://platform.openai.com/docs/api-reference/fine-tuning). type: string - enum: ["assistants", "batch", "fine-tune", "vision"] + enum: ['assistants', 'batch', 'fine-tune', 'vision'] required: - file - purpose @@ -24070,9 +24070,9 @@ components: description: Role ARN for the bedrock finetune job output_file: type: string - description: Finetune job"s output s3 location, will be constructed based on `training_file` if not provided + description: Finetune job's output s3 location, will be constructed based on `training_file` if not provided allOf: - - $ref: "#/components/schemas/OpenAIFinetuneJob" + - $ref: '#/components/schemas/OpenAIFinetuneJob' OpenAIFinetuneJob: type: object @@ -24161,7 +24161,7 @@ components: description: Role ARN for the bedrock finetune job output_file: type: string - description: Finetune job"s output s3 location, will be constructed based on `training_file` if not provided + description: Finetune job's output s3 location, will be constructed based on `training_file` if not provided PortkeyFinetuneJob: type: object @@ -24174,17 +24174,17 @@ components: description: Role ARN for the bedrock finetune job output_file: type: string - description: Finetune job"s output s3 location, will be constructed based on `training_file` if not provided + description: Finetune job's output s3 location, will be constructed based on `training_file` if not provided portkey_options: allOf: - - $ref: "#/components/schemas/PortkeyOptions" + - $ref: '#/components/schemas/PortkeyOptions' description: Portkey Gateway Provider specific headers to be passed to the provider, if portkey is used as a provider provider_options: allOf: - - $ref: "#/components/schemas/BedrockParams" + - $ref: '#/components/schemas/BedrockParams' description: Provider specific options to be passed to the provider, optional can be passed directly as well. Can be skipped if same keys are passed at top the level. allOf: - - $ref: "#/components/schemas/OpenAIFinetuneJob" + - $ref: '#/components/schemas/OpenAIFinetuneJob' description: Gateway supported body params for portkey managed fine-tuning. title: Portkey Params PortkeyOptions: @@ -24210,7 +24210,7 @@ components: VertexFinetuneJob: type: object allOf: - - $ref: "#/components/schemas/OpenAIFinetuneJob" + - $ref: '#/components/schemas/OpenAIFinetuneJob' ListFineTuningJobEventsResponse: type: object @@ -24218,7 +24218,7 @@ components: data: type: array items: - $ref: "#/components/schemas/FineTuningJobEvent" + $ref: '#/components/schemas/FineTuningJobEvent' object: type: string enum: [list] @@ -24232,7 +24232,7 @@ components: data: type: array items: - $ref: "#/components/schemas/FineTuningJobCheckpoint" + $ref: '#/components/schemas/FineTuningJobCheckpoint' object: type: string enum: [list] @@ -24256,13 +24256,13 @@ components: input: description: | Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. - example: "The quick brown fox jumped over the lazy dog" + example: 'The quick brown fox jumped over the lazy dog' oneOf: - type: string title: string description: The string that will be turned into an embedding. - default: "" - example: "This is a test." + default: '' + example: 'This is a test.' - type: array title: array description: The array of strings that will be turned into an embedding. @@ -24270,8 +24270,8 @@ components: maxItems: 2048 items: type: string - default: "" - example: "["This is a test."]" + default: '' + example: "['This is a test.']" - type: array title: array description: The array of integers that will be turned into an embedding. @@ -24279,7 +24279,7 @@ components: maxItems: 2048 items: type: integer - example: "[1212, 318, 257, 1332, 13]" + example: '[1212, 318, 257, 1332, 13]' - type: array title: array description: The array of arrays containing integers that will be turned into an embedding. @@ -24290,27 +24290,27 @@ components: minItems: 1 items: type: integer - example: "[[1212, 318, 257, 1332, 13]]" + example: '[[1212, 318, 257, 1332, 13]]' x-oaiExpandable: true model: description: *model_description - example: "text-embedding-3-small" + example: 'text-embedding-3-small' anyOf: - type: string - type: string enum: [ - "text-embedding-ada-002", - "text-embedding-3-small", - "text-embedding-3-large", + 'text-embedding-ada-002', + 'text-embedding-3-small', + 'text-embedding-3-large', ] x-oaiTypeLabel: string encoding_format: - description: "The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/)." - example: "float" - default: "float" + description: 'The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).' + example: 'float' + default: 'float' type: string - enum: ["float", "base64"] + enum: ['float', 'base64'] dimensions: description: | The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models. @@ -24328,7 +24328,7 @@ components: type: array description: The list of embeddings generated by the model. items: - $ref: "#/components/schemas/Embedding" + $ref: '#/components/schemas/Embedding' model: type: string description: The name of the model used to generate the embedding. @@ -24362,7 +24362,7 @@ components: - type: string title: string description: A simple text string to be reranked. - example: "Paris is the capital of France." + example: 'Paris is the capital of France.' - type: object title: object description: An object containing the document text and optional metadata. @@ -24370,7 +24370,7 @@ components: text: type: string description: The text content of the document. - example: "Paris is the capital of France." + example: 'Paris is the capital of France.' required: - text additionalProperties: true @@ -24390,27 +24390,27 @@ components: - **Bedrock**: Model ARN (e.g., `arn:aws:bedrock:us-west-2::foundation-model/cohere.rerank-v3-5:0`) - **Azure AI**: Cohere rerank deployments on Azure AI Inference; use the model name from your deployment, typically prefixed with `cohere.` (the gateway strips that prefix for the upstream request) type: string - example: "rerank-v3.5" + example: 'rerank-v3.5' query: description: The search query to compare against the documents. type: string - example: "What is the capital of France?" + example: 'What is the capital of France?' documents: description: | The list of documents to rerank. Each document can be a string or an object with a `text` field. The documents will be scored based on their relevance to the query. type: array items: - $ref: "#/components/schemas/RerankDocument" + $ref: '#/components/schemas/RerankDocument' minItems: 1 example: - - "Paris is the capital of France." - - "Berlin is the capital of Germany." - - "Madrid is the capital of Spain." + - 'Paris is the capital of France.' + - 'Berlin is the capital of Germany.' + - 'Madrid is the capital of Spain.' top_n: description: | The number of top results to return. If not specified, all documents are returned sorted by relevance. - For Voyage, the gateway maps this field to the provider"s `top_k` parameter. + For Voyage, the gateway maps this field to the provider's `top_k` parameter. type: integer minimum: 1 example: 3 @@ -24434,10 +24434,10 @@ components: type: array items: type: string - example: ["text", "title"] + example: ['text', 'title'] truncation: description: | - Whether to truncate documents that exceed the model"s maximum context length. Voyage-specific parameter. + Whether to truncate documents that exceed the model's maximum context length. Voyage-specific parameter. type: boolean parameters: description: | @@ -24492,28 +24492,28 @@ components: id: type: string description: A unique identifier for the rerank request. - example: "rerank-abc123" + example: 'rerank-abc123' object: type: string description: The object type, which is always "list". enum: [list] - example: "list" + example: 'list' results: type: array description: | The reranked results sorted by relevance score in descending order. items: - $ref: "#/components/schemas/RerankResult" + $ref: '#/components/schemas/RerankResult' model: type: string description: The model used for reranking. - example: "rerank-v3.5" + example: 'rerank-v3.5' usage: - $ref: "#/components/schemas/RerankUsage" + $ref: '#/components/schemas/RerankUsage' provider: type: string description: The provider that processed the request. - example: "cohere" + example: 'cohere' required: - object - results @@ -24536,7 +24536,7 @@ components: anyOf: - type: string - type: string - enum: ["whisper-1"] + enum: ['whisper-1'] x-oaiTypeLabel: string language: description: | @@ -24544,7 +24544,7 @@ components: type: string prompt: description: | - An optional text to guide the model"s style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting) should match the audio language. + An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting) should match the audio language. type: string response_format: description: | @@ -24673,12 +24673,12 @@ components: type: array description: Extracted words and their corresponding timestamps. items: - $ref: "#/components/schemas/TranscriptionWord" + $ref: '#/components/schemas/TranscriptionWord' segments: type: array description: Segments of the transcribed text and their corresponding details. items: - $ref: "#/components/schemas/TranscriptionSegment" + $ref: '#/components/schemas/TranscriptionSegment' required: [language, duration, text] CreateTranslationRequest: @@ -24698,11 +24698,11 @@ components: anyOf: - type: string - type: string - enum: ["whisper-1"] + enum: ['whisper-1'] x-oaiTypeLabel: string prompt: description: | - An optional text to guide the model"s style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting) should be in English. + An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting) should be in English. type: string response_format: description: | @@ -24743,7 +24743,7 @@ components: type: array description: Segments of the translated text and their corresponding details. items: - $ref: "#/components/schemas/TranscriptionSegment" + $ref: '#/components/schemas/TranscriptionSegment' required: [language, duration, text] CreateSpeechRequest: @@ -24756,7 +24756,7 @@ components: anyOf: - type: string - type: string - enum: ["tts-1", "tts-1-hd"] + enum: ['tts-1', 'tts-1-hd'] x-oaiTypeLabel: string input: type: string @@ -24765,14 +24765,14 @@ components: voice: description: The voice to use when generating the audio. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. Previews of the voices are available in the [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech/voice-options). type: string - enum: ["alloy", "echo", "fable", "onyx", "nova", "shimmer"] + enum: ['alloy', 'echo', 'fable', 'onyx', 'nova', 'shimmer'] response_format: - description: "The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`." - default: "mp3" + description: 'The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.' + default: 'mp3' type: string - enum: ["mp3", "opus", "aac", "flac", "wav", "pcm"] + enum: ['mp3', 'opus', 'aac', 'flac', 'wav', 'pcm'] speed: - description: "The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default." + description: 'The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.' type: number default: 1.0 minimum: 0.25 @@ -24850,25 +24850,25 @@ components: object: type: string description: The object type, which is always `file`. - enum: ["file"] + enum: ['file'] purpose: type: string description: The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results` and `vision`. enum: [ - "assistants", - "assistants_output", - "batch", - "batch_output", - "fine-tune", - "fine-tune-results", - "vision", + 'assistants', + 'assistants_output', + 'batch', + 'batch_output', + 'fine-tune', + 'fine-tune-results', + 'vision', ] status: type: string deprecated: true description: Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`. - enum: ["uploaded", "processed", "error"] + enum: ['uploaded', 'processed', 'error'] status_details: type: string deprecated: true @@ -24958,7 +24958,7 @@ components: x-oaiExpandable: true description: | A series of x/y coordinate pairs in the drag path. - $ref: "#/components/schemas/Coordinate" + $ref: '#/components/schemas/Coordinate' required: - type - path @@ -25003,7 +25003,7 @@ components: title: Text input description: | A text input to the model. - - $ref: "#/components/schemas/InputMessageContentList" + - $ref: '#/components/schemas/InputMessageContentList' type: type: string description: | @@ -25128,12 +25128,12 @@ components: description: The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`. enum: [ - "validating_files", - "queued", - "running", - "succeeded", - "failed", - "cancelled", + 'validating_files', + 'queued', + 'running', + 'succeeded', + 'failed', + 'cancelled', ] trained_tokens: type: integer @@ -25153,7 +25153,7 @@ components: maxItems: 5 items: oneOf: - - $ref: "#/components/schemas/FineTuningIntegration" + - $ref: '#/components/schemas/FineTuningIntegration' x-oaiExpandable: true seed: type: integer @@ -25188,8 +25188,8 @@ components: properties: type: type: string - description: "The type of the integration being enabled for the fine-tuning job" - enum: ["wandb"] + description: 'The type of the integration being enabled for the fine-tuning job' + enum: ['wandb'] wandb: type: object description: | @@ -25203,7 +25203,7 @@ components: description: | The name of the project that the new run will be created under. type: string - example: "my-wandb-project" + example: 'my-wandb-project' name: description: | A display name to set for the run. If not set, we will use the Job ID as the name. @@ -25222,7 +25222,7 @@ components: type: array items: type: string - example: "custom-tag" + example: 'custom-tag' FineTuningJobEvent: type: object @@ -25234,7 +25234,7 @@ components: type: integer level: type: string - enum: ["info", "warn", "error"] + enum: ['info', 'warn', 'error'] message: type: string object: @@ -25338,10 +25338,10 @@ components: minItems: 1 items: oneOf: - - $ref: "#/components/schemas/ChatCompletionRequestSystemMessage" - - $ref: "#/components/schemas/ChatCompletionRequestUserMessage" - - $ref: "#/components/schemas/FineTuneChatCompletionRequestAssistantMessage" - - $ref: "#/components/schemas/FineTuneChatCompletionRequestFunctionMessage" + - $ref: '#/components/schemas/ChatCompletionRequestSystemMessage' + - $ref: '#/components/schemas/ChatCompletionRequestUserMessage' + - $ref: '#/components/schemas/FineTuneChatCompletionRequestAssistantMessage' + - $ref: '#/components/schemas/FineTuneChatCompletionRequestFunctionMessage' x-oaiExpandable: true functions: description: A list of functions the model may generate JSON inputs for. @@ -25349,7 +25349,7 @@ components: minItems: 1 maxItems: 128 items: - $ref: "#/components/schemas/ChatCompletionFunctions" + $ref: '#/components/schemas/ChatCompletionFunctions' x-code-samples: name: Training format for chat models example: | @@ -25516,7 +25516,7 @@ components: type: array items: x-oaiExpandable: true - $ref: "#/components/schemas/CodeInterpreterToolOutput" + $ref: '#/components/schemas/CodeInterpreterToolOutput' description: | The results of the code interpreter tool call. required: @@ -25527,8 +25527,8 @@ components: - results CodeInterpreterToolOutput: oneOf: - - $ref: "#/components/schemas/CodeInterpreterTextOutput" - - $ref: "#/components/schemas/CodeInterpreterFileOutput" + - $ref: '#/components/schemas/CodeInterpreterTextOutput' + - $ref: '#/components/schemas/CodeInterpreterFileOutput' ComparisonFilter: type: object additionalProperties: false @@ -25641,7 +25641,7 @@ components: properties: type: type: string - description: "Type of operation: `and` or `or`." + description: 'Type of operation: `and` or `or`.' enum: - and - or @@ -25652,7 +25652,7 @@ components: `CompoundFilter`. items: oneOf: - - $ref: "#/components/schemas/ComparisonFilter" + - $ref: '#/components/schemas/ComparisonFilter' - type: object additionalProperties: true required: @@ -25660,15 +25660,15 @@ components: - filters ComputerAction: oneOf: - - $ref: "#/components/schemas/Click" - - $ref: "#/components/schemas/DoubleClick" - - $ref: "#/components/schemas/Drag" - - $ref: "#/components/schemas/KeyPress" - - $ref: "#/components/schemas/Move" - - $ref: "#/components/schemas/Screenshot" - - $ref: "#/components/schemas/Scroll" - - $ref: "#/components/schemas/Type" - - $ref: "#/components/schemas/Wait" + - $ref: '#/components/schemas/Click' + - $ref: '#/components/schemas/DoubleClick' + - $ref: '#/components/schemas/Drag' + - $ref: '#/components/schemas/KeyPress' + - $ref: '#/components/schemas/Move' + - $ref: '#/components/schemas/Screenshot' + - $ref: '#/components/schemas/Scroll' + - $ref: '#/components/schemas/Type' + - $ref: '#/components/schemas/Wait' ComputerScreenshotImage: type: object description: | @@ -25752,13 +25752,13 @@ components: description: | An identifier used when responding to the tool call with output. action: - $ref: "#/components/schemas/ComputerAction" + $ref: '#/components/schemas/ComputerAction' x-oaiExpandable: true pending_safety_checks: type: array x-oaiExpandable: true items: - $ref: "#/components/schemas/ComputerToolCallSafetyCheck" + $ref: '#/components/schemas/ComputerToolCallSafetyCheck' description: | The pending safety checks for the computer call. status: @@ -25809,9 +25809,9 @@ components: developer. items: - $ref: "#/components/schemas/ComputerToolCallSafetyCheck" + $ref: '#/components/schemas/ComputerToolCallSafetyCheck' output: - $ref: "#/components/schemas/ComputerScreenshotImage" + $ref: '#/components/schemas/ComputerScreenshotImage' status: type: string description: > @@ -25829,7 +25829,7 @@ components: - output ComputerToolCallOutputResource: allOf: - - $ref: "#/components/schemas/ComputerToolCallOutput" + - $ref: '#/components/schemas/ComputerToolCallOutput' - type: object properties: id: @@ -25862,10 +25862,10 @@ components: oneOf: - title: Input content types x-oaiExpandable: true - $ref: "#/components/schemas/InputContent" + $ref: '#/components/schemas/InputContent' - title: Output content types x-oaiExpandable: true - $ref: "#/components/schemas/OutputContent" + $ref: '#/components/schemas/OutputContent' Coordinate: type: object title: Coordinate @@ -25927,7 +25927,7 @@ components: x-oaiExpandable: true properties: effort: - $ref: "#/components/schemas/ReasoningEffort" + $ref: '#/components/schemas/ReasoningEffort' generate_summary: type: string description: > @@ -25936,7 +25936,7 @@ components: A summary of the reasoning performed by the model. This can be - useful for debugging and understanding the model"s reasoning + useful for debugging and understanding the model's reasoning process. One of `concise` or `detailed`. @@ -26040,8 +26040,8 @@ components: - refusal Response: allOf: - - $ref: "#/components/schemas/ModelResponseProperties" - - $ref: "#/components/schemas/ResponseProperties" + - $ref: '#/components/schemas/ModelResponseProperties' + - $ref: '#/components/schemas/ResponseProperties' - type: object properties: id: @@ -26072,7 +26072,7 @@ components: description: | Unix timestamp (in seconds) of when this Response was created. error: - $ref: "#/components/schemas/ResponseError" + $ref: '#/components/schemas/ResponseError' incomplete_details: type: object nullable: true @@ -26094,14 +26094,14 @@ components: - The length and order of items in the `output` array is dependent - on the model"s response. + on the model's response. - Rather than accessing the first item in the `output` array and - assuming it"s an `assistant` message with the content generated by + assuming it's an `assistant` message with the content generated by the model, you might consider using the `output_text` property where supported in SDKs. items: - $ref: "#/components/schemas/OutputItem" + $ref: '#/components/schemas/OutputItem' x-oaiExpandable: true output_text: type: string @@ -26118,7 +26118,7 @@ components: - python - javascript usage: - $ref: "#/components/schemas/ResponseUsage" + $ref: '#/components/schemas/ResponseUsage' parallel_tool_calls: type: boolean description: | @@ -26274,7 +26274,7 @@ components: The index of the output item that the code interpreter call is in progress. code_interpreter_call: - $ref: "#/components/schemas/CodeInterpreterToolCall" + $ref: '#/components/schemas/CodeInterpreterToolCall' required: - type - response_id @@ -26298,7 +26298,7 @@ components: The index of the output item that the code interpreter call is in progress. code_interpreter_call: - $ref: "#/components/schemas/CodeInterpreterToolCall" + $ref: '#/components/schemas/CodeInterpreterToolCall' required: - type - response_id @@ -26324,7 +26324,7 @@ components: The index of the output item that the code interpreter call is in progress. code_interpreter_call: - $ref: "#/components/schemas/CodeInterpreterToolCall" + $ref: '#/components/schemas/CodeInterpreterToolCall' required: - type - response_id @@ -26342,7 +26342,7 @@ components: - response.completed x-stainless-const: true response: - $ref: "#/components/schemas/Response" + $ref: '#/components/schemas/Response' description: | Properties of the completed response. required: @@ -26373,7 +26373,7 @@ components: The index of the content part that was added. part: x-oaiExpandable: true - $ref: "#/components/schemas/OutputContent" + $ref: '#/components/schemas/OutputContent' description: | The content part that was added. required: @@ -26407,7 +26407,7 @@ components: The index of the content part that is done. part: x-oaiExpandable: true - $ref: "#/components/schemas/OutputContent" + $ref: '#/components/schemas/OutputContent' description: | The content part that is done. required: @@ -26429,7 +26429,7 @@ components: - response.created x-stainless-const: true response: - $ref: "#/components/schemas/Response" + $ref: '#/components/schemas/Response' description: | The response that was created. required: @@ -26442,7 +26442,7 @@ components: nullable: true properties: code: - $ref: "#/components/schemas/ResponseErrorCode" + $ref: '#/components/schemas/ResponseErrorCode' message: type: string description: | @@ -26516,7 +26516,7 @@ components: - response.failed x-stainless-const: true response: - $ref: "#/components/schemas/Response" + $ref: '#/components/schemas/Response' description: | The response that failed. required: @@ -26649,7 +26649,7 @@ components: underscores and dashes, with a maximum length of 64. schema: - $ref: "#/components/schemas/ResponseFormatJsonSchemaSchema" + $ref: '#/components/schemas/ResponseFormatJsonSchemaSchema' strict: type: boolean nullable: true @@ -26759,7 +26759,7 @@ components: - response.in_progress x-stainless-const: true response: - $ref: "#/components/schemas/Response" + $ref: '#/components/schemas/Response' description: | The response that is in progress. required: @@ -26778,7 +26778,7 @@ components: - response.incomplete x-stainless-const: true response: - $ref: "#/components/schemas/Response" + $ref: '#/components/schemas/Response' description: | The response that was incomplete. required: @@ -26798,7 +26798,7 @@ components: type: array description: A list of items used to generate this response. items: - $ref: "#/components/schemas/ItemResource" + $ref: '#/components/schemas/ItemResource' has_more: type: boolean description: Whether there are more items available. @@ -26875,7 +26875,7 @@ components: description: | The index of the output item that was added. item: - $ref: "#/components/schemas/OutputItem" + $ref: '#/components/schemas/OutputItem' x-oaiExpandable: true description: | The output item that was added. @@ -26899,7 +26899,7 @@ components: description: | The index of the output item that was marked done. item: - $ref: "#/components/schemas/OutputItem" + $ref: '#/components/schemas/OutputItem' x-oaiExpandable: true description: | The output item that was marked done. @@ -26929,9 +26929,9 @@ components: guide](/docs/models) to browse and compare available models. - $ref: "#/components/schemas/ModelIdsResponses" + $ref: '#/components/schemas/ModelIdsResponses' reasoning: - $ref: "#/components/schemas/Reasoning" + $ref: '#/components/schemas/Reasoning' nullable: true max_output_tokens: description: > @@ -26944,7 +26944,7 @@ components: type: string description: > Inserts a system (or developer) message as the first item in the - model"s context. + model's context. When using along with `previous_response_id`, the instructions from @@ -26968,7 +26968,7 @@ components: - [Structured Outputs](/docs/guides/structured-outputs) properties: format: - $ref: "#/components/schemas/TextResponseFormatConfiguration" + $ref: '#/components/schemas/TextResponseFormatConfiguration' tools: type: array description: > @@ -26984,7 +26984,7 @@ components: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model"s capabilities, like [web search](/docs/guides/tools-web-search) + model's capabilities, like [web search](/docs/guides/tools-web-search) or [file search](/docs/guides/tools-file-search). Learn more about [built-in tools](/docs/guides/tools). - **Function calls (custom tools)**: Functions that are defined by @@ -26992,7 +26992,7 @@ components: enabling the model to call your own code. Learn more about [function calling](/docs/guides/function-calling). items: - $ref: "#/components/schemas/Tool" + $ref: '#/components/schemas/Tool' tool_choice: description: > How the model should select which tool (or tools) to use when @@ -27004,16 +27004,16 @@ components: the model can call. x-oaiExpandable: true oneOf: - - $ref: "#/components/schemas/ToolChoiceOptions" - - $ref: "#/components/schemas/ToolChoiceTypes" - - $ref: "#/components/schemas/ToolChoiceFunction" + - $ref: '#/components/schemas/ToolChoiceOptions' + - $ref: '#/components/schemas/ToolChoiceTypes' + - $ref: '#/components/schemas/ToolChoiceFunction' truncation: type: string description: > The truncation strategy to use for the model response. - `auto`: If the context of this response and previous ones exceeds - the model"s context window size, the model will truncate the + the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - `disabled` (default): If a model response will exceed the context @@ -27092,38 +27092,38 @@ components: - refusal ResponseStreamEvent: anyOf: - - $ref: "#/components/schemas/ResponseAudioDeltaEvent" - - $ref: "#/components/schemas/ResponseAudioDoneEvent" - - $ref: "#/components/schemas/ResponseAudioTranscriptDeltaEvent" - - $ref: "#/components/schemas/ResponseAudioTranscriptDoneEvent" - - $ref: "#/components/schemas/ResponseCodeInterpreterCallCodeDeltaEvent" - - $ref: "#/components/schemas/ResponseCodeInterpreterCallCodeDoneEvent" - - $ref: "#/components/schemas/ResponseCodeInterpreterCallCompletedEvent" - - $ref: "#/components/schemas/ResponseCodeInterpreterCallInProgressEvent" - - $ref: "#/components/schemas/ResponseCodeInterpreterCallInterpretingEvent" - - $ref: "#/components/schemas/ResponseCompletedEvent" - - $ref: "#/components/schemas/ResponseContentPartAddedEvent" - - $ref: "#/components/schemas/ResponseContentPartDoneEvent" - - $ref: "#/components/schemas/ResponseCreatedEvent" - - $ref: "#/components/schemas/ResponseErrorEvent" - - $ref: "#/components/schemas/ResponseFileSearchCallCompletedEvent" - - $ref: "#/components/schemas/ResponseFileSearchCallInProgressEvent" - - $ref: "#/components/schemas/ResponseFileSearchCallSearchingEvent" - - $ref: "#/components/schemas/ResponseFunctionCallArgumentsDeltaEvent" - - $ref: "#/components/schemas/ResponseFunctionCallArgumentsDoneEvent" - - $ref: "#/components/schemas/ResponseInProgressEvent" - - $ref: "#/components/schemas/ResponseFailedEvent" - - $ref: "#/components/schemas/ResponseIncompleteEvent" - - $ref: "#/components/schemas/ResponseOutputItemAddedEvent" - - $ref: "#/components/schemas/ResponseOutputItemDoneEvent" - - $ref: "#/components/schemas/ResponseRefusalDeltaEvent" - - $ref: "#/components/schemas/ResponseRefusalDoneEvent" - - $ref: "#/components/schemas/ResponseTextAnnotationDeltaEvent" - - $ref: "#/components/schemas/ResponseTextDeltaEvent" - - $ref: "#/components/schemas/ResponseTextDoneEvent" - - $ref: "#/components/schemas/ResponseWebSearchCallCompletedEvent" - - $ref: "#/components/schemas/ResponseWebSearchCallInProgressEvent" - - $ref: "#/components/schemas/ResponseWebSearchCallSearchingEvent" + - $ref: '#/components/schemas/ResponseAudioDeltaEvent' + - $ref: '#/components/schemas/ResponseAudioDoneEvent' + - $ref: '#/components/schemas/ResponseAudioTranscriptDeltaEvent' + - $ref: '#/components/schemas/ResponseAudioTranscriptDoneEvent' + - $ref: '#/components/schemas/ResponseCodeInterpreterCallCodeDeltaEvent' + - $ref: '#/components/schemas/ResponseCodeInterpreterCallCodeDoneEvent' + - $ref: '#/components/schemas/ResponseCodeInterpreterCallCompletedEvent' + - $ref: '#/components/schemas/ResponseCodeInterpreterCallInProgressEvent' + - $ref: '#/components/schemas/ResponseCodeInterpreterCallInterpretingEvent' + - $ref: '#/components/schemas/ResponseCompletedEvent' + - $ref: '#/components/schemas/ResponseContentPartAddedEvent' + - $ref: '#/components/schemas/ResponseContentPartDoneEvent' + - $ref: '#/components/schemas/ResponseCreatedEvent' + - $ref: '#/components/schemas/ResponseErrorEvent' + - $ref: '#/components/schemas/ResponseFileSearchCallCompletedEvent' + - $ref: '#/components/schemas/ResponseFileSearchCallInProgressEvent' + - $ref: '#/components/schemas/ResponseFileSearchCallSearchingEvent' + - $ref: '#/components/schemas/ResponseFunctionCallArgumentsDeltaEvent' + - $ref: '#/components/schemas/ResponseFunctionCallArgumentsDoneEvent' + - $ref: '#/components/schemas/ResponseInProgressEvent' + - $ref: '#/components/schemas/ResponseFailedEvent' + - $ref: '#/components/schemas/ResponseIncompleteEvent' + - $ref: '#/components/schemas/ResponseOutputItemAddedEvent' + - $ref: '#/components/schemas/ResponseOutputItemDoneEvent' + - $ref: '#/components/schemas/ResponseRefusalDeltaEvent' + - $ref: '#/components/schemas/ResponseRefusalDoneEvent' + - $ref: '#/components/schemas/ResponseTextAnnotationDeltaEvent' + - $ref: '#/components/schemas/ResponseTextDeltaEvent' + - $ref: '#/components/schemas/ResponseTextDoneEvent' + - $ref: '#/components/schemas/ResponseWebSearchCallCompletedEvent' + - $ref: '#/components/schemas/ResponseWebSearchCallInProgressEvent' + - $ref: '#/components/schemas/ResponseWebSearchCallSearchingEvent' discriminator: propertyName: type ResponseTextAnnotationDeltaEvent: @@ -27155,7 +27155,7 @@ components: description: | The index of the annotation that was added. annotation: - $ref: "#/components/schemas/Annotation" + $ref: '#/components/schemas/Annotation' required: - type - item_id @@ -27363,7 +27363,7 @@ components: RunStepCompletionUsage: type: object - description: Usage statistics related to the run step. This value will be `null` while the run step"s status is `in_progress`. + description: Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`. properties: completion_tokens: type: integer @@ -27392,7 +27392,7 @@ components: description: > `auto` is the default value enum: [none, auto] - - $ref: "#/components/schemas/AssistantsApiResponseFormat" + - $ref: '#/components/schemas/AssistantsApiResponseFormat' x-oaiExpandable: true AssistantsApiResponseFormat: @@ -27402,15 +27402,15 @@ components: properties: type: type: string - enum: ["text", "json_object"] - example: "json_object" - default: "text" + enum: ['text', 'json_object'] + example: 'json_object' + default: 'text' description: Must be one of `text` or `json_object`. Annotation: oneOf: - - $ref: "#/components/schemas/FileCitation" - - $ref: "#/components/schemas/UrlCitation" - - $ref: "#/components/schemas/FilePath" + - $ref: '#/components/schemas/FileCitation' + - $ref: '#/components/schemas/UrlCitation' + - $ref: '#/components/schemas/FilePath' AssistantObject: type: object title: Assistant @@ -27455,14 +27455,14 @@ components: maxItems: 128 items: oneOf: - - $ref: "#/components/schemas/AssistantToolsCode" - - $ref: "#/components/schemas/AssistantToolsFileSearch" - - $ref: "#/components/schemas/AssistantToolsFunction" + - $ref: '#/components/schemas/AssistantToolsCode' + - $ref: '#/components/schemas/AssistantToolsFileSearch' + - $ref: '#/components/schemas/AssistantToolsFunction' x-oaiExpandable: true tool_resources: type: object description: | - A set of resources that are used by the assistant"s tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. properties: code_interpreter: type: object @@ -27513,7 +27513,7 @@ components: We generally recommend altering this or temperature but not both. response_format: - $ref: "#/components/schemas/AssistantsApiResponseFormatOption" + $ref: '#/components/schemas/AssistantsApiResponseFormatOption' nullable: true required: - id @@ -27536,32 +27536,32 @@ components: properties: model: description: *model_description - example: "gpt-4-turbo" + example: 'gpt-4-turbo' anyOf: - type: string - type: string enum: [ - "gpt-4o", - "gpt-4o-2024-05-13", - "gpt-4-turbo", - "gpt-4-turbo-2024-04-09", - "gpt-4-0125-preview", - "gpt-4-turbo-preview", - "gpt-4-1106-preview", - "gpt-4-vision-preview", - "gpt-4", - "gpt-4-0314", - "gpt-4-0613", - "gpt-4-32k", - "gpt-4-32k-0314", - "gpt-4-32k-0613", - "gpt-3.5-turbo", - "gpt-3.5-turbo-16k", - "gpt-3.5-turbo-0613", - "gpt-3.5-turbo-1106", - "gpt-3.5-turbo-0125", - "gpt-3.5-turbo-16k-0613", + 'gpt-4o', + 'gpt-4o-2024-05-13', + 'gpt-4-turbo', + 'gpt-4-turbo-2024-04-09', + 'gpt-4-0125-preview', + 'gpt-4-turbo-preview', + 'gpt-4-1106-preview', + 'gpt-4-vision-preview', + 'gpt-4', + 'gpt-4-0314', + 'gpt-4-0613', + 'gpt-4-32k', + 'gpt-4-32k-0314', + 'gpt-4-32k-0613', + 'gpt-3.5-turbo', + 'gpt-3.5-turbo-16k', + 'gpt-3.5-turbo-0613', + 'gpt-3.5-turbo-1106', + 'gpt-3.5-turbo-0125', + 'gpt-3.5-turbo-16k-0613', ] x-oaiTypeLabel: string name: @@ -27586,14 +27586,14 @@ components: maxItems: 128 items: oneOf: - - $ref: "#/components/schemas/AssistantToolsCode" - - $ref: "#/components/schemas/AssistantToolsFileSearch" - - $ref: "#/components/schemas/AssistantToolsFunction" + - $ref: '#/components/schemas/AssistantToolsCode' + - $ref: '#/components/schemas/AssistantToolsFileSearch' + - $ref: '#/components/schemas/AssistantToolsFunction' x-oaiExpandable: true tool_resources: type: object description: | - A set of resources that are used by the assistant"s tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. properties: code_interpreter: type: object @@ -27632,7 +27632,7 @@ components: items: type: string chunking_strategy: - # Ideally we"d reuse the chunking strategy schema here, but it doesn"t expand properly + # Ideally we'd reuse the chunking strategy schema here, but it doesn't expand properly type: object description: The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. oneOf: @@ -27644,7 +27644,7 @@ components: type: type: string description: Always `auto`. - enum: ["auto"] + enum: ['auto'] required: - type - type: object @@ -27654,7 +27654,7 @@ components: type: type: string description: Always `static`. - enum: ["static"] + enum: ['static'] static: type: object additionalProperties: false @@ -27708,7 +27708,7 @@ components: nullable: true description: *run_top_p_description response_format: - $ref: "#/components/schemas/AssistantsApiResponseFormatOption" + $ref: '#/components/schemas/AssistantsApiResponseFormatOption' nullable: true required: - model @@ -27744,7 +27744,7 @@ components: type: object properties: metadata: - $ref: "#/components/schemas/Metadata" + $ref: '#/components/schemas/Metadata' temperature: type: number minimum: 0 @@ -27816,14 +27816,14 @@ components: maxItems: 128 items: oneOf: - - $ref: "#/components/schemas/AssistantToolsCode" - - $ref: "#/components/schemas/AssistantToolsFileSearch" - - $ref: "#/components/schemas/AssistantToolsFunction" + - $ref: '#/components/schemas/AssistantToolsCode' + - $ref: '#/components/schemas/AssistantToolsFileSearch' + - $ref: '#/components/schemas/AssistantToolsFunction' x-oaiExpandable: true tool_resources: type: object description: | - A set of resources that are used by the assistant"s tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. properties: code_interpreter: type: object @@ -27869,7 +27869,7 @@ components: nullable: true description: *run_top_p_description response_format: - $ref: "#/components/schemas/AssistantsApiResponseFormatOption" + $ref: '#/components/schemas/AssistantsApiResponseFormatOption' nullable: true DeleteAssistantResponse: @@ -27891,15 +27891,15 @@ components: description: | Content item used to generate a response. oneOf: - - $ref: "#/components/schemas/InputMessage" - - $ref: "#/components/schemas/OutputMessage" - - $ref: "#/components/schemas/FileSearchToolCall" - - $ref: "#/components/schemas/ComputerToolCall" - - $ref: "#/components/schemas/ComputerToolCallOutput" - - $ref: "#/components/schemas/WebSearchToolCall" - - $ref: "#/components/schemas/FunctionToolCall" - - $ref: "#/components/schemas/FunctionToolCallOutput" - - $ref: "#/components/schemas/ReasoningItem" + - $ref: '#/components/schemas/InputMessage' + - $ref: '#/components/schemas/OutputMessage' + - $ref: '#/components/schemas/FileSearchToolCall' + - $ref: '#/components/schemas/ComputerToolCall' + - $ref: '#/components/schemas/ComputerToolCallOutput' + - $ref: '#/components/schemas/WebSearchToolCall' + - $ref: '#/components/schemas/FunctionToolCall' + - $ref: '#/components/schemas/FunctionToolCallOutput' + - $ref: '#/components/schemas/ReasoningItem' x-oaiExpandable: true discriminator: propertyName: type @@ -27927,14 +27927,14 @@ components: description: | Content item used to generate a response. oneOf: - - $ref: "#/components/schemas/InputMessageResource" - - $ref: "#/components/schemas/OutputMessage" - - $ref: "#/components/schemas/FileSearchToolCall" - - $ref: "#/components/schemas/ComputerToolCall" - - $ref: "#/components/schemas/ComputerToolCallOutputResource" - - $ref: "#/components/schemas/WebSearchToolCall" - - $ref: "#/components/schemas/FunctionToolCallResource" - - $ref: "#/components/schemas/FunctionToolCallOutputResource" + - $ref: '#/components/schemas/InputMessageResource' + - $ref: '#/components/schemas/OutputMessage' + - $ref: '#/components/schemas/FileSearchToolCall' + - $ref: '#/components/schemas/ComputerToolCall' + - $ref: '#/components/schemas/ComputerToolCallOutputResource' + - $ref: '#/components/schemas/WebSearchToolCall' + - $ref: '#/components/schemas/FunctionToolCallResource' + - $ref: '#/components/schemas/FunctionToolCallOutputResource' x-oaiExpandable: true discriminator: propertyName: type @@ -27972,17 +27972,17 @@ components: properties: object: type: string - example: "list" + example: 'list' data: type: array items: - $ref: "#/components/schemas/AssistantObject" + $ref: '#/components/schemas/AssistantObject' first_id: type: string - example: "asst_abc123" + example: 'asst_abc123' last_id: type: string - example: "asst_abc456" + example: 'asst_abc456' has_more: type: boolean example: false @@ -28003,8 +28003,8 @@ components: properties: type: type: string - description: "The type of tool being defined: `code_interpreter`" - enum: ["code_interpreter"] + description: 'The type of tool being defined: `code_interpreter`' + enum: ['code_interpreter'] required: - type @@ -28014,8 +28014,8 @@ components: properties: type: type: string - description: "The type of tool being defined: `file_search`" - enum: ["file_search"] + description: 'The type of tool being defined: `file_search`' + enum: ['file_search'] file_search: type: object description: Overrides for the file search tool. @@ -28037,8 +28037,8 @@ components: properties: type: type: string - description: "The type of tool being defined: `file_search`" - enum: ["file_search"] + description: 'The type of tool being defined: `file_search`' + enum: ['file_search'] required: - type @@ -28048,10 +28048,10 @@ components: properties: type: type: string - description: "The type of tool being defined: `function`" - enum: ["function"] + description: 'The type of tool being defined: `function`' + enum: ['function'] function: - $ref: "#/components/schemas/FunctionObject" + $ref: '#/components/schemas/FunctionObject' required: - type - function @@ -28064,7 +28064,7 @@ components: type: type: string description: The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`. - enum: ["auto", "last_messages"] + enum: ['auto', 'last_messages'] last_messages: type: integer description: The number of most recent messages from the thread when constructing the context for the run. @@ -28088,7 +28088,7 @@ components: `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools before responding to the user. enum: [none, auto, required] - - $ref: "#/components/schemas/AssistantsNamedToolChoice" + - $ref: '#/components/schemas/AssistantsNamedToolChoice' x-oaiExpandable: true AssistantsNamedToolChoice: @@ -28097,7 +28097,7 @@ components: properties: type: type: string - enum: ["function", "code_interpreter", "file_search"] + enum: ['function', 'code_interpreter', 'file_search'] description: The type of the tool. If type is `function`, the function name must be set function: type: object @@ -28121,7 +28121,7 @@ components: object: description: The object type, which is always `thread.run`. type: string - enum: ["thread.run"] + enum: ['thread.run'] created_at: description: The Unix timestamp (in seconds) for when the run was created. type: integer @@ -28136,15 +28136,15 @@ components: type: string enum: [ - "queued", - "in_progress", - "requires_action", - "cancelling", - "cancelled", - "failed", - "completed", - "incomplete", - "expired", + 'queued', + 'in_progress', + 'requires_action', + 'cancelling', + 'cancelled', + 'failed', + 'completed', + 'incomplete', + 'expired', ] required_action: type: object @@ -28154,7 +28154,7 @@ components: type: description: For now, this is always `submit_tool_outputs`. type: string - enum: ["submit_tool_outputs"] + enum: ['submit_tool_outputs'] submit_tool_outputs: type: object description: Details on the tool outputs needed for this run to continue. @@ -28163,7 +28163,7 @@ components: type: array description: A list of the relevant tool calls. items: - $ref: "#/components/schemas/RunToolCallObject" + $ref: '#/components/schemas/RunToolCallObject' required: - tool_calls required: @@ -28177,7 +28177,7 @@ components: code: type: string description: One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`. - enum: ["server_error", "rate_limit_exceeded", "invalid_prompt"] + enum: ['server_error', 'rate_limit_exceeded', 'invalid_prompt'] message: type: string description: A human-readable description of the error. @@ -28212,7 +28212,7 @@ components: reason: description: The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run. type: string - enum: ["max_completion_tokens", "max_prompt_tokens"] + enum: ['max_completion_tokens', 'max_prompt_tokens'] model: description: The model that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run. type: string @@ -28226,9 +28226,9 @@ components: maxItems: 20 items: oneOf: - - $ref: "#/components/schemas/AssistantToolsCode" - - $ref: "#/components/schemas/AssistantToolsFileSearch" - - $ref: "#/components/schemas/AssistantToolsFunction" + - $ref: '#/components/schemas/AssistantToolsCode' + - $ref: '#/components/schemas/AssistantToolsFileSearch' + - $ref: '#/components/schemas/AssistantToolsFunction' x-oaiExpandable: true metadata: description: *metadata_description @@ -28236,7 +28236,7 @@ components: x-oaiTypeLabel: map nullable: true usage: - $ref: "#/components/schemas/RunCompletionUsage" + $ref: '#/components/schemas/RunCompletionUsage' temperature: description: The sampling temperature used for this run. If not set, defaults to 1. type: number @@ -28258,15 +28258,15 @@ components: The maximum number of completion tokens specified to have been used over the course of the run. minimum: 256 truncation_strategy: - $ref: "#/components/schemas/TruncationObject" + $ref: '#/components/schemas/TruncationObject' nullable: true tool_choice: - $ref: "#/components/schemas/AssistantsApiToolChoiceOption" + $ref: '#/components/schemas/AssistantsApiToolChoiceOption' nullable: true parallel_tool_calls: - $ref: "#/components/schemas/ParallelToolCalls" + $ref: '#/components/schemas/ParallelToolCalls' response_format: - $ref: "#/components/schemas/AssistantsApiResponseFormatOption" + $ref: '#/components/schemas/AssistantsApiResponseFormatOption' nullable: true required: - id @@ -28342,32 +28342,32 @@ components: type: string model: description: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. - example: "gpt-4-turbo" + example: 'gpt-4-turbo' anyOf: - type: string - type: string enum: [ - "gpt-4o", - "gpt-4o-2024-05-13", - "gpt-4-turbo", - "gpt-4-turbo-2024-04-09", - "gpt-4-0125-preview", - "gpt-4-turbo-preview", - "gpt-4-1106-preview", - "gpt-4-vision-preview", - "gpt-4", - "gpt-4-0314", - "gpt-4-0613", - "gpt-4-32k", - "gpt-4-32k-0314", - "gpt-4-32k-0613", - "gpt-3.5-turbo", - "gpt-3.5-turbo-16k", - "gpt-3.5-turbo-0613", - "gpt-3.5-turbo-1106", - "gpt-3.5-turbo-0125", - "gpt-3.5-turbo-16k-0613", + 'gpt-4o', + 'gpt-4o-2024-05-13', + 'gpt-4-turbo', + 'gpt-4-turbo-2024-04-09', + 'gpt-4-0125-preview', + 'gpt-4-turbo-preview', + 'gpt-4-1106-preview', + 'gpt-4-vision-preview', + 'gpt-4', + 'gpt-4-0314', + 'gpt-4-0613', + 'gpt-4-32k', + 'gpt-4-32k-0314', + 'gpt-4-32k-0613', + 'gpt-3.5-turbo', + 'gpt-3.5-turbo-16k', + 'gpt-3.5-turbo-0613', + 'gpt-3.5-turbo-1106', + 'gpt-3.5-turbo-0125', + 'gpt-3.5-turbo-16k-0613', ] x-oaiTypeLabel: string nullable: true @@ -28383,7 +28383,7 @@ components: description: Adds additional messages to the thread before creating the run. type: array items: - $ref: "#/components/schemas/CreateMessageRequest" + $ref: '#/components/schemas/CreateMessageRequest' nullable: true tools: description: Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. @@ -28392,9 +28392,9 @@ components: maxItems: 20 items: oneOf: - - $ref: "#/components/schemas/AssistantToolsCode" - - $ref: "#/components/schemas/AssistantToolsFileSearch" - - $ref: "#/components/schemas/AssistantToolsFunction" + - $ref: '#/components/schemas/AssistantToolsCode' + - $ref: '#/components/schemas/AssistantToolsFileSearch' + - $ref: '#/components/schemas/AssistantToolsFunction' x-oaiExpandable: true metadata: description: *metadata_description @@ -28435,15 +28435,15 @@ components: The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. minimum: 256 truncation_strategy: - $ref: "#/components/schemas/TruncationObject" + $ref: '#/components/schemas/TruncationObject' nullable: true tool_choice: - $ref: "#/components/schemas/AssistantsApiToolChoiceOption" + $ref: '#/components/schemas/AssistantsApiToolChoiceOption' nullable: true parallel_tool_calls: - $ref: "#/components/schemas/ParallelToolCalls" + $ref: '#/components/schemas/ParallelToolCalls' response_format: - $ref: "#/components/schemas/AssistantsApiResponseFormatOption" + $ref: '#/components/schemas/AssistantsApiResponseFormatOption' nullable: true required: - thread_id @@ -28453,17 +28453,17 @@ components: properties: object: type: string - example: "list" + example: 'list' data: type: array items: - $ref: "#/components/schemas/RunObject" + $ref: '#/components/schemas/RunObject' first_id: type: string - example: "run_abc123" + example: 'run_abc123' last_id: type: string - example: "run_abc456" + example: 'run_abc456' has_more: type: boolean example: false @@ -28532,9 +28532,9 @@ components: is preferred for models that support it. oneOf: - - $ref: "#/components/schemas/ResponseFormatText" - - $ref: "#/components/schemas/TextResponseFormatJsonSchema" - - $ref: "#/components/schemas/ResponseFormatJsonObject" + - $ref: '#/components/schemas/ResponseFormatText' + - $ref: '#/components/schemas/TextResponseFormatJsonSchema' + - $ref: '#/components/schemas/ResponseFormatJsonObject' x-oaiExpandable: true TextResponseFormatJsonSchema: type: object @@ -28562,7 +28562,7 @@ components: The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. schema: - $ref: "#/components/schemas/ResponseFormatJsonSchemaSchema" + $ref: '#/components/schemas/ResponseFormatJsonSchemaSchema' strict: type: boolean nullable: true @@ -28593,7 +28593,7 @@ components: type: type: string description: The type of tool call the output is required for. For now, this is always `function`. - enum: ["function"] + enum: ['function'] function: type: object description: The function definition. @@ -28673,36 +28673,36 @@ components: description: The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. type: string thread: - $ref: "#/components/schemas/CreateThreadRequest" + $ref: '#/components/schemas/CreateThreadRequest' description: If no thread is provided, an empty thread will be created. model: description: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. - example: "gpt-4-turbo" + example: 'gpt-4-turbo' anyOf: - type: string - type: string enum: [ - "gpt-4o", - "gpt-4o-2024-05-13", - "gpt-4-turbo", - "gpt-4-turbo-2024-04-09", - "gpt-4-0125-preview", - "gpt-4-turbo-preview", - "gpt-4-1106-preview", - "gpt-4-vision-preview", - "gpt-4", - "gpt-4-0314", - "gpt-4-0613", - "gpt-4-32k", - "gpt-4-32k-0314", - "gpt-4-32k-0613", - "gpt-3.5-turbo", - "gpt-3.5-turbo-16k", - "gpt-3.5-turbo-0613", - "gpt-3.5-turbo-1106", - "gpt-3.5-turbo-0125", - "gpt-3.5-turbo-16k-0613", + 'gpt-4o', + 'gpt-4o-2024-05-13', + 'gpt-4-turbo', + 'gpt-4-turbo-2024-04-09', + 'gpt-4-0125-preview', + 'gpt-4-turbo-preview', + 'gpt-4-1106-preview', + 'gpt-4-vision-preview', + 'gpt-4', + 'gpt-4-0314', + 'gpt-4-0613', + 'gpt-4-32k', + 'gpt-4-32k-0314', + 'gpt-4-32k-0613', + 'gpt-3.5-turbo', + 'gpt-3.5-turbo-16k', + 'gpt-3.5-turbo-0613', + 'gpt-3.5-turbo-1106', + 'gpt-3.5-turbo-0125', + 'gpt-3.5-turbo-16k-0613', ] x-oaiTypeLabel: string nullable: true @@ -28717,13 +28717,13 @@ components: maxItems: 20 items: oneOf: - - $ref: "#/components/schemas/AssistantToolsCode" - - $ref: "#/components/schemas/AssistantToolsFileSearch" - - $ref: "#/components/schemas/AssistantToolsFunction" + - $ref: '#/components/schemas/AssistantToolsCode' + - $ref: '#/components/schemas/AssistantToolsFileSearch' + - $ref: '#/components/schemas/AssistantToolsFunction' tool_resources: type: object description: | - A set of resources that are used by the assistant"s tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. properties: code_interpreter: type: object @@ -28786,15 +28786,15 @@ components: The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. minimum: 256 truncation_strategy: - $ref: "#/components/schemas/TruncationObject" + $ref: '#/components/schemas/TruncationObject' nullable: true tool_choice: - $ref: "#/components/schemas/AssistantsApiToolChoiceOption" + $ref: '#/components/schemas/AssistantsApiToolChoiceOption' nullable: true parallel_tool_calls: - $ref: "#/components/schemas/ParallelToolCalls" + $ref: '#/components/schemas/ParallelToolCalls' response_format: - $ref: "#/components/schemas/AssistantsApiResponseFormatOption" + $ref: '#/components/schemas/AssistantsApiResponseFormatOption' nullable: true required: - thread_id @@ -28811,14 +28811,14 @@ components: object: description: The object type, which is always `thread`. type: string - enum: ["thread"] + enum: ['thread'] created_at: description: The Unix timestamp (in seconds) for when the thread was created. type: integer tool_resources: type: object description: | - A set of resources that are made available to the assistant"s tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. properties: code_interpreter: type: object @@ -28872,11 +28872,11 @@ components: description: A list of [messages](https://platform.openai.com/docs/api-reference/messages) to start the thread with. type: array items: - $ref: "#/components/schemas/CreateMessageRequest" + $ref: '#/components/schemas/CreateMessageRequest' tool_resources: type: object description: | - A set of resources that are made available to the assistant"s tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. properties: code_interpreter: type: object @@ -28915,7 +28915,7 @@ components: items: type: string chunking_strategy: - # Ideally we"d reuse the chunking strategy schema here, but it doesn"t expand properly + # Ideally we'd reuse the chunking strategy schema here, but it doesn't expand properly type: object description: The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. oneOf: @@ -28927,7 +28927,7 @@ components: type: type: string description: Always `auto`. - enum: ["auto"] + enum: ['auto'] required: - type - type: object @@ -28937,7 +28937,7 @@ components: type: type: string description: Always `static`. - enum: ["static"] + enum: ['static'] static: type: object additionalProperties: false @@ -28983,7 +28983,7 @@ components: tool_resources: type: object description: | - A set of resources that are made available to the assistant"s tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. properties: code_interpreter: type: object @@ -29032,17 +29032,17 @@ components: properties: object: type: string - example: "list" + example: 'list' data: type: array items: - $ref: "#/components/schemas/ThreadObject" + $ref: '#/components/schemas/ThreadObject' first_id: type: string - example: "asst_abc123" + example: 'asst_abc123' last_id: type: string - example: "asst_abc456" + example: 'asst_abc456' has_more: type: boolean example: false @@ -29064,7 +29064,7 @@ components: object: description: The object type, which is always `thread.message`. type: string - enum: ["thread.message"] + enum: ['thread.message'] created_at: description: The Unix timestamp (in seconds) for when the message was created. type: integer @@ -29074,7 +29074,7 @@ components: status: description: The status of the message, which can be either `in_progress`, `incomplete`, or `completed`. type: string - enum: ["in_progress", "incomplete", "completed"] + enum: ['in_progress', 'incomplete', 'completed'] incomplete_details: description: On an incomplete message, details about why the message is incomplete. type: object @@ -29084,11 +29084,11 @@ components: description: The reason the message is incomplete. enum: [ - "content_filter", - "max_tokens", - "run_cancelled", - "run_expired", - "run_failed", + 'content_filter', + 'max_tokens', + 'run_cancelled', + 'run_expired', + 'run_failed', ] nullable: true required: @@ -29104,15 +29104,15 @@ components: role: description: The entity that produced the message. One of `user` or `assistant`. type: string - enum: ["user", "assistant"] + enum: ['user', 'assistant'] content: description: The content of the message in array of text and/or images. type: array items: oneOf: - - $ref: "#/components/schemas/MessageContentImageFileObject" - - $ref: "#/components/schemas/MessageContentImageUrlObject" - - $ref: "#/components/schemas/MessageContentTextObject" + - $ref: '#/components/schemas/MessageContentImageFileObject' + - $ref: '#/components/schemas/MessageContentImageUrlObject' + - $ref: '#/components/schemas/MessageContentTextObject' x-oaiExpandable: true assistant_id: description: If applicable, the ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) that authored this message. @@ -29135,8 +29135,8 @@ components: type: array items: oneOf: - - $ref: "#/components/schemas/AssistantToolsCode" - - $ref: "#/components/schemas/AssistantToolsFileSearchTypeOnly" + - $ref: '#/components/schemas/AssistantToolsCode' + - $ref: '#/components/schemas/AssistantToolsFileSearchTypeOnly' x-oaiExpandable: true description: A list of files attached to the message, and the tools they were added to. nullable: true @@ -29197,7 +29197,7 @@ components: object: description: The object type, which is always `thread.message.delta`. type: string - enum: ["thread.message.delta"] + enum: ['thread.message.delta'] delta: description: The delta containing the fields that have changed on the Message. type: object @@ -29205,15 +29205,15 @@ components: role: description: The entity that produced the message. One of `user` or `assistant`. type: string - enum: ["user", "assistant"] + enum: ['user', 'assistant'] content: description: The content of the message in array of text and/or images. type: array items: oneOf: - - $ref: "#/components/schemas/MessageDeltaContentImageFileObject" - - $ref: "#/components/schemas/MessageDeltaContentTextObject" - - $ref: "#/components/schemas/MessageDeltaContentImageUrlObject" + - $ref: '#/components/schemas/MessageDeltaContentImageFileObject' + - $ref: '#/components/schemas/MessageDeltaContentTextObject' + - $ref: '#/components/schemas/MessageDeltaContentImageUrlObject' x-oaiExpandable: true required: - id @@ -29246,7 +29246,7 @@ components: properties: role: type: string - enum: ["user", "assistant"] + enum: ['user', 'assistant'] description: | The role of the entity that is creating the message. Allowed values include: - `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages. @@ -29261,9 +29261,9 @@ components: title: Array of content parts items: oneOf: - - $ref: "#/components/schemas/MessageContentImageFileObject" - - $ref: "#/components/schemas/MessageContentImageUrlObject" - - $ref: "#/components/schemas/MessageRequestContentTextObject" + - $ref: '#/components/schemas/MessageContentImageFileObject' + - $ref: '#/components/schemas/MessageContentImageUrlObject' + - $ref: '#/components/schemas/MessageRequestContentTextObject' x-oaiExpandable: true minItems: 1 x-oaiExpandable: true @@ -29280,8 +29280,8 @@ components: type: array items: oneOf: - - $ref: "#/components/schemas/AssistantToolsCode" - - $ref: "#/components/schemas/AssistantToolsFileSearchTypeOnly" + - $ref: '#/components/schemas/AssistantToolsCode' + - $ref: '#/components/schemas/AssistantToolsFileSearchTypeOnly' x-oaiExpandable: true description: A list of files attached to the message, and the tools they should be added to. required: @@ -29323,17 +29323,17 @@ components: properties: object: type: string - example: "list" + example: 'list' data: type: array items: - $ref: "#/components/schemas/MessageObject" + $ref: '#/components/schemas/MessageObject' first_id: type: string - example: "msg_abc123" + example: 'msg_abc123' last_id: type: string - example: "msg_abc123" + example: 'msg_abc123' has_more: type: boolean example: false @@ -29352,7 +29352,7 @@ components: type: description: Always `image_file`. type: string - enum: ["image_file"] + enum: ['image_file'] image_file: type: object properties: @@ -29362,8 +29362,8 @@ components: detail: type: string description: Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`. - enum: ["auto", "low", "high"] - default: "auto" + enum: ['auto', 'low', 'high'] + default: 'auto' required: - file_id required: @@ -29381,7 +29381,7 @@ components: type: description: Always `image_file`. type: string - enum: ["image_file"] + enum: ['image_file'] image_file: type: object properties: @@ -29391,8 +29391,8 @@ components: detail: type: string description: Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`. - enum: ["auto", "low", "high"] - default: "auto" + enum: ['auto', 'low', 'high'] + default: 'auto' required: - index - type @@ -29404,20 +29404,20 @@ components: properties: type: type: string - enum: ["image_url"] + enum: ['image_url'] description: The type of the content part. image_url: type: object properties: url: type: string - description: "The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp." + description: 'The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.' format: uri detail: type: string description: Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. Default value is `auto` - enum: ["auto", "low", "high"] - default: "auto" + enum: ['auto', 'low', 'high'] + default: 'auto' required: - url required: @@ -29435,18 +29435,18 @@ components: type: description: Always `image_url`. type: string - enum: ["image_url"] + enum: ['image_url'] image_url: type: object properties: url: - description: "The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp." + description: 'The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.' type: string detail: type: string description: Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. - enum: ["auto", "low", "high"] - default: "auto" + enum: ['auto', 'low', 'high'] + default: 'auto' required: - index - type @@ -29459,7 +29459,7 @@ components: type: description: Always `text`. type: string - enum: ["text"] + enum: ['text'] text: type: object properties: @@ -29470,8 +29470,8 @@ components: type: array items: oneOf: - - $ref: "#/components/schemas/MessageContentTextAnnotationsFileCitationObject" - - $ref: "#/components/schemas/MessageContentTextAnnotationsFilePathObject" + - $ref: '#/components/schemas/MessageContentTextAnnotationsFileCitationObject' + - $ref: '#/components/schemas/MessageContentTextAnnotationsFilePathObject' x-oaiExpandable: true required: - value @@ -29488,7 +29488,7 @@ components: type: description: Always `text`. type: string - enum: ["text"] + enum: ['text'] text: type: string description: Text content to be sent to the model @@ -29504,7 +29504,7 @@ components: type: description: Always `file_citation`. type: string - enum: ["file_citation"] + enum: ['file_citation'] text: description: The text in the message content that needs to be replaced. type: string @@ -29536,12 +29536,12 @@ components: MessageContentTextAnnotationsFilePathObject: title: File path type: object - description: A URL for the file that"s generated when the assistant used the `code_interpreter` tool to generate a file. + description: A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file. properties: type: description: Always `file_path`. type: string - enum: ["file_path"] + enum: ['file_path'] text: description: The text in the message content that needs to be replaced. type: string @@ -29577,7 +29577,7 @@ components: type: description: Always `text`. type: string - enum: ["text"] + enum: ['text'] text: type: object properties: @@ -29588,8 +29588,8 @@ components: type: array items: oneOf: - - $ref: "#/components/schemas/MessageDeltaContentTextAnnotationsFileCitationObject" - - $ref: "#/components/schemas/MessageDeltaContentTextAnnotationsFilePathObject" + - $ref: '#/components/schemas/MessageDeltaContentTextAnnotationsFileCitationObject' + - $ref: '#/components/schemas/MessageDeltaContentTextAnnotationsFilePathObject' x-oaiExpandable: true required: - index @@ -29606,7 +29606,7 @@ components: type: description: Always `file_citation`. type: string - enum: ["file_citation"] + enum: ['file_citation'] text: description: The text in the message content that needs to be replaced. type: string @@ -29632,7 +29632,7 @@ components: MessageDeltaContentTextAnnotationsFilePathObject: title: File path type: object - description: A URL for the file that"s generated when the assistant used the `code_interpreter` tool to generate a file. + description: A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file. properties: index: type: integer @@ -29640,7 +29640,7 @@ components: type: description: Always `file_path`. type: string - enum: ["file_path"] + enum: ['file_path'] text: description: The text in the message content that needs to be replaced. type: string @@ -29672,7 +29672,7 @@ components: object: description: The object type, which is always `thread.run.step`. type: string - enum: ["thread.run.step"] + enum: ['thread.run.step'] created_at: description: The Unix timestamp (in seconds) for when the run step was created. type: integer @@ -29688,17 +29688,17 @@ components: type: description: The type of run step, which can be either `message_creation` or `tool_calls`. type: string - enum: ["message_creation", "tool_calls"] + enum: ['message_creation', 'tool_calls'] status: description: The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`. type: string - enum: ["in_progress", "cancelled", "failed", "completed", "expired"] + enum: ['in_progress', 'cancelled', 'failed', 'completed', 'expired'] step_details: type: object description: The details of the run step. oneOf: - - $ref: "#/components/schemas/RunStepDetailsMessageCreationObject" - - $ref: "#/components/schemas/RunStepDetailsToolCallsObject" + - $ref: '#/components/schemas/RunStepDetailsMessageCreationObject' + - $ref: '#/components/schemas/RunStepDetailsToolCallsObject' x-oaiExpandable: true last_error: type: object @@ -29708,7 +29708,7 @@ components: code: type: string description: One of `server_error` or `rate_limit_exceeded`. - enum: ["server_error", "rate_limit_exceeded"] + enum: ['server_error', 'rate_limit_exceeded'] message: type: string description: A human-readable description of the error. @@ -29737,7 +29737,7 @@ components: x-oaiTypeLabel: map nullable: true usage: - $ref: "#/components/schemas/RunStepCompletionUsage" + $ref: '#/components/schemas/RunStepCompletionUsage' required: - id - object @@ -29772,7 +29772,7 @@ components: object: description: The object type, which is always `thread.run.step.delta`. type: string - enum: ["thread.run.step.delta"] + enum: ['thread.run.step.delta'] delta: description: The delta containing the fields that have changed on the run step. type: object @@ -29781,8 +29781,8 @@ components: type: object description: The details of the run step. oneOf: - - $ref: "#/components/schemas/RunStepDeltaStepDetailsMessageCreationObject" - - $ref: "#/components/schemas/RunStepDeltaStepDetailsToolCallsObject" + - $ref: '#/components/schemas/RunStepDeltaStepDetailsMessageCreationObject' + - $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCallsObject' x-oaiExpandable: true required: - id @@ -29814,17 +29814,17 @@ components: properties: object: type: string - example: "list" + example: 'list' data: type: array items: - $ref: "#/components/schemas/RunStepObject" + $ref: '#/components/schemas/RunStepObject' first_id: type: string - example: "step_abc123" + example: 'step_abc123' last_id: type: string - example: "step_abc456" + example: 'step_abc456' has_more: type: boolean example: false @@ -29843,7 +29843,7 @@ components: type: description: Always `message_creation`. type: string - enum: ["message_creation"] + enum: ['message_creation'] message_creation: type: object properties: @@ -29864,7 +29864,7 @@ components: type: description: Always `message_creation`. type: string - enum: ["message_creation"] + enum: ['message_creation'] message_creation: type: object properties: @@ -29882,16 +29882,16 @@ components: type: description: Always `tool_calls`. type: string - enum: ["tool_calls"] + enum: ['tool_calls'] tool_calls: type: array description: | An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`. items: oneOf: - - $ref: "#/components/schemas/RunStepDetailsToolCallsCodeObject" - - $ref: "#/components/schemas/RunStepDetailsToolCallsFileSearchObject" - - $ref: "#/components/schemas/RunStepDetailsToolCallsFunctionObject" + - $ref: '#/components/schemas/RunStepDetailsToolCallsCodeObject' + - $ref: '#/components/schemas/RunStepDetailsToolCallsFileSearchObject' + - $ref: '#/components/schemas/RunStepDetailsToolCallsFunctionObject' x-oaiExpandable: true required: - type @@ -29905,16 +29905,16 @@ components: type: description: Always `tool_calls`. type: string - enum: ["tool_calls"] + enum: ['tool_calls'] tool_calls: type: array description: | An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`. items: oneOf: - - $ref: "#/components/schemas/RunStepDeltaStepDetailsToolCallsCodeObject" - - $ref: "#/components/schemas/RunStepDeltaStepDetailsToolCallsFileSearchObject" - - $ref: "#/components/schemas/RunStepDeltaStepDetailsToolCallsFunctionObject" + - $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCallsCodeObject' + - $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCallsFileSearchObject' + - $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCallsFunctionObject' x-oaiExpandable: true required: - type @@ -29930,7 +29930,7 @@ components: type: type: string description: The type of tool call. This is always going to be `code_interpreter` for this type of tool call. - enum: ["code_interpreter"] + enum: ['code_interpreter'] code_interpreter: type: object description: The Code Interpreter tool call definition. @@ -29947,8 +29947,8 @@ components: items: type: object oneOf: - - $ref: "#/components/schemas/RunStepDetailsToolCallsCodeOutputLogsObject" - - $ref: "#/components/schemas/RunStepDetailsToolCallsCodeOutputImageObject" + - $ref: '#/components/schemas/RunStepDetailsToolCallsCodeOutputLogsObject' + - $ref: '#/components/schemas/RunStepDetailsToolCallsCodeOutputImageObject' x-oaiExpandable: true required: - id @@ -29969,7 +29969,7 @@ components: type: type: string description: The type of tool call. This is always going to be `code_interpreter` for this type of tool call. - enum: ["code_interpreter"] + enum: ['code_interpreter'] code_interpreter: type: object description: The Code Interpreter tool call definition. @@ -29983,8 +29983,8 @@ components: items: type: object oneOf: - - $ref: "#/components/schemas/RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject" - - $ref: "#/components/schemas/RunStepDeltaStepDetailsToolCallsCodeOutputImageObject" + - $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject' + - $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCallsCodeOutputImageObject' x-oaiExpandable: true required: - index @@ -29998,7 +29998,7 @@ components: type: description: Always `logs`. type: string - enum: ["logs"] + enum: ['logs'] logs: type: string description: The text output from the Code Interpreter tool call. @@ -30017,7 +30017,7 @@ components: type: description: Always `logs`. type: string - enum: ["logs"] + enum: ['logs'] logs: type: string description: The text output from the Code Interpreter tool call. @@ -30032,7 +30032,7 @@ components: type: description: Always `image`. type: string - enum: ["image"] + enum: ['image'] image: type: object properties: @@ -30055,7 +30055,7 @@ components: type: description: Always `image`. type: string - enum: ["image"] + enum: ['image'] image: type: object properties: @@ -30076,7 +30076,7 @@ components: type: type: string description: The type of tool call. This is always going to be `file_search` for this type of tool call. - enum: ["file_search"] + enum: ['file_search'] file_search: type: object description: For now, this is always going to be an empty object. @@ -30099,7 +30099,7 @@ components: type: type: string description: The type of tool call. This is always going to be `file_search` for this type of tool call. - enum: ["file_search"] + enum: ['file_search'] file_search: type: object description: For now, this is always going to be an empty object. @@ -30119,7 +30119,7 @@ components: type: type: string description: The type of tool call. This is always going to be `function` for this type of tool call. - enum: ["function"] + enum: ['function'] function: type: object description: The definition of the function that was called. @@ -30156,7 +30156,7 @@ components: type: type: string description: The type of tool call. This is always going to be `function` for this type of tool call. - enum: ["function"] + enum: ['function'] function: type: object description: The definition of the function that was called. @@ -30181,9 +30181,9 @@ components: description: The expiration policy for a vector store. properties: anchor: - description: "Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`." + description: 'Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.' type: string - enum: ["last_active_at"] + enum: ['last_active_at'] days: description: The number of days after the anchor time that the vector store will expire. type: integer @@ -30204,7 +30204,7 @@ components: object: description: The object type, which is always `vector_store`. type: string - enum: ["vector_store"] + enum: ['vector_store'] created_at: description: The Unix timestamp (in seconds) for when the vector store was created. type: integer @@ -30241,9 +30241,9 @@ components: status: description: The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use. type: string - enum: ["expired", "in_progress", "completed"] + enum: ['expired', 'in_progress', 'completed'] expires_after: - $ref: "#/components/schemas/VectorStoreExpirationAfter" + $ref: '#/components/schemas/VectorStoreExpirationAfter' expires_at: description: The Unix timestamp (in seconds) for when the vector store will expire. type: integer @@ -30317,8 +30317,8 @@ components: filters: description: A filter to apply based on file attributes. oneOf: - - $ref: "#/components/schemas/ComparisonFilter" - - $ref: "#/components/schemas/CompoundFilter" + - $ref: '#/components/schemas/ComparisonFilter' + - $ref: '#/components/schemas/CompoundFilter' x-oaiExpandable: true ranking_options: description: Ranking options for search. @@ -30369,12 +30369,12 @@ components: minimum: 0 maximum: 1 attributes: - $ref: "#/components/schemas/VectorStoreFileAttributes" + $ref: '#/components/schemas/VectorStoreFileAttributes' content: type: array description: Content chunks from the file. items: - $ref: "#/components/schemas/VectorStoreSearchResultContentObject" + $ref: '#/components/schemas/VectorStoreSearchResultContentObject' required: - file_id - filename @@ -30401,7 +30401,7 @@ components: type: array description: The list of search result items. items: - $ref: "#/components/schemas/VectorStoreSearchResultItem" + $ref: '#/components/schemas/VectorStoreSearchResultItem' has_more: type: boolean description: Indicates if there are more results to fetch. @@ -30508,7 +30508,7 @@ components: - `web_search_preview_2025_03_11` user_location: allOf: - - $ref: "#/components/schemas/WebSearchLocation" + - $ref: '#/components/schemas/WebSearchLocation' - type: object properties: type: @@ -30522,7 +30522,7 @@ components: - type nullable: true search_context_size: - $ref: "#/components/schemas/WebSearchContextSize" + $ref: '#/components/schemas/WebSearchContextSize' required: - type WebSearchToolCall: @@ -30570,13 +30570,13 @@ components: description: The name of the vector store. type: string expires_after: - $ref: "#/components/schemas/VectorStoreExpirationAfter" + $ref: '#/components/schemas/VectorStoreExpirationAfter' chunking_strategy: type: object description: The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty. oneOf: - - $ref: "#/components/schemas/AutoChunkingStrategyRequestParam" - - $ref: "#/components/schemas/StaticChunkingStrategyRequestParam" + - $ref: '#/components/schemas/AutoChunkingStrategyRequestParam' + - $ref: '#/components/schemas/StaticChunkingStrategyRequestParam' x-oaiExpandable: true metadata: description: *metadata_description @@ -30614,7 +30614,7 @@ components: type: string nullable: true expires_after: - $ref: "#/components/schemas/VectorStoreExpirationAfter" + $ref: '#/components/schemas/VectorStoreExpirationAfter' nullable: true metadata: description: *metadata_description @@ -30660,17 +30660,17 @@ components: properties: object: type: string - example: "list" + example: 'list' data: type: array items: - $ref: "#/components/schemas/VectorStoreObject" + $ref: '#/components/schemas/VectorStoreObject' first_id: type: string - example: "vs_abc123" + example: 'vs_abc123' last_id: type: string - example: "vs_abc456" + example: 'vs_abc456' has_more: type: boolean example: false @@ -30707,7 +30707,7 @@ components: object: description: The object type, which is always `vector_store.file`. type: string - enum: ["vector_store.file"] + enum: ['vector_store.file'] usage_bytes: description: The total vector store usage in bytes. Note that this may be different from the original file size. type: integer @@ -30720,7 +30720,7 @@ components: status: description: The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use. type: string - enum: ["in_progress", "completed", "cancelled", "failed"] + enum: ['in_progress', 'completed', 'cancelled', 'failed'] last_error: type: object description: The last error associated with this vector store file. Will be `null` if there are no errors. @@ -30731,10 +30731,10 @@ components: description: One of `server_error` or `rate_limit_exceeded`. enum: [ - "internal_error", - "file_not_found", - "parsing_error", - "unhandled_mime_type", + 'internal_error', + 'file_not_found', + 'parsing_error', + 'unhandled_mime_type', ] message: type: string @@ -30746,8 +30746,8 @@ components: type: object description: The strategy used to chunk the file. oneOf: - - $ref: "#/components/schemas/StaticChunkingStrategyResponseParam" - - $ref: "#/components/schemas/OtherChunkingStrategyResponseParam" + - $ref: '#/components/schemas/StaticChunkingStrategyResponseParam' + - $ref: '#/components/schemas/OtherChunkingStrategyResponseParam' x-oaiExpandable: true required: - id @@ -30787,7 +30787,7 @@ components: type: type: string description: Always `other`. - enum: ["other"] + enum: ['other'] required: - type @@ -30799,9 +30799,9 @@ components: type: type: string description: Always `static`. - enum: ["static"] + enum: ['static'] static: - $ref: "#/components/schemas/StaticChunkingStrategy" + $ref: '#/components/schemas/StaticChunkingStrategy' required: - type - static @@ -30834,7 +30834,7 @@ components: type: type: string description: Always `auto`. - enum: ["auto"] + enum: ['auto'] required: - type @@ -30846,9 +30846,9 @@ components: type: type: string description: Always `static`. - enum: ["static"] + enum: ['static'] static: - $ref: "#/components/schemas/StaticChunkingStrategy" + $ref: '#/components/schemas/StaticChunkingStrategy' required: - type - static @@ -30857,8 +30857,8 @@ components: type: object description: The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. oneOf: - - $ref: "#/components/schemas/AutoChunkingStrategyRequestParam" - - $ref: "#/components/schemas/StaticChunkingStrategyRequestParam" + - $ref: '#/components/schemas/AutoChunkingStrategyRequestParam' + - $ref: '#/components/schemas/StaticChunkingStrategyRequestParam' x-oaiExpandable: true CreateVectorStoreFileRequest: @@ -30869,7 +30869,7 @@ components: description: A [File](https://platform.openai.com/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files. type: string chunking_strategy: - $ref: "#/components/schemas/ChunkingStrategyRequestParam" + $ref: '#/components/schemas/ChunkingStrategyRequestParam' required: - file_id @@ -30877,17 +30877,17 @@ components: properties: object: type: string - example: "list" + example: 'list' data: type: array items: - $ref: "#/components/schemas/VectorStoreFileObject" + $ref: '#/components/schemas/VectorStoreFileObject' first_id: type: string - example: "file-abc123" + example: 'file-abc123' last_id: type: string - example: "file-abc456" + example: 'file-abc456' has_more: type: boolean example: false @@ -30948,7 +30948,7 @@ components: object: description: The object type, which is always `vector_store.file_batch`. type: string - enum: ["vector_store.files_batch"] + enum: ['vector_store.files_batch'] created_at: description: The Unix timestamp (in seconds) for when the vector store files batch was created. type: integer @@ -30958,7 +30958,7 @@ components: status: description: The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`. type: string - enum: ["in_progress", "completed", "cancelled", "failed"] + enum: ['in_progress', 'completed', 'cancelled', 'failed'] file_counts: type: object properties: @@ -31021,7 +31021,7 @@ components: items: type: string chunking_strategy: - $ref: "#/components/schemas/ChunkingStrategyRequestParam" + $ref: '#/components/schemas/ChunkingStrategyRequestParam' required: - file_ids @@ -31047,12 +31047,12 @@ components: in your code. See the [Assistants API quickstart](https://platform.openai.com/docs/assistants/overview) to learn how to integrate the Assistants API with streaming. oneOf: - - $ref: "#/components/schemas/ThreadStreamEvent" - - $ref: "#/components/schemas/RunStreamEvent" - - $ref: "#/components/schemas/RunStepStreamEvent" - - $ref: "#/components/schemas/MessageStreamEvent" - - $ref: "#/components/schemas/ErrorEvent" - - $ref: "#/components/schemas/DoneEvent" + - $ref: '#/components/schemas/ThreadStreamEvent' + - $ref: '#/components/schemas/RunStreamEvent' + - $ref: '#/components/schemas/RunStepStreamEvent' + - $ref: '#/components/schemas/MessageStreamEvent' + - $ref: '#/components/schemas/ErrorEvent' + - $ref: '#/components/schemas/DoneEvent' x-code-samples: name: Assistant stream events beta: true @@ -31063,21 +31063,21 @@ components: properties: event: type: string - enum: ["thread.created"] + enum: ['thread.created'] data: - $ref: "#/components/schemas/ThreadObject" + $ref: '#/components/schemas/ThreadObject' required: - event - data description: Occurs when a new [thread](https://platform.openai.com/docs/api-reference/threads/object) is created. x-code-samples: - dataDescription: "`data` is a [thread](https://platform.openai.com/docs/api-reference/threads/object)" + dataDescription: '`data` is a [thread](https://platform.openai.com/docs/api-reference/threads/object)' Tool: oneOf: - - $ref: "#/components/schemas/FileSearchTool" - - $ref: "#/components/schemas/FunctionTool" - - $ref: "#/components/schemas/ComputerTool" - - $ref: "#/components/schemas/WebSearchTool" + - $ref: '#/components/schemas/FileSearchTool' + - $ref: '#/components/schemas/FunctionTool' + - $ref: '#/components/schemas/ComputerTool' + - $ref: '#/components/schemas/WebSearchTool' x-oaiExpandable: true ToolChoiceFunction: type: object @@ -31151,132 +31151,132 @@ components: properties: event: type: string - enum: ["thread.run.created"] + enum: ['thread.run.created'] data: - $ref: "#/components/schemas/RunObject" + $ref: '#/components/schemas/RunObject' required: - event - data description: Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is created. x-code-samples: - dataDescription: "`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)" + dataDescription: '`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)' - type: object properties: event: type: string - enum: ["thread.run.queued"] + enum: ['thread.run.queued'] data: - $ref: "#/components/schemas/RunObject" + $ref: '#/components/schemas/RunObject' required: - event - data description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `queued` status. x-code-samples: - dataDescription: "`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)" + dataDescription: '`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)' - type: object properties: event: type: string - enum: ["thread.run.in_progress"] + enum: ['thread.run.in_progress'] data: - $ref: "#/components/schemas/RunObject" + $ref: '#/components/schemas/RunObject' required: - event - data description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to an `in_progress` status. x-code-samples: - dataDescription: "`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)" + dataDescription: '`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)' - type: object properties: event: type: string - enum: ["thread.run.requires_action"] + enum: ['thread.run.requires_action'] data: - $ref: "#/components/schemas/RunObject" + $ref: '#/components/schemas/RunObject' required: - event - data description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `requires_action` status. x-code-samples: - dataDescription: "`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)" + dataDescription: '`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)' - type: object properties: event: type: string - enum: ["thread.run.completed"] + enum: ['thread.run.completed'] data: - $ref: "#/components/schemas/RunObject" + $ref: '#/components/schemas/RunObject' required: - event - data description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is completed. x-code-samples: - dataDescription: "`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)" + dataDescription: '`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)' - type: object properties: event: type: string - enum: ["thread.run.incomplete"] + enum: ['thread.run.incomplete'] data: - $ref: "#/components/schemas/RunObject" + $ref: '#/components/schemas/RunObject' required: - event - data description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with status `incomplete`. x-code-samples: - dataDescription: "`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)" + dataDescription: '`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)' - type: object properties: event: type: string - enum: ["thread.run.failed"] + enum: ['thread.run.failed'] data: - $ref: "#/components/schemas/RunObject" + $ref: '#/components/schemas/RunObject' required: - event - data description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) fails. x-code-samples: - dataDescription: "`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)" + dataDescription: '`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)' - type: object properties: event: type: string - enum: ["thread.run.cancelling"] + enum: ['thread.run.cancelling'] data: - $ref: "#/components/schemas/RunObject" + $ref: '#/components/schemas/RunObject' required: - event - data description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `cancelling` status. x-code-samples: - dataDescription: "`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)" + dataDescription: '`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)' - type: object properties: event: type: string - enum: ["thread.run.cancelled"] + enum: ['thread.run.cancelled'] data: - $ref: "#/components/schemas/RunObject" + $ref: '#/components/schemas/RunObject' required: - event - data description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is cancelled. x-code-samples: - dataDescription: "`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)" + dataDescription: '`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)' - type: object properties: event: type: string - enum: ["thread.run.expired"] + enum: ['thread.run.expired'] data: - $ref: "#/components/schemas/RunObject" + $ref: '#/components/schemas/RunObject' required: - event - data description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) expires. x-code-samples: - dataDescription: "`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)" + dataDescription: '`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)' RunStepStreamEvent: oneOf: @@ -31284,93 +31284,93 @@ components: properties: event: type: string - enum: ["thread.run.step.created"] + enum: ['thread.run.step.created'] data: - $ref: "#/components/schemas/RunStepObject" + $ref: '#/components/schemas/RunStepObject' required: - event - data description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/runs/step-object) is created. x-code-samples: - dataDescription: "`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)" + dataDescription: '`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)' - type: object properties: event: type: string - enum: ["thread.run.step.in_progress"] + enum: ['thread.run.step.in_progress'] data: - $ref: "#/components/schemas/RunStepObject" + $ref: '#/components/schemas/RunStepObject' required: - event - data description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/runs/step-object) moves to an `in_progress` state. x-code-samples: - dataDescription: "`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)" + dataDescription: '`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)' - type: object properties: event: type: string - enum: ["thread.run.step.delta"] + enum: ['thread.run.step.delta'] data: - $ref: "#/components/schemas/RunStepDeltaObject" + $ref: '#/components/schemas/RunStepDeltaObject' required: - event - data description: Occurs when parts of a [run step](https://platform.openai.com/docs/api-reference/runs/step-object) are being streamed. x-code-samples: - dataDescription: "`data` is a [run step delta](https://platform.openai.com/docs/api-reference/assistants-streaming/run-step-delta-object)" + dataDescription: '`data` is a [run step delta](https://platform.openai.com/docs/api-reference/assistants-streaming/run-step-delta-object)' - type: object properties: event: type: string - enum: ["thread.run.step.completed"] + enum: ['thread.run.step.completed'] data: - $ref: "#/components/schemas/RunStepObject" + $ref: '#/components/schemas/RunStepObject' required: - event - data description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/runs/step-object) is completed. x-code-samples: - dataDescription: "`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)" + dataDescription: '`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)' - type: object properties: event: type: string - enum: ["thread.run.step.failed"] + enum: ['thread.run.step.failed'] data: - $ref: "#/components/schemas/RunStepObject" + $ref: '#/components/schemas/RunStepObject' required: - event - data description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/runs/step-object) fails. x-code-samples: - dataDescription: "`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)" + dataDescription: '`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)' - type: object properties: event: type: string - enum: ["thread.run.step.cancelled"] + enum: ['thread.run.step.cancelled'] data: - $ref: "#/components/schemas/RunStepObject" + $ref: '#/components/schemas/RunStepObject' required: - event - data description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/runs/step-object) is cancelled. x-code-samples: - dataDescription: "`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)" + dataDescription: '`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)' - type: object properties: event: type: string - enum: ["thread.run.step.expired"] + enum: ['thread.run.step.expired'] data: - $ref: "#/components/schemas/RunStepObject" + $ref: '#/components/schemas/RunStepObject' required: - event - data description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/runs/step-object) expires. x-code-samples: - dataDescription: "`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)" + dataDescription: '`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)' MessageStreamEvent: oneOf: @@ -31378,82 +31378,82 @@ components: properties: event: type: string - enum: ["thread.message.created"] + enum: ['thread.message.created'] data: - $ref: "#/components/schemas/MessageObject" + $ref: '#/components/schemas/MessageObject' required: - event - data description: Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is created. x-code-samples: - dataDescription: "`data` is a [message](https://platform.openai.com/docs/api-reference/messages/object)" + dataDescription: '`data` is a [message](https://platform.openai.com/docs/api-reference/messages/object)' - type: object properties: event: type: string - enum: ["thread.message.in_progress"] + enum: ['thread.message.in_progress'] data: - $ref: "#/components/schemas/MessageObject" + $ref: '#/components/schemas/MessageObject' required: - event - data description: Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) moves to an `in_progress` state. x-code-samples: - dataDescription: "`data` is a [message](https://platform.openai.com/docs/api-reference/messages/object)" + dataDescription: '`data` is a [message](https://platform.openai.com/docs/api-reference/messages/object)' - type: object properties: event: type: string - enum: ["thread.message.delta"] + enum: ['thread.message.delta'] data: - $ref: "#/components/schemas/MessageDeltaObject" + $ref: '#/components/schemas/MessageDeltaObject' required: - event - data description: Occurs when parts of a [Message](https://platform.openai.com/docs/api-reference/messages/object) are being streamed. x-code-samples: - dataDescription: "`data` is a [message delta](https://platform.openai.com/docs/api-reference/assistants-streaming/message-delta-object)" + dataDescription: '`data` is a [message delta](https://platform.openai.com/docs/api-reference/assistants-streaming/message-delta-object)' - type: object properties: event: type: string - enum: ["thread.message.completed"] + enum: ['thread.message.completed'] data: - $ref: "#/components/schemas/MessageObject" + $ref: '#/components/schemas/MessageObject' required: - event - data description: Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is completed. x-code-samples: - dataDescription: "`data` is a [message](https://platform.openai.com/docs/api-reference/messages/object)" + dataDescription: '`data` is a [message](https://platform.openai.com/docs/api-reference/messages/object)' - type: object properties: event: type: string - enum: ["thread.message.incomplete"] + enum: ['thread.message.incomplete'] data: - $ref: "#/components/schemas/MessageObject" + $ref: '#/components/schemas/MessageObject' required: - event - data description: Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) ends before it is completed. x-code-samples: - dataDescription: "`data` is a [message](https://platform.openai.com/docs/api-reference/messages/object)" + dataDescription: '`data` is a [message](https://platform.openai.com/docs/api-reference/messages/object)' ErrorEvent: type: object properties: event: type: string - enum: ["error"] + enum: ['error'] data: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' required: - event - data description: Occurs when an [error](https://platform.openai.com/docs/guides/error-codes/api-errors) occurs. This can happen due to an internal server error or a timeout. x-code-samples: - dataDescription: "`data` is an [error](https://platform.openai.com/docs/guides/error-codes/api-errors)" + dataDescription: '`data` is an [error](https://platform.openai.com/docs/guides/error-codes/api-errors)' FileCitation: type: object title: File citation @@ -31509,16 +31509,16 @@ components: properties: event: type: string - enum: ["done"] + enum: ['done'] data: type: string - enum: ["[DONE]"] + enum: ['[DONE]'] required: - event - data description: Occurs when a stream ends. x-code-samples: - dataDescription: "`data` is `[DONE]`" + dataDescription: '`data` is `[DONE]`' Batch: type: object @@ -31649,7 +31649,7 @@ components: description: A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch. method: type: string - enum: ["POST"] + enum: ['POST'] description: The HTTP method to be used for the request. Currently only `POST` is supported. url: type: string @@ -31704,13 +31704,13 @@ components: data: type: array items: - $ref: "#/components/schemas/Batch" + $ref: '#/components/schemas/Batch' first_id: type: string - example: "batch_abc123" + example: 'batch_abc123' last_id: type: string - example: "batch_abc456" + example: 'batch_abc456' has_more: type: boolean object: @@ -31789,45 +31789,45 @@ components: properties: type: type: string - enum: ["requests", "tokens"] + enum: ['requests', 'tokens'] unit: type: string - enum: ["rpd", "rph", "rpm"] + enum: ['rpd', 'rph', 'rpm'] value: type: integer UsageLimits: type: object required: - credit_limit - description: "Usage limit configuration. credit_limit is required when this object is present. periodic_reset and periodic_reset_days are mutually exclusive." + description: Usage limit configuration. credit_limit is required when this object is present. periodic_reset and periodic_reset_days are mutually exclusive. properties: type: type: string - description: "Whether the credit_limit is measured in tokens or cost (USD)." - enum: ["cost", "tokens"] - example: "cost" + description: Whether the credit_limit is measured in tokens or cost (USD). + enum: ['cost', 'tokens'] + example: 'cost' credit_limit: type: number format: float - description: "Maximum allowed usage. Interpreted as USD when type is "cost", or token count when type is "tokens"." + description: 'Maximum allowed usage. Interpreted as USD when type is "cost", or token count when type is "tokens".' minimum: 0 example: 10 alert_threshold: type: number format: float - description: "Send alert emails when usage reaches this value. Must be less than or equal to credit_limit." + description: Send alert emails when usage reaches this value. Must be less than or equal to credit_limit. minimum: 0 nullable: true example: 8 periodic_reset: type: string - description: "Reset the usage counter on a fixed calendar schedule. Mutually exclusive with periodic_reset_days." - enum: ["monthly", "weekly"] + description: Reset the usage counter on a fixed calendar schedule. Mutually exclusive with periodic_reset_days. + enum: ['monthly', 'weekly'] nullable: true - example: "monthly" + example: 'monthly' periodic_reset_days: type: integer - description: "Reset the usage counter every N days (1–365). Mutually exclusive with periodic_reset." + description: Reset the usage counter every N days (1-365). Mutually exclusive with periodic_reset. minimum: 1 maximum: 365 nullable: true @@ -31835,9 +31835,9 @@ components: next_usage_reset_at: type: string format: date-time - description: "ISO 8601 datetime for the next scheduled usage reset. Auto-computed from periodic_reset or periodic_reset_days if not provided." + description: ISO 8601 datetime for the next scheduled usage reset. Auto-computed from periodic_reset or periodic_reset_days if not provided. nullable: true - example: "2026-05-01T00:00:00Z" + example: '2026-05-01T00:00:00Z' example: type: cost credit_limit: 10 @@ -31853,24 +31853,24 @@ components: name: type: string description: Human-readable name for the integration - example: "Production OpenAI" + example: 'Production OpenAI' slug: type: string - pattern: "^[a-zA-Z0-9_-]+$" + pattern: '^[a-zA-Z0-9_-]+$' description: URL-friendly identifier (auto-generated if not provided) - example: "production-openai" + example: 'production-openai' ai_provider_id: type: string description: ID of the base AI provider - example: "openai" + example: 'openai' key: type: string description: API key for the provider (if required) - example: "sk-..." + example: 'sk-...' description: type: string description: Optional description of the integration - example: "Production OpenAI integration for customer-facing applications" + example: 'Production OpenAI integration for customer-facing applications' workspace_id: type: string description: Workspace ID (for workspace-scoped integrations) @@ -31879,25 +31879,25 @@ components: type: object description: Provider-specific configuration object oneOf: - - $ref: "#/components/schemas/OpenAIConfiguration" + - $ref: '#/components/schemas/OpenAIConfiguration' title: OpenAI - - $ref: "#/components/schemas/AzureOpenAIConfiguration" + - $ref: '#/components/schemas/AzureOpenAIConfiguration' title: Azure OpenAI - - $ref: "#/components/schemas/BedrockConfiguration" + - $ref: '#/components/schemas/BedrockConfiguration' title: AWS Bedrock - - $ref: "#/components/schemas/VertexAIConfiguration" + - $ref: '#/components/schemas/VertexAIConfiguration' title: Vertex AI - - $ref: "#/components/schemas/AzureAIConfiguration" + - $ref: '#/components/schemas/AzureAIConfiguration' title: Azure AI - - $ref: "#/components/schemas/WorkersAIConfiguration" + - $ref: '#/components/schemas/WorkersAIConfiguration' title: Workers AI - - $ref: "#/components/schemas/SageMakerConfiguration" + - $ref: '#/components/schemas/SageMakerConfiguration' title: AWS Sagemaker - - $ref: "#/components/schemas/HuggingFaceConfiguration" + - $ref: '#/components/schemas/HuggingFaceConfiguration' title: Hugginface - - $ref: "#/components/schemas/CortexConfiguration" + - $ref: '#/components/schemas/CortexConfiguration' title: Cortex - - $ref: "#/components/schemas/CustomHostConfiguration" + - $ref: '#/components/schemas/CustomHostConfiguration' title: Custom Base URL create_default_provider: type: boolean @@ -31905,13 +31905,13 @@ components: description: Whether to automatically create a default provider when creating a workspace-scoped integration. Defaults to true. default_provider_slug: type: string - pattern: "^[a-zA-Z0-9_-]+$" + pattern: '^[a-zA-Z0-9_-]+$' maxLength: 255 description: Custom slug for the auto-created default provider. Only applicable for workspace-scoped integrations. If the slug already exists in the workspace, the request will fail with a validation error. secret_mappings: type: array items: - $ref: "#/components/schemas/SecretMapping" + $ref: '#/components/schemas/SecretMapping' description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "configurations." (e.g. "configurations.aws_secret_access_key", "configurations.azure_entra_client_secret"). Each target_field must be unique. When "key" is mapped, the key body field can be omitted. UpdateIntegrationRequest: @@ -31920,48 +31920,48 @@ components: name: type: string description: Human-readable name for the integration - example: "Production OpenAI" + example: 'Production OpenAI' key: type: string description: API key for the provider (if required) - example: "sk-..." + example: 'sk-...' description: type: string description: Optional description of the integration - example: "Production OpenAI integration for customer-facing applications" + example: 'Production OpenAI integration for customer-facing applications' configurations: type: object description: Provider-specific configuration object oneOf: - - $ref: "#/components/schemas/OpenAIConfiguration" + - $ref: '#/components/schemas/OpenAIConfiguration' title: OpenAI - - $ref: "#/components/schemas/AzureOpenAIConfiguration" + - $ref: '#/components/schemas/AzureOpenAIConfiguration' title: Azure OpenAI - - $ref: "#/components/schemas/BedrockConfiguration" + - $ref: '#/components/schemas/BedrockConfiguration' title: AWS Bedrock - - $ref: "#/components/schemas/VertexAIConfiguration" + - $ref: '#/components/schemas/VertexAIConfiguration' title: Vertex AI - - $ref: "#/components/schemas/AzureAIConfiguration" + - $ref: '#/components/schemas/AzureAIConfiguration' title: Azure AI - - $ref: "#/components/schemas/WorkersAIConfiguration" + - $ref: '#/components/schemas/WorkersAIConfiguration' title: Workers AI - - $ref: "#/components/schemas/SageMakerConfiguration" + - $ref: '#/components/schemas/SageMakerConfiguration' title: AWS Sagemaker - - $ref: "#/components/schemas/HuggingFaceConfiguration" + - $ref: '#/components/schemas/HuggingFaceConfiguration' title: Hugginface - - $ref: "#/components/schemas/CortexConfiguration" + - $ref: '#/components/schemas/CortexConfiguration' title: Cortex - - $ref: "#/components/schemas/CustomHostConfiguration" + - $ref: '#/components/schemas/CustomHostConfiguration' title: Custom Base URL secret_mappings: type: array items: - $ref: "#/components/schemas/SecretMapping" + $ref: '#/components/schemas/SecretMapping' description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "configurations." (e.g. "configurations.aws_secret_access_key", "configurations.azure_entra_client_secret"). Each target_field must be unique. IntegrationDetailResponse: allOf: - - $ref: "#/components/schemas/IntegrationList" + - $ref: '#/components/schemas/IntegrationList' - type: object properties: masked_key: @@ -31977,30 +31977,30 @@ components: - Sensitive fields get a `masked_` prefix (e.g., `client_secret` → `masked_client_secret`) - Non-sensitive fields (IDs, URLs, regions, etc.) remain unchanged oneOf: - - $ref: "#/components/schemas/OpenAIConfiguration" + - $ref: '#/components/schemas/OpenAIConfiguration' title: OpenAI - - $ref: "#/components/schemas/AzureOpenAIConfiguration" + - $ref: '#/components/schemas/AzureOpenAIConfiguration' title: Azure OpenAI - - $ref: "#/components/schemas/BedrockConfiguration" + - $ref: '#/components/schemas/BedrockConfiguration' title: AWS Bedrock - - $ref: "#/components/schemas/VertexAIConfiguration" + - $ref: '#/components/schemas/VertexAIConfiguration' title: Vertex AI - - $ref: "#/components/schemas/AzureAIConfiguration" + - $ref: '#/components/schemas/AzureAIConfiguration' title: Azure AI - - $ref: "#/components/schemas/WorkersAIConfiguration" + - $ref: '#/components/schemas/WorkersAIConfiguration' title: Workers AI - - $ref: "#/components/schemas/SageMakerConfiguration" + - $ref: '#/components/schemas/SageMakerConfiguration' title: AWS Sagemaker - - $ref: "#/components/schemas/HuggingFaceConfiguration" + - $ref: '#/components/schemas/HuggingFaceConfiguration' title: Hugginface - - $ref: "#/components/schemas/CortexConfiguration" + - $ref: '#/components/schemas/CortexConfiguration' title: Cortex - - $ref: "#/components/schemas/CustomHostConfiguration" + - $ref: '#/components/schemas/CustomHostConfiguration' title: Custom Base URL global_workspace_access_settings: type: object nullable: true - $ref: "#/components/schemas/GlobalWorkspaceAccess" + $ref: '#/components/schemas/GlobalWorkspaceAccess' description: Global workspace access configuration allow_all_models: type: boolean @@ -32011,7 +32011,7 @@ components: secret_mappings: type: array items: - $ref: "#/components/schemas/SecretMapping" + $ref: '#/components/schemas/SecretMapping' description: Secret reference mappings for this integration. Valid target_field values are "key" or "configurations.". GlobalWorkspaceAccess: @@ -32027,13 +32027,13 @@ components: nullable: true maxItems: 1 items: - $ref: "#/components/schemas/UsageLimits" + $ref: '#/components/schemas/UsageLimits' rate_limits: type: array nullable: true maxItems: 1 items: - $ref: "#/components/schemas/RateLimits" + $ref: '#/components/schemas/RateLimits' OpenAIConfiguration: type: object @@ -32063,7 +32063,7 @@ components: type: array minItems: 1 items: - $ref: "#/components/schemas/AzureDeploymentConfig" + $ref: '#/components/schemas/AzureDeploymentConfig' # Entra-specific fields azure_entra_tenant_id: type: string @@ -32135,7 +32135,7 @@ components: SageMakerConfiguration: allOf: - - $ref: "#/components/schemas/BedrockConfiguration" + - $ref: '#/components/schemas/BedrockConfiguration' - type: object properties: amzn_sagemaker_custom_attributes: @@ -32272,11 +32272,11 @@ components: The field on the entity to populate from the secret reference. Must be unique within the array. - **Integrations**: `key` or `configurations.` (e.g. `configurations.aws_secret_access_key`) - **Virtual Keys**: `key` or `model_config.` (e.g. `model_config.awsSecretAccessKey`) - example: "key" + example: 'key' secret_reference_id: type: string description: UUID or slug of the secret reference. Must belong to the same organisation and be accessible by the workspace. - example: "my-aws-secret" + example: 'my-aws-secret' secret_key: type: string nullable: true @@ -32300,7 +32300,7 @@ components: maxLength: 255 slug: type: string - pattern: "^[a-zA-Z0-9_-]+$" + pattern: '^[a-zA-Z0-9_-]+$' maxLength: 255 description: Auto-generated from name if omitted description: @@ -32312,15 +32312,15 @@ components: enum: [aws_sm, azure_kv, hashicorp_vault] auth_config: oneOf: - - $ref: "#/components/schemas/AwsAccessKeyAuthConfig" - - $ref: "#/components/schemas/AwsAssumedRoleAuthConfig" - - $ref: "#/components/schemas/AwsServiceRoleAuthConfig" - - $ref: "#/components/schemas/AzureEntraAuthConfig" - - $ref: "#/components/schemas/AzureManagedAuthConfig" - - $ref: "#/components/schemas/AzureDefaultAuthConfig" - - $ref: "#/components/schemas/HashicorpTokenAuthConfig" - - $ref: "#/components/schemas/HashicorpAppRoleAuthConfig" - - $ref: "#/components/schemas/HashicorpKubernetesAuthConfig" + - $ref: '#/components/schemas/AwsAccessKeyAuthConfig' + - $ref: '#/components/schemas/AwsAssumedRoleAuthConfig' + - $ref: '#/components/schemas/AwsServiceRoleAuthConfig' + - $ref: '#/components/schemas/AzureEntraAuthConfig' + - $ref: '#/components/schemas/AzureManagedAuthConfig' + - $ref: '#/components/schemas/AzureDefaultAuthConfig' + - $ref: '#/components/schemas/HashicorpTokenAuthConfig' + - $ref: '#/components/schemas/HashicorpAppRoleAuthConfig' + - $ref: '#/components/schemas/HashicorpKubernetesAuthConfig' discriminator: propertyName: aws_auth_type secret_path: @@ -32651,7 +32651,7 @@ components: models: type: array items: - $ref: "#/components/schemas/IntegrationModel" + $ref: '#/components/schemas/IntegrationModel' IntegrationModel: type: object @@ -32678,7 +32678,7 @@ components: nullable: true description: Base model slug for fine-tuned models pricing_config: - $ref: "#/components/schemas/PricingConfig" + $ref: '#/components/schemas/PricingConfig' PricingConfig: type: object @@ -32688,15 +32688,15 @@ components: enum: [static] description: Pricing type pay_as_you_go: - $ref: "#/components/schemas/PayAsYouGoPricing" + $ref: '#/components/schemas/PayAsYouGoPricing' PayAsYouGoPricing: type: object properties: request_token: - $ref: "#/components/schemas/TokenPricing" + $ref: '#/components/schemas/TokenPricing' response_token: - $ref: "#/components/schemas/TokenPricing" + $ref: '#/components/schemas/TokenPricing' ModelConfigurations: type: object properties: @@ -32720,7 +32720,7 @@ components: models: type: array items: - $ref: "#/components/schemas/ModelUpdateRequest" + $ref: '#/components/schemas/ModelUpdateRequest' allow_all_models: type: boolean description: Whether to allow all models by default @@ -32750,9 +32750,9 @@ components: nullable: true description: Base model slug for fine-tuned models configurations: - $ref: "#/components/schemas/ModelConfigurations" + $ref: '#/components/schemas/ModelConfigurations' pricing_config: - $ref: "#/components/schemas/PricingConfig" + $ref: '#/components/schemas/PricingConfig' IntegrationWorkspacesResponse: type: object @@ -32763,7 +32763,7 @@ components: workspaces: type: array items: - $ref: "#/components/schemas/IntegrationWorkspace" + $ref: '#/components/schemas/IntegrationWorkspace' IntegrationWorkspace: type: object @@ -32771,7 +32771,7 @@ components: id: type: string description: Workspace ID - example: "ws-my-team-1234" + example: 'ws-my-team-1234' enabled: type: boolean description: Whether the workspace has access @@ -32779,12 +32779,12 @@ components: type: array nullable: true items: - $ref: "#/components/schemas/UsageLimits" + $ref: '#/components/schemas/UsageLimits' rate_limits: type: array nullable: true items: - $ref: "#/components/schemas/RateLimits" + $ref: '#/components/schemas/RateLimits' BulkUpdateWorkspacesRequest: type: object @@ -32792,9 +32792,9 @@ components: workspaces: type: array items: - $ref: "#/components/schemas/WorkspaceUpdateRequest" + $ref: '#/components/schemas/WorkspaceUpdateRequest' global_workspace_access: - $ref: "#/components/schemas/GlobalWorkspaceAccess" + $ref: '#/components/schemas/GlobalWorkspaceAccess' override_existing_workspace_access: type: boolean description: Whether to override existing workspace access settings @@ -32824,13 +32824,13 @@ components: nullable: true maxItems: 1 items: - $ref: "#/components/schemas/UsageLimits" + $ref: '#/components/schemas/UsageLimits' rate_limits: type: array nullable: true maxItems: 1 items: - $ref: "#/components/schemas/RateLimits" + $ref: '#/components/schemas/RateLimits' reset_usage: type: boolean description: Whether to reset current usage. If the current status is exhausted, this will change it back to active. @@ -32846,18 +32846,18 @@ components: properties: name: type: string - example: "Open AI Workspace" + example: 'Open AI Workspace' integration_id: type: string note: type: string nullable: true - example: "randomness" + example: 'randomness' status: type: string enum: [active, exhausted, expired] usage_limits: - $ref: "#/components/schemas/UsageLimits" + $ref: '#/components/schemas/UsageLimits' reset_usage: type: number nullable: true @@ -32870,7 +32870,7 @@ components: rate_limits: type: array items: - $ref: "#/components/schemas/RateLimits" + $ref: '#/components/schemas/RateLimits' nullable: true expires_at: type: string @@ -32884,16 +32884,16 @@ components: properties: name: type: string - example: "Open AI Workspace" + example: 'Open AI Workspace' note: type: string nullable: true - example: "randomness" + example: 'randomness' status: type: string enum: [active, exhausted] usage_limits: - $ref: "#/components/schemas/UsageLimits" + $ref: '#/components/schemas/UsageLimits' reset_usage: type: number nullable: true @@ -32908,7 +32908,7 @@ components: rate_limits: type: array items: - $ref: "#/components/schemas/RateLimits" + $ref: '#/components/schemas/RateLimits' nullable: true expires_at: type: string @@ -32916,7 +32916,7 @@ components: secret_mappings: type: array items: - $ref: "#/components/schemas/SecretMapping" + $ref: '#/components/schemas/SecretMapping' description: Secret reference mappings for this virtual key. Valid target_field values are "key" or "model_config.". object: type: string @@ -32970,7 +32970,7 @@ components: data: type: array items: - $ref: "#/components/schemas/Invite" + $ref: '#/components/schemas/Invite' User: type: object @@ -33019,7 +33019,7 @@ components: data: type: array items: - $ref: "#/components/schemas/User" + $ref: '#/components/schemas/User' WorkspaceMember: type: object @@ -33056,11 +33056,11 @@ components: created_at: type: string format: date-time - example: "2026-03-09T07:55:25.000Z" + example: '2026-03-09T07:55:25.000Z' last_updated_at: type: string format: date-time - example: "2026-03-09T07:55:25.000Z" + example: '2026-03-09T07:55:25.000Z' status: type: string example: active @@ -33115,7 +33115,7 @@ components: data: type: array items: - $ref: "#/components/schemas/WorkspaceMember" + $ref: '#/components/schemas/WorkspaceMember' Workspace: type: object @@ -33161,11 +33161,11 @@ components: usage_limits: type: array items: - $ref: "#/components/schemas/UsageLimits" + $ref: '#/components/schemas/UsageLimits' rate_limits: type: array items: - $ref: "#/components/schemas/RateLimits" + $ref: '#/components/schemas/RateLimits' WorkspaceList: type: object @@ -33180,7 +33180,7 @@ components: data: type: array items: - $ref: "#/components/schemas/Workspace" + $ref: '#/components/schemas/Workspace' WorkspaceWithUsers: type: object @@ -33235,15 +33235,15 @@ components: type: array items: type: object - $ref: "#/components/schemas/WorkspaceMember" + $ref: '#/components/schemas/WorkspaceMember' usage_limits: type: array items: - $ref: "#/components/schemas/UsageLimits" + $ref: '#/components/schemas/UsageLimits' rate_limits: type: array items: - $ref: "#/components/schemas/RateLimits" + $ref: '#/components/schemas/RateLimits' Collection: type: object @@ -33292,11 +33292,11 @@ components: CollectionWithDetails: allOf: - - $ref: "#/components/schemas/Collection" + - $ref: '#/components/schemas/Collection' - type: object properties: collection_details: - $ref: "#/components/schemas/CollectionDetails" + $ref: '#/components/schemas/CollectionDetails' ChildCollection: type: object @@ -33310,17 +33310,17 @@ components: type: string format: date-time collection_details: - $ref: "#/components/schemas/CollectionDetails" + $ref: '#/components/schemas/CollectionDetails' CollectionWithChildCollections: allOf: - - $ref: "#/components/schemas/Collection" + - $ref: '#/components/schemas/Collection' - type: object properties: child_collections: type: array items: - $ref: "#/components/schemas/ChildCollection" + $ref: '#/components/schemas/ChildCollection' Label: type: object @@ -33415,7 +33415,7 @@ components: data: type: array items: - $ref: "#/components/schemas/Label" + $ref: '#/components/schemas/Label' PromptSummary: type: object @@ -33443,7 +33443,7 @@ components: format: date-time object: type: string - enum: ["prompt"] + enum: ['prompt'] Prompt: type: object @@ -33469,7 +33469,7 @@ components: format: uuid prompt_version_status: type: string - enum: ["active", "archived"] + enum: ['active', 'archived'] prompt_version_description: type: string prompt_version_label_id: @@ -33525,10 +33525,10 @@ components: format: date-time status: type: string - enum: ["active", "archived"] + enum: ['active', 'archived'] object: type: string - enum: ["prompt"] + enum: ['prompt'] PromptPartialSummary: type: object @@ -33551,10 +33551,10 @@ components: format: date-time status: type: string - enum: ["active", "archived"] + enum: ['active', 'archived'] object: type: string - enum: ["partial"] + enum: ['partial'] PromptPartial: type: object @@ -33586,7 +33586,7 @@ components: format: date-time status: type: string - enum: ["active"] + enum: ['active'] PromptPartialVersion: type: object @@ -33610,10 +33610,10 @@ components: format: date-time prompt_version_status: type: string - enum: ["active", "archived"] + enum: ['active', 'archived'] object: type: string - enum: ["partial"] + enum: ['partial'] CustomLog: type: object @@ -33675,7 +33675,7 @@ components: data: type: array items: - $ref: "#/components/schemas/ExportItem" + $ref: '#/components/schemas/ExportItem' ExportItem: type: object properties: @@ -33686,9 +33686,9 @@ components: type: string format: uuid filters: - $ref: "#/components/schemas/GenerationsFilterSchema" + $ref: '#/components/schemas/GenerationsFilterSchema' requested_data: - $ref: "#/components/schemas/LogExportsRequestedData" + $ref: '#/components/schemas/LogExportsRequestedData' status: type: string enum: @@ -33801,7 +33801,7 @@ components: additionalProperties: true ai_org_model: type: string - example: "openai__gpt-3.5-turbo, anthropic__claude-2.1" + example: 'openai__gpt-3.5-turbo, anthropic__claude-2.1' weighted_feedback_min: type: number weighted_feedback_max: @@ -33818,7 +33818,7 @@ components: type: string page_size: type: number - description: "max: 50000, default: 50000" + description: 'max: 50000, default: 50000' example: 50000 current_page: type: number @@ -33838,41 +33838,41 @@ components: format: uuid description: Unique identifier for the log entry nullable: true - example: "550e8400-e29b-41d4-a716-446655440000" + example: '550e8400-e29b-41d4-a716-446655440000' request: - $ref: "#/components/schemas/LogRequest" + $ref: '#/components/schemas/LogRequest' response: - $ref: "#/components/schemas/LogResponse" + $ref: '#/components/schemas/LogResponse' organisation_id: type: string description: Organization identifier nullable: true - example: "org-123" + example: 'org-123' created_at: type: string format: date-time description: Timestamp when the log was created nullable: true - example: "2024-01-15T10:30:00.000Z" + example: '2024-01-15T10:30:00.000Z' metrics: - $ref: "#/components/schemas/AnalyticsMetrics" + $ref: '#/components/schemas/AnalyticsMetrics' description: Analytics metrics object containing detailed metrics about the request finalUntransformedRequest: - $ref: "#/components/schemas/RequestResponseObject" + $ref: '#/components/schemas/RequestResponseObject' description: The original request before any transformations (only present when debug logging is enabled) originalResponse: - $ref: "#/components/schemas/RequestResponseObject" + $ref: '#/components/schemas/RequestResponseObject' description: The original response from the provider (only present when debug logging is enabled or request failed) transformedRequest: - $ref: "#/components/schemas/RequestResponseObject" + $ref: '#/components/schemas/RequestResponseObject' description: The request after transformations (only present when debug logging is enabled) LogRequest: @@ -33886,13 +33886,13 @@ components: type: string format: uri description: Sanitized request URL - example: "https://api.openai.com/v1/chat/completions" + example: 'https://api.openai.com/v1/chat/completions' method: type: string description: HTTP method enum: [GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD] - example: "POST" + example: 'POST' headers: type: object @@ -33900,8 +33900,8 @@ components: type: string description: Request headers (only present when debug logging is enabled) example: - "Content-Type": "application/json" - "Authorization": "Bearer hashed_value" + 'Content-Type': 'application/json' + 'Authorization': 'Bearer hashed_value' body: type: object @@ -33914,9 +33914,9 @@ components: type: string description: Portkey-specific headers example: - "x-portkey-trace-id": "trace-123" - "x-portkey-span-id": "span-456" - "x-portkey-metadata": "{"key":"value"}" + 'x-portkey-trace-id': 'trace-123' + 'x-portkey-span-id': 'span-456' + 'x-portkey-metadata': '{"key":"value"}' LogResponse: type: object @@ -33937,15 +33937,15 @@ components: type: string description: Response headers (only present when debug logging is enabled or request failed) example: - "Content-Type": "application/json" + 'Content-Type': 'application/json' body: type: object additionalProperties: true description: Response body (only present when debug logging is enabled or request failed). May be redacted for certain embedding models. example: - id: "chatcmpl-123" - object: "chat.completion" + id: 'chatcmpl-123' + object: 'chat.completion' created: 1677652288 responseTime: @@ -33957,7 +33957,7 @@ components: lastUsedOptionJsonPath: type: string description: JSON path to the last used option in the config - example: "$.config.options[0]" + example: '$.config.options[0]' RequestResponseObject: type: object @@ -33987,38 +33987,38 @@ components: type: string format: uuid description: Unique identifier for the log entry - example: "550e8400-e29b-41d4-a716-446655440000" + example: '550e8400-e29b-41d4-a716-446655440000' organisation_id: type: string description: Organization identifier - example: "org-123" + example: 'org-123' organisation_name: type: string description: Organization name - example: "Acme Corp" + example: 'Acme Corp' prompt_id: type: string description: Prompt identifier - example: "prompt-789" + example: 'prompt-789' prompt_version_id: type: string description: Prompt version identifier - example: "prompt-v1" + example: 'prompt-v1' config_id: type: string description: Configuration identifier - example: "config-123" + example: 'config-123' created_at: type: string format: date-time description: Timestamp when the log was created - example: "2024-01-15T10:30:00.000" + example: '2024-01-15T10:30:00.000' is_success: type: boolean @@ -34028,12 +34028,12 @@ components: ai_org: type: string description: AI provider organization (e.g., openai, anthropic) - example: "openai" + example: 'openai' ai_model: type: string description: AI model used - example: "gpt-4o" + example: 'gpt-4o' req_units: type: number @@ -34062,19 +34062,19 @@ components: cost_currency: type: string description: Currency code for the cost - default: "USD" - example: "USD" + default: 'USD' + example: 'USD' request_url: type: string format: uri description: Sanitized request URL - example: "https://api.openai.com/v1/chat/completions" + example: 'https://api.openai.com/v1/chat/completions' request_method: type: string description: HTTP method - example: "POST" + example: 'POST' response_status_code: type: integer @@ -34097,13 +34097,13 @@ components: type: string nullable: true description: Cache status (e.g., HIT, MISS, DISABLED, SEMANTIC HIT) - example: "MISS" + example: 'MISS' cache_type: type: string nullable: true description: Type of cache used - example: "semantic" + example: 'semantic' stream_mode: type: integer @@ -34119,62 +34119,62 @@ components: trace_id: type: string description: Distributed tracing trace ID - example: "trace-123" + example: 'trace-123' span_id: type: string description: Distributed tracing span ID - example: "span-456" + example: 'span-456' span_name: type: string description: Name of the span - example: "llm" + example: 'llm' parent_span_id: type: string description: Parent span ID in distributed tracing - example: "span-789" + example: 'span-789' mode: type: string description: Request mode (e.g., single, loadbalance, fallback) - example: "single" + example: 'single' virtual_key: type: string description: Virtual key identifier - example: "vk-123" + example: 'vk-123' source: type: string description: Source of the request (e.g., rubeus, proxy) - example: "rubeus" + example: 'rubeus' runtime: type: string description: Runtime environment - example: "node" + example: 'node' runtime_version: type: string description: Runtime version - example: "18.0.0" + example: '18.0.0' sdk_version: type: string description: SDK version - example: "1.0.0" + example: '1.0.0' config: type: string description: Configuration slug or ID - example: "pc-config-123" + example: 'pc-config-123' internal_trace_id: type: string description: Internal trace ID for gateway tracking - example: "internal-trace-123" + example: 'internal-trace-123' last_used_option_index: type: integer @@ -34184,23 +34184,23 @@ components: config_version_id: type: string description: Configuration version identifier - example: "config-v1" + example: 'config-v1' prompt_slug: type: string description: Prompt slug - example: "my-prompt" + example: 'my-prompt' workspace_slug: type: string nullable: true description: Workspace slug - example: "my-workspace" + example: 'my-workspace' log_store_file_path_format: type: string description: Path format version for log storage - example: "v1" + example: 'v1' metadata.key: type: array @@ -34208,7 +34208,7 @@ components: type: string nullable: true description: Array of metadata keys - example: ["key1", "key2"] + example: ['key1', 'key2'] metadata.value: type: array @@ -34216,12 +34216,12 @@ components: type: string nullable: true description: Array of metadata values - example: ["value1", "value2"] + example: ['value1', 'value2'] api_key_id: type: string description: API key identifier - example: "api-key-123" + example: 'api-key-123' request_parsing_time: type: integer @@ -34359,47 +34359,47 @@ components: id: type: string format: uuid - example: "f47ac10b-58cc-4372-a567-0e02b2c3d479" + example: 'f47ac10b-58cc-4372-a567-0e02b2c3d479' key: type: string - example: "Xk*******S4" + example: 'Xk*******S4' name: type: string - example: "Development API Key" + example: 'Development API Key' description: type: string - example: "API key for development environment" + example: 'API key for development environment' type: type: string - enum: ["organisation-service", "workspace-service", "workspace-user"] - example: "organisation-service" + enum: ['organisation-service', 'workspace-service', 'workspace-user'] + example: 'organisation-service' organisation_id: type: string format: uuid - example: "a1b2c3d4-e5f6-4a5b-8c7d-9e0f1a2b3c4d" + example: 'a1b2c3d4-e5f6-4a5b-8c7d-9e0f1a2b3c4d' workspace_id: type: string - example: "ws-myworkspace" + example: 'ws-myworkspace' user_id: type: string format: uuid - example: "c3d4e5f6-a7b8-6c7d-0e1f-2a3b4c5d6e7f" + example: 'c3d4e5f6-a7b8-6c7d-0e1f-2a3b4c5d6e7f' status: type: string - enum: ["active", "exhausted"] - example: "active" + enum: ['active', 'exhausted'] + example: 'active' created_at: type: string format: date-time - example: "2023-09-15T10:30:00Z" + example: '2023-09-15T10:30:00Z' last_updated_at: type: string format: date-time - example: "2023-09-15T10:30:00Z" + example: '2023-09-15T10:30:00Z' creation_mode: type: string - enum: ["ui", "api", "auto"] - example: "ui" + enum: ['ui', 'api', 'auto'] + example: 'ui' rate_limits: type: array items: @@ -34407,15 +34407,15 @@ components: properties: type: type: string - example: "requests" + example: 'requests' unit: type: string - example: "rpm" + example: 'rpm' value: type: integer example: 100 usage_limits: - $ref: "#/components/schemas/UsageLimits" + $ref: '#/components/schemas/UsageLimits' reset_usage: type: number example: 0 @@ -34423,7 +34423,7 @@ components: type: array items: type: string - example: ["completions.write"] + example: ['completions.write'] defaults: type: object properties: @@ -34431,8 +34431,8 @@ components: type: object additionalProperties: true example: - environment: "development" - team: "backend" + environment: 'development' + team: 'backend' config_id: type: string example: config-abc @@ -34441,14 +34441,14 @@ components: items: type: string format: email - example: "foo@bar.com" + example: 'foo@bar.com' expires_at: type: string format: date-time object: type: string - enum: ["api-key"] - example: "api-key" + enum: ['api-key'] + example: 'api-key' ApiKeyObjectList: type: object @@ -34463,7 +34463,7 @@ components: data: type: array items: - $ref: "#/components/schemas/ApiKeyObject" + $ref: '#/components/schemas/ApiKeyObject' CreateApiKeyObject: type: object @@ -34474,31 +34474,31 @@ components: name: type: string maxLength: 100 - example: "Development API Key" + example: 'Development API Key' description: type: string maxLength: 200 - example: "API key for development environment" + example: 'API key for development environment' organisation_id: type: string format: uuid - description: "Organisation ID. Optional when calling via an org-level API key (picked from auth context)." - example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" + description: Organisation ID. Optional when calling via an org-level API key (picked from auth context). + example: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890' workspace_id: type: string - description: "Workspace ID or slug (e.g. ws-myworkspace). Required for workspace-scoped keys." - example: "ws-myworkspace" + description: Workspace ID or slug (e.g. ws-myworkspace). Required for workspace-scoped keys. + example: 'ws-myworkspace' user_id: type: string format: uuid - description: "**Required** when sub-type path parameter is "user". Not required when sub-type is "service"." - example: "c3d4e5f6-a7b8-6c7d-0e1f-2a3b4c5d6e7f" + description: "**Required** when sub-type path parameter is 'user'. Not required when sub-type is 'service'." + example: 'c3d4e5f6-a7b8-6c7d-0e1f-2a3b4c5d6e7f' scopes: type: array minItems: 1 items: type: string - example: ["completions.write"] + example: ['completions.write'] defaults: type: object nullable: true @@ -34507,25 +34507,25 @@ components: type: string format: uuid nullable: true - description: "UUID of the config to pin to this key. Every request using this key will automatically apply this config." - example: "f1e2d3c4-b5a6-7890-fedc-ba9876543210" + description: UUID of the config to pin to this key. Every request using this key will automatically apply this config. + example: 'f1e2d3c4-b5a6-7890-fedc-ba9876543210' allow_config_override: type: boolean nullable: true default: true - description: "When false, the pinned config_id cannot be overridden at request time." + description: When false, the pinned config_id cannot be overridden at request time. example: false metadata: type: object nullable: true additionalProperties: type: string - description: "Default metadata attached to every request made with this key. Values must be strings." + description: Default metadata attached to every request made with this key. Values must be strings. example: - environment: "development" - team: "backend" + environment: 'development' + team: 'backend' usage_limits: - $ref: "#/components/schemas/UsageLimits" + $ref: '#/components/schemas/UsageLimits' rate_limits: type: array nullable: true @@ -34538,13 +34538,13 @@ components: properties: type: type: string - enum: ["requests", "tokens"] - example: "requests" + enum: ['requests', 'tokens'] + example: 'requests' unit: type: string - enum: ["rpd", "rph", "rpm", "rps", "rpw"] - description: "Rate limit unit: requests/tokens per day, hour, minute, second, or week." - example: "rpm" + enum: ['rpd', 'rph', 'rpm', 'rps', 'rpw'] + description: 'Rate limit unit: requests/tokens per day, hour, minute, second, or week.' + example: 'rpm' value: type: integer minimum: 0 @@ -34553,58 +34553,58 @@ components: type: string format: date-time nullable: true - description: "ISO 8601 datetime at which this key expires. Must not exceed the org/workspace maximum TTL if configured." - example: "2026-12-31T23:59:59Z" + description: ISO 8601 datetime at which this key expires. Must not exceed the org/workspace maximum TTL if configured. + example: '2026-12-31T23:59:59Z' alert_emails: type: array nullable: true items: type: string format: email - description: "Email addresses to notify when usage limits are approaching the alert_threshold." - example: ["admin@example.com"] + description: Email addresses to notify when usage limits are approaching the alert_threshold. + example: ['admin@example.com'] rotation_policy: type: object nullable: true - description: "Automatic key rotation configuration. Requires either rotation_period or next_rotation_at." + description: Automatic key rotation configuration. Requires either rotation_period or next_rotation_at. properties: rotation_period: type: string - enum: ["weekly", "monthly"] + enum: ['weekly', 'monthly'] nullable: true - description: "How often to automatically rotate the key." - example: "monthly" + description: How often to automatically rotate the key. + example: 'monthly' next_rotation_at: type: string format: date-time nullable: true - description: "Explicit datetime for the next rotation. Mutually exclusive with rotation_period." - example: "2026-06-01T00:00:00Z" + description: Explicit datetime for the next rotation. Mutually exclusive with rotation_period. + example: '2026-06-01T00:00:00Z' key_transition_period_ms: type: integer minimum: 1800000 - description: "Duration in milliseconds during which the previous key remains valid after rotation. Minimum 30 minutes (1800000). Must be less than the full rotation period." + description: Duration in milliseconds during which the previous key remains valid after rotation. Minimum 30 minutes (1800000). Must be less than the full rotation period. example: 3600000 UpdateApiKeyObject: type: object - description: "All fields are optional. Only include the fields you want to change." + description: All fields are optional. Only include the fields you want to change. properties: name: type: string maxLength: 100 - example: "Development API Key" + example: 'Development API Key' description: type: string maxLength: 200 - example: "API key for development environment" + example: 'API key for development environment' scopes: type: array minItems: 1 items: type: string - description: "Replaces the entire scope list on the key." - example: ["completions.write"] + description: Replaces the entire scope list on the key. + example: ['completions.write'] defaults: type: object nullable: true @@ -34614,23 +34614,23 @@ components: format: uuid nullable: true description: "UUID of the config to pin. Set to null to remove the pinned config (also resets allow_config_override to true)." - example: "f1e2d3c4-b5a6-7890-fedc-ba9876543210" + example: 'f1e2d3c4-b5a6-7890-fedc-ba9876543210' allow_config_override: type: boolean nullable: true - description: "When false, the pinned config_id cannot be overridden at request time." + description: When false, the pinned config_id cannot be overridden at request time. example: false metadata: type: object nullable: true additionalProperties: type: string - description: "Default metadata attached to every request made with this key. Values must be strings." + description: Default metadata attached to every request made with this key. Values must be strings. example: - environment: "development" - team: "backend" + environment: 'development' + team: 'backend' usage_limits: - $ref: "#/components/schemas/UsageLimits" + $ref: '#/components/schemas/UsageLimits' rate_limits: type: array nullable: true @@ -34643,13 +34643,13 @@ components: properties: type: type: string - enum: ["requests", "tokens"] - example: "requests" + enum: ['requests', 'tokens'] + example: 'requests' unit: type: string - enum: ["rpd", "rph", "rpm", "rps", "rpw"] - description: "Rate limit unit: requests/tokens per day, hour, minute, second, or week." - example: "rpm" + enum: ['rpd', 'rph', 'rpm', 'rps', 'rpw'] + description: 'Rate limit unit: requests/tokens per day, hour, minute, second, or week.' + example: 'rpm' value: type: integer minimum: 0 @@ -34658,11 +34658,11 @@ components: type: string format: date-time nullable: true - description: "ISO 8601 datetime at which this key expires." - example: "2026-12-31T23:59:59Z" + description: ISO 8601 datetime at which this key expires. + example: '2026-12-31T23:59:59Z' reset_usage: type: boolean - description: "When true, resets the accumulated usage counter. If the key status is exhausted, this will restore it to active." + description: When true, resets the accumulated usage counter. If the key status is exhausted, this will restore it to active. example: true alert_emails: type: array @@ -34670,29 +34670,29 @@ components: items: type: string format: email - description: "Email addresses to notify when usage limits are approaching the alert_threshold." - example: ["admin@example.com"] + description: Email addresses to notify when usage limits are approaching the alert_threshold. + example: ['admin@example.com'] rotation_policy: type: object nullable: true - description: "Update or replace the automatic key rotation configuration. Requires either rotation_period or next_rotation_at." + description: Update or replace the automatic key rotation configuration. Requires either rotation_period or next_rotation_at. properties: rotation_period: type: string - enum: ["weekly", "monthly"] + enum: ['weekly', 'monthly'] nullable: true - description: "How often to automatically rotate the key." - example: "monthly" + description: How often to automatically rotate the key. + example: 'monthly' next_rotation_at: type: string format: date-time nullable: true - description: "Explicit datetime for the next rotation. Mutually exclusive with rotation_period." - example: "2026-06-01T00:00:00Z" + description: Explicit datetime for the next rotation. Mutually exclusive with rotation_period. + example: '2026-06-01T00:00:00Z' key_transition_period_ms: type: integer minimum: 1800000 - description: "Duration in milliseconds during which the previous key remains valid after rotation. Minimum 30 minutes (1800000). Must be less than the full rotation period." + description: Duration in milliseconds during which the previous key remains valid after rotation. Minimum 30 minutes (1800000). Must be less than the full rotation period. example: 3600000 RotateApiKeyRequest: @@ -34710,16 +34710,16 @@ components: id: type: string format: uuid - example: "550e8400-e29b-41d4-a716-446655440000" + example: '550e8400-e29b-41d4-a716-446655440000' key: type: string description: Newly rotated API key value. - example: "pk_live_new_rotated_key_value" + example: 'pk_live_new_rotated_key_value' key_transition_expires_at: type: string format: date-time description: Timestamp when the previous key version stops being accepted. - example: "2026-01-15T10:30:00.000Z" + example: '2026-01-15T10:30:00.000Z' PromptRenderResponse: type: object @@ -34733,9 +34733,9 @@ components: data: oneOf: - title: Chat Completions - $ref: "#/components/schemas/CreateChatCompletionRequest" + $ref: '#/components/schemas/CreateChatCompletionRequest' - title: Completions - $ref: "#/components/schemas/CreateCompletionRequest" + $ref: '#/components/schemas/CreateCompletionRequest' CreateGuardrailRequest: type: object @@ -34747,7 +34747,7 @@ components: name: type: string description: Name of the guardrail - example: "Content Safety Check" + example: 'Content Safety Check' workspace_id: type: string format: uuid @@ -34760,10 +34760,10 @@ components: type: array description: Array of guardrail checks to apply items: - $ref: "#/components/schemas/GuardrailCheck" + $ref: '#/components/schemas/GuardrailCheck' minItems: 1 actions: - $ref: "#/components/schemas/GuardrailActions" + $ref: '#/components/schemas/GuardrailActions' UpdateGuardrailRequest: type: object @@ -34775,10 +34775,10 @@ components: type: array description: Updated array of guardrail checks items: - $ref: "#/components/schemas/GuardrailCheck" + $ref: '#/components/schemas/GuardrailCheck' minItems: 1 actions: - $ref: "#/components/schemas/GuardrailActions" + $ref: '#/components/schemas/GuardrailActions' GuardrailActions: type: object @@ -34811,7 +34811,7 @@ components: metadata: type: string description: Additional metadata for the feedback - default: "" + default: '' required: - value - weight @@ -34837,7 +34837,7 @@ components: metadata: type: string description: Additional metadata for the feedback - default: "" + default: '' required: - value - weight @@ -34860,88 +34860,88 @@ components: description: Identifier of the guardrail check type enum: # BASIC category guardrails - - "default.jwt" - - "default.modelWhitelist" - - "default.isAllLowerCase" - - "default.regexMatch" - - "default.sentenceCount" - - "default.wordCount" - - "default.characterCount" - - "default.jsonSchema" - - "default.jsonKeys" - - "default.contains" - - "default.validUrls" - - "default.containsCode" - - "default.webhook" - - "default.endsWith" - - "default.alluppercase" - - "default.requiredMetadataKeys" - - "default.allowedRequestTypes" + - 'default.jwt' + - 'default.modelWhitelist' + - 'default.isAllLowerCase' + - 'default.regexMatch' + - 'default.sentenceCount' + - 'default.wordCount' + - 'default.characterCount' + - 'default.jsonSchema' + - 'default.jsonKeys' + - 'default.contains' + - 'default.validUrls' + - 'default.containsCode' + - 'default.webhook' + - 'default.endsWith' + - 'default.alluppercase' + - 'default.requiredMetadataKeys' + - 'default.allowedRequestTypes' # PRO category guardrails - - "portkey.moderateContent" - - "portkey.language" - - "portkey.pii" - - "portkey.gibberish" + - 'portkey.moderateContent' + - 'portkey.language' + - 'portkey.pii' + - 'portkey.gibberish' # PARTNER category guardrails - - "sydelabs.sydeguard" - - "aporia.validateProject" - - "pillar.scanPrompt" - - "pillar.scanResponse" - - "patronus.phi" - - "patronus.pii" - - "patronus.isConcise" - - "patronus.isHelpful" - - "patronus.isPolite" - - "patronus.noApologies" - - "patronus.noGenderBias" - - "patronus.noRacialBias" - - "patronus.retrievalAnswerRelevance" - - "patronus.toxicity" - - "patronus.custom" - - "mistral.moderateContent" - - "bedrock.guard" - - "promptfoo.guard" - - "promptfoo.pii" - - "promptfoo.harm" - - "acuvity.scan" - - "lasso.classify" - - "azure.contentSafety" - - "azure.pii" - - "panw-prisma-airs.intercept" + - 'sydelabs.sydeguard' + - 'aporia.validateProject' + - 'pillar.scanPrompt' + - 'pillar.scanResponse' + - 'patronus.phi' + - 'patronus.pii' + - 'patronus.isConcise' + - 'patronus.isHelpful' + - 'patronus.isPolite' + - 'patronus.noApologies' + - 'patronus.noGenderBias' + - 'patronus.noRacialBias' + - 'patronus.retrievalAnswerRelevance' + - 'patronus.toxicity' + - 'patronus.custom' + - 'mistral.moderateContent' + - 'bedrock.guard' + - 'promptfoo.guard' + - 'promptfoo.pii' + - 'promptfoo.harm' + - 'acuvity.scan' + - 'lasso.classify' + - 'azure.contentSafety' + - 'azure.pii' + - 'panw-prisma-airs.intercept' parameters: oneOf: - - $ref: "#/components/schemas/JWTParameters" - - $ref: "#/components/schemas/ModelWhitelistParameters" - - $ref: "#/components/schemas/RegexMatchParameters" - - $ref: "#/components/schemas/SentenceCountParameters" - - $ref: "#/components/schemas/WordCountParameters" - - $ref: "#/components/schemas/CharacterCountParameters" - - $ref: "#/components/schemas/JSONSchemaParameters" - - $ref: "#/components/schemas/JSONKeysParameters" - - $ref: "#/components/schemas/ContainsParameters" - - $ref: "#/components/schemas/ValidUrlsParameters" - - $ref: "#/components/schemas/ContainsCodeParameters" - - $ref: "#/components/schemas/WebhookParameters" - - $ref: "#/components/schemas/EndsWithParameters" - - $ref: "#/components/schemas/UppercaseParameters" - - $ref: "#/components/schemas/RequiredMetadataKeysParameters" - - $ref: "#/components/schemas/AllowedRequestTypesParameters" - - $ref: "#/components/schemas/SydeGuardParameters" - - $ref: "#/components/schemas/AporiaParameters" - - $ref: "#/components/schemas/PillarScanParameters" - - $ref: "#/components/schemas/PatronusParameters" - - $ref: "#/components/schemas/PatronusCustomParameters" - - $ref: "#/components/schemas/PortkeyModerationParameters" - - $ref: "#/components/schemas/PortkeyLanguageParameters" - - $ref: "#/components/schemas/PortkeyPIIParameters" - - $ref: "#/components/schemas/MistralModerationParameters" - - $ref: "#/components/schemas/BedrockGuardParameters" - - $ref: "#/components/schemas/PromptfooParameters" - - $ref: "#/components/schemas/AcuvityScanParameters" - - $ref: "#/components/schemas/AzureContentSafetyParameters" - - $ref: "#/components/schemas/AzurePIIParameters" - - $ref: "#/components/schemas/PANWPrismaParameters" - - $ref: "#/components/schemas/BasicParameters" + - $ref: '#/components/schemas/JWTParameters' + - $ref: '#/components/schemas/ModelWhitelistParameters' + - $ref: '#/components/schemas/RegexMatchParameters' + - $ref: '#/components/schemas/SentenceCountParameters' + - $ref: '#/components/schemas/WordCountParameters' + - $ref: '#/components/schemas/CharacterCountParameters' + - $ref: '#/components/schemas/JSONSchemaParameters' + - $ref: '#/components/schemas/JSONKeysParameters' + - $ref: '#/components/schemas/ContainsParameters' + - $ref: '#/components/schemas/ValidUrlsParameters' + - $ref: '#/components/schemas/ContainsCodeParameters' + - $ref: '#/components/schemas/WebhookParameters' + - $ref: '#/components/schemas/EndsWithParameters' + - $ref: '#/components/schemas/UppercaseParameters' + - $ref: '#/components/schemas/RequiredMetadataKeysParameters' + - $ref: '#/components/schemas/AllowedRequestTypesParameters' + - $ref: '#/components/schemas/SydeGuardParameters' + - $ref: '#/components/schemas/AporiaParameters' + - $ref: '#/components/schemas/PillarScanParameters' + - $ref: '#/components/schemas/PatronusParameters' + - $ref: '#/components/schemas/PatronusCustomParameters' + - $ref: '#/components/schemas/PortkeyModerationParameters' + - $ref: '#/components/schemas/PortkeyLanguageParameters' + - $ref: '#/components/schemas/PortkeyPIIParameters' + - $ref: '#/components/schemas/MistralModerationParameters' + - $ref: '#/components/schemas/BedrockGuardParameters' + - $ref: '#/components/schemas/PromptfooParameters' + - $ref: '#/components/schemas/AcuvityScanParameters' + - $ref: '#/components/schemas/AzureContentSafetyParameters' + - $ref: '#/components/schemas/AzurePIIParameters' + - $ref: '#/components/schemas/PANWPrismaParameters' + - $ref: '#/components/schemas/BasicParameters' description: Configuration parameters specific to the check type name: type: string @@ -34994,7 +34994,7 @@ components: type: array description: Array of guardrail summaries items: - $ref: "#/components/schemas/GuardrailSummary" + $ref: '#/components/schemas/GuardrailSummary' total: type: integer description: Total number of guardrails available @@ -35030,7 +35030,7 @@ components: description: Workspace UUID (null for organisation-level guardrails) status: type: string - enum: ["active", "archived"] + enum: ['active', 'archived'] description: Current status of the guardrail created_at: type: string @@ -35052,16 +35052,16 @@ components: GuardrailDetails: allOf: - - $ref: "#/components/schemas/GuardrailSummary" + - $ref: '#/components/schemas/GuardrailSummary' - type: object properties: checks: type: array description: Array of configured guardrail checks items: - $ref: "#/components/schemas/GuardrailCheck" + $ref: '#/components/schemas/GuardrailCheck' actions: - $ref: "#/components/schemas/GuardrailActions" + $ref: '#/components/schemas/GuardrailActions' # Detailed parameter schemas for specific guardrail types JWTParameters: @@ -35089,13 +35089,13 @@ components: maxTokenAge: type: string description: Max token age - default: "1d" + default: '1d' algorithms: type: array items: type: string description: Algorithms to check for the JWT token - default: ["RS256"] + default: ['RS256'] RegexMatchParameters: title: Regex Match Parameters @@ -35203,9 +35203,9 @@ components: description: Keys to check for in JSON operator: type: string - enum: ["any", "all", "none"] + enum: ['any', 'all', 'none'] description: Operator to use for key checking - default: "any" + default: 'any' ContainsParameters: title: Contains Parameters @@ -35221,9 +35221,9 @@ components: description: Words or phrases to check for operator: type: string - enum: ["any", "all", "none"] + enum: ['any', 'all', 'none'] description: Operator to use for word checking - default: "any" + default: 'any' ValidUrlsParameters: title: Valid URLs Parameters @@ -35247,31 +35247,31 @@ components: format: type: string enum: - - "SQL" - - "Python" - - "TypeScript" - - "JavaScript" - - "Java" - - "C#" - - "C++" - - "C" - - "Ruby" - - "PHP" - - "Swift" - - "Kotlin" - - "Go" - - "Rust" - - "Scala" - - "R" - - "Perl" - - "Shell" - - "HTML" - - "CSS" - - "XML" - - "JSON" - - "YAML" - - "Markdown" - - "Dockerfile" + - 'SQL' + - 'Python' + - 'TypeScript' + - 'JavaScript' + - 'Java' + - 'C#' + - 'C++' + - 'C' + - 'Ruby' + - 'PHP' + - 'Swift' + - 'Kotlin' + - 'Go' + - 'Rust' + - 'Scala' + - 'R' + - 'Perl' + - 'Shell' + - 'HTML' + - 'CSS' + - 'XML' + - 'JSON' + - 'YAML' + - 'Markdown' + - 'Dockerfile' description: Code format to check for not: type: boolean @@ -35338,9 +35338,9 @@ components: description: Metadata keys to check for operator: type: string - enum: ["all", "any", "none"] + enum: ['all', 'any', 'none'] description: Operator to use for key checking - default: "all" + default: 'all' AllowedRequestTypesParameters: title: Allowed Request Types Parameters @@ -35475,11 +35475,11 @@ components: items: type: string enum: - - "prompt_injection" - - "pii" - - "secrets" - - "toxic_language" - - "invisible_characters" + - 'prompt_injection' + - 'pii' + - 'secrets' + - 'toxic_language' + - 'invisible_characters' description: Scanners to use for content analysis timeout: type: number @@ -35524,17 +35524,17 @@ components: items: type: string enum: - - "hate" - - "hate/threatening" - - "harassment" - - "harassment/threatening" - - "self-harm" - - "self-harm/intent" - - "self-harm/instructions" - - "sexual" - - "sexual/minors" - - "violence" - - "violence/graphic" + - 'hate' + - 'hate/threatening' + - 'harassment' + - 'harassment/threatening' + - 'self-harm' + - 'self-harm/intent' + - 'self-harm/instructions' + - 'sexual' + - 'sexual/minors' + - 'violence' + - 'violence/graphic' description: Categories that should NOT be allowed timeout: type: number @@ -35548,55 +35548,55 @@ components: language: type: string enum: - - "eng_Latn" - - "zho_Hans" - - "spa_Latn" - - "ara_Arab" - - "por_Latn" - - "ind_Latn" - - "fra_Latn" - - "jpn_Jpan" - - "rus_Cyrl" - - "deu_Latn" - - "kor_Hang" - - "tur_Latn" - - "ita_Latn" - - "pes_Arab" - - "pol_Latn" - - "vie_Latn" - - "nld_Latn" - - "hin_Deva" - - "tha_Thai" - - "heb_Hebr" - - "ben_Beng" - - "swe_Latn" - - "ces_Latn" - - "ron_Latn" - - "ell_Grek" - - "ukr_Cyrl" - - "dan_Latn" - - "fin_Latn" - - "nor_Latn" - - "hun_Latn" - - "cat_Latn" - - "bul_Cyrl" - - "msa_Latn" - - "hrv_Latn" - - "arb_Latn" - - "slk_Latn" - - "lit_Latn" - - "lav_Latn" - - "srp_Cyrl" - - "slv_Latn" - - "est_Latn" - - "urd_Arab" - - "fil_Latn" - - "aze_Latn" - - "tam_Taml" - - "tel_Telu" - - "mar_Deva" - - "kan_Knda" - - "fas_Arab" + - 'eng_Latn' + - 'zho_Hans' + - 'spa_Latn' + - 'ara_Arab' + - 'por_Latn' + - 'ind_Latn' + - 'fra_Latn' + - 'jpn_Jpan' + - 'rus_Cyrl' + - 'deu_Latn' + - 'kor_Hang' + - 'tur_Latn' + - 'ita_Latn' + - 'pes_Arab' + - 'pol_Latn' + - 'vie_Latn' + - 'nld_Latn' + - 'hin_Deva' + - 'tha_Thai' + - 'heb_Hebr' + - 'ben_Beng' + - 'swe_Latn' + - 'ces_Latn' + - 'ron_Latn' + - 'ell_Grek' + - 'ukr_Cyrl' + - 'dan_Latn' + - 'fin_Latn' + - 'nor_Latn' + - 'hun_Latn' + - 'cat_Latn' + - 'bul_Cyrl' + - 'msa_Latn' + - 'hrv_Latn' + - 'arb_Latn' + - 'slk_Latn' + - 'lit_Latn' + - 'lav_Latn' + - 'srp_Cyrl' + - 'slv_Latn' + - 'est_Latn' + - 'urd_Arab' + - 'fil_Latn' + - 'aze_Latn' + - 'tam_Taml' + - 'tel_Telu' + - 'mar_Deva' + - 'kan_Knda' + - 'fas_Arab' description: Language that should be allowed in content not: type: boolean @@ -35622,13 +35622,13 @@ components: items: type: string enum: - - "EMAIL_ADDRESS" - - "PHONE_NUMBER" - - "LOCATION_ADDRESS" - - "NAME" - - "IP_ADDRESS" - - "CREDIT_CARD" - - "SSN" + - 'EMAIL_ADDRESS' + - 'PHONE_NUMBER' + - 'LOCATION_ADDRESS' + - 'NAME' + - 'IP_ADDRESS' + - 'CREDIT_CARD' + - 'SSN' description: Types of PII that should NOT be allowed timeout: type: number @@ -35646,15 +35646,15 @@ components: items: type: string enum: - - "sexual" - - "hate_and_discrimination" - - "violence_and_threats" - - "dangerous_and_criminal_content" - - "selfharm" - - "health" - - "financial" - - "law" - - "pii" + - 'sexual' + - 'hate_and_discrimination' + - 'violence_and_threats' + - 'dangerous_and_criminal_content' + - 'selfharm' + - 'health' + - 'financial' + - 'law' + - 'pii' description: Categories that should NOT be allowed timeout: type: number @@ -35773,15 +35773,15 @@ components: language_values: type: string enum: - - "english" - - "chinese" - - "spanish" - - "french" - - "german" - - "japanese" - - "gibberish" + - 'english' + - 'chinese' + - 'spanish' + - 'french' + - 'german' + - 'japanese' + - 'gibberish' description: Language to check - default: "english" + default: 'english' pii: type: boolean description: Enable PII detection @@ -35795,21 +35795,21 @@ components: items: type: string enum: - - "email_address" - - "ssn" - - "person" - - "aba_routing_number" - - "address" - - "bank_account" - - "bitcoin_wallet" - - "credit_card" - - "driver_license" - - "itin_number" - - "location" - - "medical_license" - - "money_amount" - - "passport_number" - - "phone_number" + - 'email_address' + - 'ssn' + - 'person' + - 'aba_routing_number' + - 'address' + - 'bank_account' + - 'bitcoin_wallet' + - 'credit_card' + - 'driver_license' + - 'itin_number' + - 'location' + - 'medical_license' + - 'money_amount' + - 'passport_number' + - 'phone_number' description: PII categories to detect secrets: type: boolean @@ -35824,13 +35824,13 @@ components: items: type: string enum: - - "credentials" - - "aws_secret_key" - - "github" - - "openai" - - "stripe" - - "jwt" - - "private_key" + - 'credentials' + - 'aws_secret_key' + - 'github' + - 'openai' + - 'stripe' + - 'jwt' + - 'private_key' description: Secret categories to detect timeout: type: number @@ -35850,7 +35850,7 @@ components: apiVersion: type: string description: API version for the Content Safety API - default: "2024-09-01" + default: '2024-09-01' severity: type: number description: Severity threshold for the Content Safety API @@ -35859,7 +35859,7 @@ components: type: array items: type: string - enum: ["Hate", "SelfHarm", "Sexual", "Violence"] + enum: ['Hate', 'SelfHarm', 'Sexual', 'Violence'] description: Categories to check against timeout: type: number @@ -35872,17 +35872,17 @@ components: properties: domain: type: string - enum: ["none", "phi"] + enum: ['none', 'phi'] description: Domain to check against - default: "none" + default: 'none' apiVersion: type: string description: API version for the Content Safety API - default: "2024-11-01" + default: '2024-11-01' modelVersion: type: string description: Version of the PII detection model to use - default: "latest" + default: 'latest' redact: type: boolean description: Whether to redact detected PII @@ -35925,7 +35925,7 @@ components: description: Job name for the batch job output_data_config: type: string - description: Batch job"s output storage location, will be constructed based on `input_file_id` if not provided + description: Batch job's output storage location, will be constructed based on `input_file_id` if not provided model: type: string description: Model to start batch job with @@ -35933,7 +35933,7 @@ components: type: string description: Role ARN for the bedrock batch job allOf: - - $ref: "#/components/schemas/OpenAIBatchJob" + - $ref: '#/components/schemas/OpenAIBatchJob' description: Gateway supported body params for bedrock fine-tuning. title: Bedrock Params BedrockBatchParams: @@ -35952,7 +35952,7 @@ components: description: Job name for the batch job output_data_config: type: string - description: Batch job"s output storage location, will be constructed based on `input_file_id` if not provided + description: Batch job's output storage location, will be constructed based on `input_file_id` if not provided model: type: string description: Model to start batch job with @@ -35996,7 +35996,7 @@ components: description: Job name for the batch job output_data_config: type: string - description: Batch job"s output storage location, will be constructed based on `input_file_id` if not provided + description: Batch job's output storage location, will be constructed based on `input_file_id` if not provided model: type: string description: Model to start batch job with @@ -36005,7 +36005,7 @@ components: description: Role ARN for the bedrock batch job portkey_options: allOf: - - $ref: "#/components/schemas/PortkeyBatchOptions" + - $ref: '#/components/schemas/PortkeyBatchOptions' description: Portkey Gateway Provider specific headers to be passed to the provider, if portkey is used as a provider provider_options: anyOf: @@ -36017,7 +36017,7 @@ components: description: Job name for the batch job output_data_config: type: string - description: Batch job"s output storage location, will be constructed based on `input_file_id` if not provided + description: Batch job's output storage location, will be constructed based on `input_file_id` if not provided model: type: string description: Model to start batch job with @@ -36035,7 +36035,7 @@ components: description: Job name for the batch job output_data_config: type: string - description: Batch job"s output storage location, will be constructed based on `input_file_id` if not provided + description: Batch job's output storage location, will be constructed based on `input_file_id` if not provided model: type: string description: Model to start batch job with @@ -36043,7 +36043,7 @@ components: - model description: Provider specific options to be passed to the provider, optional can be passed directly as well. allOf: - - $ref: "#/components/schemas/OpenAIBatchJob" + - $ref: '#/components/schemas/OpenAIBatchJob' description: Gateway supported body params for portkey managed batching. title: Portkey Params @@ -36081,12 +36081,12 @@ components: description: Job name for the batch job output_data_config: type: string - description: Batch job"s output storage location, will be constructed based on `input_file_id` if not provided + description: Batch job's output storage location, will be constructed based on `input_file_id` if not provided model: type: string description: Model to start batch job with allOf: - - $ref: "#/components/schemas/OpenAIBatchJob" + - $ref: '#/components/schemas/OpenAIBatchJob' description: Gateway supported body params for Vertext fine-tuning. title: Vertex Params VertexBatchParams: @@ -36144,13 +36144,13 @@ components: type: array minItems: 1 items: - $ref: "#/components/schemas/Condition" + $ref: '#/components/schemas/Condition' description: Array of conditions that define which requests the policy applies to group_by: type: array minItems: 1 items: - $ref: "#/components/schemas/GroupBy" + $ref: '#/components/schemas/GroupBy' description: Array of group by fields that define how usage is aggregated type: type: string @@ -36221,13 +36221,13 @@ components: type: array minItems: 1 items: - $ref: "#/components/schemas/Condition" + $ref: '#/components/schemas/Condition' description: Array of conditions that define which requests the policy applies to group_by: type: array minItems: 1 items: - $ref: "#/components/schemas/GroupBy" + $ref: '#/components/schemas/GroupBy' description: Array of group by fields that define how usage is aggregated type: type: string @@ -36289,12 +36289,12 @@ components: conditions: type: array items: - $ref: "#/components/schemas/Condition" + $ref: '#/components/schemas/Condition' description: Array of conditions group_by: type: array items: - $ref: "#/components/schemas/GroupBy" + $ref: '#/components/schemas/GroupBy' description: Array of group by fields type: type: string @@ -36335,7 +36335,7 @@ components: value_key_usage_map: type: object additionalProperties: - $ref: "#/components/schemas/ValueKeyUsage" + $ref: '#/components/schemas/ValueKeyUsage' description: Map of value keys to usage information (only included when include_usage=true) ValueKeyUsage: @@ -36379,12 +36379,12 @@ components: conditions: type: array items: - $ref: "#/components/schemas/Condition" + $ref: '#/components/schemas/Condition' description: Array of conditions group_by: type: array items: - $ref: "#/components/schemas/GroupBy" + $ref: '#/components/schemas/GroupBy' description: Array of group by fields type: type: string @@ -36439,14 +36439,14 @@ components: data: type: array items: - $ref: "#/components/schemas/UsageLimitsPolicy" + $ref: '#/components/schemas/UsageLimitsPolicy' total: type: integer description: Total number of policies UsageLimitsPolicyResponse: allOf: - - $ref: "#/components/schemas/UsageLimitsPolicy" + - $ref: '#/components/schemas/UsageLimitsPolicy' - type: object properties: object: @@ -36475,7 +36475,7 @@ components: data: type: array items: - $ref: "#/components/schemas/UsageLimitsPolicyEntity" + $ref: '#/components/schemas/UsageLimitsPolicyEntity' total: type: integer description: Total number of entities @@ -36489,14 +36489,14 @@ components: data: type: array items: - $ref: "#/components/schemas/RateLimitsPolicy" + $ref: '#/components/schemas/RateLimitsPolicy' total: type: integer description: Total number of policies RateLimitsPolicyResponse: allOf: - - $ref: "#/components/schemas/RateLimitsPolicy" + - $ref: '#/components/schemas/RateLimitsPolicy' - type: object properties: object: @@ -36522,7 +36522,7 @@ components: description: Workspace ID (optional; to create at workspace level) slug: type: string - pattern: "^[a-zA-Z0-9_-]+$" + pattern: '^[a-zA-Z0-9_-]+$' description: Optional slug; must be unique within organisation name: type: string @@ -36691,7 +36691,7 @@ components: data: type: array items: - $ref: "#/components/schemas/McpIntegrationListItem" + $ref: '#/components/schemas/McpIntegrationListItem' total: type: integer has_more: @@ -36767,7 +36767,7 @@ components: data: type: array items: - $ref: "#/components/schemas/McpIntegrationWorkspaceItem" + $ref: '#/components/schemas/McpIntegrationWorkspaceItem' global_workspace_access: type: object nullable: true @@ -36780,7 +36780,7 @@ components: workspaces: type: array items: - $ref: "#/components/schemas/McpIntegrationWorkspaceItem" + $ref: '#/components/schemas/McpIntegrationWorkspaceItem' global_workspace_access: type: object nullable: true @@ -36909,9 +36909,9 @@ components: data: type: array items: - $ref: "#/components/schemas/McpIntegrationCapabilityItem" + $ref: '#/components/schemas/McpIntegrationCapabilityItem' counts: - $ref: "#/components/schemas/McpIntegrationCapabilitiesCounts" + $ref: '#/components/schemas/McpIntegrationCapabilitiesCounts' total: type: integer has_more: @@ -37002,7 +37002,7 @@ components: description: MCP Integration ID (UUID) or slug slug: type: string - pattern: "^[a-zA-Z0-9_-]+$" + pattern: '^[a-zA-Z0-9_-]+$' minLength: 3 maxLength: 50 description: Optional slug; must be unique within organisation @@ -37116,7 +37116,7 @@ components: data: type: array items: - $ref: "#/components/schemas/McpServerListItem" + $ref: '#/components/schemas/McpServerListItem' total: type: integer @@ -37249,9 +37249,9 @@ components: data: type: array items: - $ref: "#/components/schemas/McpServerCapabilityItem" + $ref: '#/components/schemas/McpServerCapabilityItem' counts: - $ref: "#/components/schemas/McpServerCapabilitiesCounts" + $ref: '#/components/schemas/McpServerCapabilitiesCounts' total: type: integer has_more: @@ -37318,7 +37318,7 @@ components: data: type: array items: - $ref: "#/components/schemas/McpServerUserAccessItem" + $ref: '#/components/schemas/McpServerUserAccessItem' default_user_access: type: string enum: @@ -37380,7 +37380,7 @@ components: data: type: array items: - $ref: "#/components/schemas/McpServerConnectionItem" + $ref: '#/components/schemas/McpServerConnectionItem' total: type: integer has_more: From 08bf57ba93411892a81e935b1dea0c052d6d9773 Mon Sep 17 00:00:00 2001 From: Krishna Chandra Date: Wed, 22 Apr 2026 01:29:28 +0530 Subject: [PATCH 3/8] fix: revert all formatting changes --- openapi.yaml | 5942 +++++++++++++++++++++++++------------------------- 1 file changed, 2953 insertions(+), 2989 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 40fefa13..95d515fa 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: title: Portkey API description: The Portkey REST API. Please see https://portkey.ai/docs/api-reference for more details. - version: '2.0.0' + version: "2.0.0" termsOfService: https://portkey.ai/terms contact: name: Portkey Developer Forum @@ -150,27 +150,27 @@ paths: - Chat summary: Chat parameters: - - $ref: '#/components/parameters/PortkeyTraceId' - - $ref: '#/components/parameters/PortkeySpanId' - - $ref: '#/components/parameters/PortkeyParentSpanId' - - $ref: '#/components/parameters/PortkeySpanName' - - $ref: '#/components/parameters/PortkeyMetadata' - - $ref: '#/components/parameters/PortkeyCacheNamespace' - - $ref: '#/components/parameters/PortkeyCacheForceRefresh' + - $ref: "#/components/parameters/PortkeyTraceId" + - $ref: "#/components/parameters/PortkeySpanId" + - $ref: "#/components/parameters/PortkeyParentSpanId" + - $ref: "#/components/parameters/PortkeySpanName" + - $ref: "#/components/parameters/PortkeyMetadata" + - $ref: "#/components/parameters/PortkeyCacheNamespace" + - $ref: "#/components/parameters/PortkeyCacheForceRefresh" requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/CreateChatCompletionRequest' + $ref: "#/components/schemas/CreateChatCompletionRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/CreateChatCompletionResponse' + $ref: "#/components/schemas/CreateChatCompletionResponse" security: - Portkey-Key: [] Virtual-Key: [] @@ -319,15 +319,15 @@ paths: tags: - Realtime summary: Realtime - description: 'Connect to the Realtime API endpoint.' + description: "Connect to the Realtime API endpoint." parameters: - - $ref: '#/components/parameters/PortkeyTraceId' - - $ref: '#/components/parameters/PortkeySpanId' - - $ref: '#/components/parameters/PortkeyParentSpanId' - - $ref: '#/components/parameters/PortkeySpanName' - - $ref: '#/components/parameters/PortkeyMetadata' - - $ref: '#/components/parameters/PortkeyCacheNamespace' - - $ref: '#/components/parameters/PortkeyCacheForceRefresh' + - $ref: "#/components/parameters/PortkeyTraceId" + - $ref: "#/components/parameters/PortkeySpanId" + - $ref: "#/components/parameters/PortkeyParentSpanId" + - $ref: "#/components/parameters/PortkeySpanName" + - $ref: "#/components/parameters/PortkeyMetadata" + - $ref: "#/components/parameters/PortkeyCacheNamespace" + - $ref: "#/components/parameters/PortkeyCacheForceRefresh" - name: model in: query required: false @@ -335,7 +335,7 @@ paths: type: string description: Often required for OpenAI-style realtime; other query params pass through unchanged. responses: - '101': + "101": description: WebSocket upgrade. default: description: Error @@ -446,14 +446,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateCompletionRequest' + $ref: "#/components/schemas/CreateCompletionRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/CreateCompletionResponse' + $ref: "#/components/schemas/CreateCompletionResponse" security: - Portkey-Key: [] Virtual-Key: [] @@ -605,7 +605,7 @@ paths: required: - name responses: - '200': + "200": description: Collection created successfully content: application/json: @@ -619,15 +619,15 @@ paths: slug: type: string description: Slug of the created collection - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Workspace or parent collection not found - '500': + "500": description: Server error get: @@ -665,7 +665,7 @@ paths: type: string description: Search query to filter collections by name responses: - '200': + "200": description: List of collections content: application/json: @@ -678,16 +678,16 @@ paths: data: type: array items: - $ref: '#/components/schemas/CollectionWithDetails' - '400': + $ref: "#/components/schemas/CollectionWithDetails" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Workspace not found - '500': + "500": description: Server error /collections/{collectionId}: @@ -708,19 +708,19 @@ paths: security: - Portkey-Key: [] responses: - '200': + "200": description: Collection details content: application/json: schema: - $ref: '#/components/schemas/CollectionWithChildCollections' - '401': + $ref: "#/components/schemas/CollectionWithChildCollections" + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Collection not found - '500': + "500": description: Server error put: @@ -743,7 +743,7 @@ paths: required: - name responses: - '200': + "200": description: OK headers: Content-Type: @@ -755,15 +755,15 @@ paths: schema: type: object example: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Collection not found - '500': + "500": description: Server error delete: @@ -774,7 +774,7 @@ paths: tags: - Collections responses: - '200': + "200": description: OK headers: Content-Type: @@ -786,13 +786,13 @@ paths: schema: type: object example: {} - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Collection not found or trying to delete default collection - '500': + "500": description: Server error /labels: @@ -810,25 +810,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateLabelRequest' + $ref: "#/components/schemas/CreateLabelRequest" responses: - '200': + "200": description: Label created successfully content: application/json: schema: - $ref: '#/components/schemas/CreateLabelResponse' - '400': + $ref: "#/components/schemas/CreateLabelResponse" + "400": description: Invalid request content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '401': + $ref: "#/components/schemas/ErrorResponse" + "401": description: Unauthorized - '403': + "403": description: Forbidden - '500': + "500": description: Server error get: @@ -869,23 +869,23 @@ paths: minimum: 1 description: Number of items per page responses: - '200': + "200": description: List of labels content: application/json: schema: - $ref: '#/components/schemas/ListLabelsResponse' - '400': + $ref: "#/components/schemas/ListLabelsResponse" + "400": description: Invalid request content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '401': + $ref: "#/components/schemas/ErrorResponse" + "401": description: Unauthorized - '403': + "403": description: Forbidden - '500': + "500": description: Server error /labels/{labelId}: @@ -918,25 +918,25 @@ paths: type: string description: ID or slug of the workspace responses: - '200': + "200": description: Label details content: application/json: schema: - $ref: '#/components/schemas/Label' - '400': + $ref: "#/components/schemas/Label" + "400": description: Invalid request content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '401': + $ref: "#/components/schemas/ErrorResponse" + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Label not found - '500': + "500": description: Server error put: @@ -960,9 +960,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateLabelRequest' + $ref: "#/components/schemas/UpdateLabelRequest" responses: - '200': + "200": description: OK headers: Content-Type: @@ -974,19 +974,19 @@ paths: schema: type: object example: {} - '400': + "400": description: Invalid request content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '401': + $ref: "#/components/schemas/ErrorResponse" + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Label not found - '500': + "500": description: Server error delete: @@ -1006,7 +1006,7 @@ paths: format: uuid description: ID of the label to delete responses: - '200': + "200": description: OK headers: Content-Type: @@ -1018,19 +1018,19 @@ paths: schema: type: object example: {} - '400': + "400": description: Invalid request content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '401': + $ref: "#/components/schemas/ErrorResponse" + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Label not found - '500': + "500": description: Server err /prompts: @@ -1092,7 +1092,7 @@ paths: type: object description: Metadata for the prompt responses: - '200': + "200": description: Prompt created successfully content: application/json: @@ -1109,14 +1109,14 @@ paths: format: uuid object: type: string - enum: ['prompt'] - '400': + enum: ["prompt"] + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '500': + "500": description: Server error get: @@ -1148,7 +1148,7 @@ paths: schema: type: string responses: - '200': + "200": description: List of prompts content: application/json: @@ -1158,16 +1158,16 @@ paths: data: type: array items: - $ref: '#/components/schemas/PromptSummary' + $ref: "#/components/schemas/PromptSummary" total: type: integer - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '500': + "500": description: Server error /prompts/{promptId}: @@ -1186,21 +1186,21 @@ paths: schema: type: string responses: - '200': + "200": description: Prompt details content: application/json: schema: - $ref: '#/components/schemas/Prompt' - '400': + $ref: "#/components/schemas/Prompt" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt not found - '500': + "500": description: Server error put: @@ -1273,7 +1273,7 @@ paths: type: object description: Additional metadata for the prompt version. When `patch` is `true`, this field is optional and will be inherited from the current latest version if omitted. responses: - '200': + "200": description: Prompt updated successfully content: application/json: @@ -1288,15 +1288,15 @@ paths: prompt_version_id: type: string format: uuid - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt not found - '500': + "500": description: Server error delete: @@ -1313,22 +1313,22 @@ paths: schema: type: string responses: - '200': + "200": description: Prompt deleted successfully content: application/json: schema: type: object properties: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt not found - '500': + "500": description: Server error /prompts/{promptId}/versions: @@ -1347,23 +1347,23 @@ paths: schema: type: string responses: - '200': + "200": description: List of prompt versions content: application/json: schema: type: array items: - $ref: '#/components/schemas/PromptVersionSummary' - '400': + $ref: "#/components/schemas/PromptVersionSummary" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt not found - '500': + "500": description: Server error /prompts/{promptId}/versions/{versionId}: @@ -1388,21 +1388,21 @@ paths: type: string format: uuid responses: - '200': + "200": description: Prompt version details content: application/json: schema: - $ref: '#/components/schemas/Prompt' - '400': + $ref: "#/components/schemas/Prompt" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt version not found - '500': + "500": description: Server error put: @@ -1440,22 +1440,22 @@ paths: format: uuid description: The label to assign to this version. responses: - '200': + "200": description: Prompt version updated successfully content: application/json: schema: type: object properties: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt version not found - '500': + "500": description: Server error /prompts/{promptId}/makeDefault: @@ -1486,22 +1486,22 @@ paths: type: number description: Version Number to set as default responses: - '200': + "200": description: Default version set successfully content: application/json: schema: type: object properties: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt or version not found - '500': + "500": description: Server error /prompts/partials: @@ -1534,7 +1534,7 @@ paths: version_description: type: string responses: - '200': + "200": description: Prompt partial created successfully content: application/json: @@ -1549,13 +1549,13 @@ paths: version_id: type: string format: uuid - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '500': + "500": description: Server error get: @@ -1571,23 +1571,23 @@ paths: schema: type: string responses: - '200': + "200": description: List of prompt partials content: application/json: schema: type: array items: - $ref: '#/components/schemas/PromptPartialSummary' - '400': + $ref: "#/components/schemas/PromptPartialSummary" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Not found - '500': + "500": description: Server error /prompts/partials/{promptPartialId}: @@ -1606,21 +1606,21 @@ paths: schema: type: string responses: - '200': + "200": description: Prompt partial details content: application/json: schema: - $ref: '#/components/schemas/PromptPartial' - '400': + $ref: "#/components/schemas/PromptPartial" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt partial not found - '500': + "500": description: Server error put: @@ -1652,7 +1652,7 @@ paths: status: type: string responses: - '200': + "200": description: Prompt partial updated successfully content: application/json: @@ -1662,15 +1662,15 @@ paths: prompt_partial_version_id: type: string format: uuid - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt partial not found - '500': + "500": description: Server error delete: @@ -1687,22 +1687,22 @@ paths: schema: type: string responses: - '200': + "200": description: Prompt partial deleted successfully content: application/json: schema: type: object properties: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt partial not found - '500': + "500": description: Server error /prompts/partials/{promptPartialId}/versions: @@ -1721,23 +1721,23 @@ paths: schema: type: string responses: - '200': + "200": description: List of prompt partial versions content: application/json: schema: type: array items: - $ref: '#/components/schemas/PromptPartialVersion' - '400': + $ref: "#/components/schemas/PromptPartialVersion" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt partial not found - '500': + "500": description: Server error /prompts/partials/{promptPartialId}/makeDefault: @@ -1768,22 +1768,22 @@ paths: type: number description: Version Number to set as default responses: - '200': + "200": description: Default version set successfully content: application/json: schema: type: object properties: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Prompt partial or version not found - '500': + "500": description: Server error /prompts/{promptId}/completions: @@ -1820,18 +1820,18 @@ paths: stream: type: boolean default: False - description: 'Default: False. Set to True if you want to stream the response' + description: "Default: False. Set to True if you want to stream the response" hyperparameters: oneOf: - title: Chat Completions - $ref: '#/components/schemas/CreateChatCompletionRequest' + $ref: "#/components/schemas/CreateChatCompletionRequest" - title: Completions - $ref: '#/components/schemas/CreateCompletionRequest' + $ref: "#/components/schemas/CreateCompletionRequest" description: | **Note**: All hyperparameters are optional. Pass them at the root level, and not nested under `hyperparameters`. Their grouping here is for educational purposes only. responses: - '200': + "200": description: Successful completion response content: application/json: @@ -1847,9 +1847,9 @@ paths: body: oneOf: - title: Chat Completions - $ref: '#/components/schemas/CreateChatCompletionResponse' + $ref: "#/components/schemas/CreateChatCompletionResponse" - title: Completions - $ref: '#/components/schemas/CreateCompletionResponse' + $ref: "#/components/schemas/CreateCompletionResponse" x-code-samples: - lang: cURL @@ -1992,22 +1992,22 @@ paths: hyperparameters: oneOf: - title: Chat Completions - $ref: '#/components/schemas/CreateChatCompletionRequest' + $ref: "#/components/schemas/CreateChatCompletionRequest" - title: Completions - $ref: '#/components/schemas/CreateCompletionRequest' + $ref: "#/components/schemas/CreateCompletionRequest" description: | **Note**: All hyperparameters are optional. Pass them at the root level, and not nested under `hyperparameters`. Their grouping here is for educational purposes only. responses: - '200': + "200": description: Successful rendered prompt content: application/json: schema: - $ref: '#/components/schemas/PromptRenderResponse' + $ref: "#/components/schemas/PromptRenderResponse" x-code-samples: - - lang: 'cURL' + - lang: "cURL" label: Default source: | curl -X POST "https://api.portkey.ai/v1/prompts/YOUR_PROMPT_ID/render" \ @@ -2040,7 +2040,7 @@ paths: print(completion) - - lang: 'JavaScript' + - lang: "JavaScript" label: Default source: | import Portkey from 'portkey-ai'; @@ -2059,7 +2059,7 @@ paths: }); console.log(completion); - - lang: 'cURL' + - lang: "cURL" label: Self-Hosted source: | curl -X POST "SELF_HOSTED_GATEWAY_URL/prompts/YOUR_PROMPT_ID/render" \ @@ -2093,7 +2093,7 @@ paths: print(completion) - - lang: 'JavaScript' + - lang: "JavaScript" label: Self-Hosted source: | import Portkey from 'portkey-ai'; @@ -2126,442 +2126,442 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateGuardrailRequest' + $ref: "#/components/schemas/CreateGuardrailRequest" examples: # BASIC CATEGORY EXAMPLES jwt_authentication: - summary: '[BASIC] JWT Token Validation' + summary: "[BASIC] JWT Token Validation" value: - name: 'JWT Authentication Guard' - organisation_id: '550e8400-e29b-41d4-a716-446655440001' + name: "JWT Authentication Guard" + organisation_id: "550e8400-e29b-41d4-a716-446655440001" checks: - - id: 'default.jwt' + - id: "default.jwt" parameters: - jwksUri: 'https://example.com/.well-known/jwks.json' - headerKey: 'Authorization' - algorithms: ['RS256'] + jwksUri: "https://example.com/.well-known/jwks.json" + headerKey: "Authorization" + algorithms: ["RS256"] cacheMaxAge: 86400 clockTolerance: 5 - maxTokenAge: '1d' + maxTokenAge: "1d" actions: - onFail: 'block' - message: 'Invalid JWT token' + onFail: "block" + message: "Invalid JWT token" model_whitelist: - summary: '[BASIC] Model Whitelist Control' + summary: "[BASIC] Model Whitelist Control" value: - name: 'Allowed Models Only' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "Allowed Models Only" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'default.modelWhitelist' + - id: "default.modelWhitelist" parameters: models: [ - 'gpt-4', - 'gpt-3.5-turbo', - 'claude-3-sonnet', - 'claude-3-haiku', + "gpt-4", + "gpt-3.5-turbo", + "claude-3-sonnet", + "claude-3-haiku", ] actions: - onFail: 'block' - message: 'Model not in approved whitelist' + onFail: "block" + message: "Model not in approved whitelist" allowed_request_types: - summary: '[BASIC] Restrict to Chat and Embed Only' + summary: "[BASIC] Restrict to Chat and Embed Only" value: - name: 'Restrict to Chat and Embed Only' + name: "Restrict to Chat and Embed Only" checks: - - id: 'default.allowedRequestTypes' + - id: "default.allowedRequestTypes" parameters: - allowedTypes: ['chatComplete', 'embed'] + allowedTypes: ["chatComplete", "embed"] actions: - on_fail: 'deny' - on_success: 'continue' + on_fail: "deny" + on_success: "continue" case_validation: - summary: '[BASIC] Case Validation Checks' + summary: "[BASIC] Case Validation Checks" value: - name: 'Text Case Validation' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "Text Case Validation" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'default.isAllLowerCase' - - id: 'default.alluppercase' + - id: "default.isAllLowerCase" + - id: "default.alluppercase" parameters: not: true actions: - onFail: 'log' - message: 'Text case validation failed' + onFail: "log" + message: "Text case validation failed" content_regex: - summary: '[BASIC] Regex Pattern Matching' + summary: "[BASIC] Regex Pattern Matching" value: - name: 'Content Pattern Validation' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "Content Pattern Validation" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'default.regexMatch' + - id: "default.regexMatch" parameters: rule: "\\b(inappropriate|banned|harmful|offensive)\\b" not: false - - id: 'default.endsWith' + - id: "default.endsWith" parameters: - suffix: '.' + suffix: "." not: false actions: - onFail: 'block' - message: 'Content violates pattern rules' + onFail: "block" + message: "Content violates pattern rules" length_controls: - summary: '[BASIC] Content Length Controls' + summary: "[BASIC] Content Length Controls" value: - name: 'Content Length Validation' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "Content Length Validation" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'default.wordCount' + - id: "default.wordCount" parameters: minWords: 5 maxWords: 500 not: false - - id: 'default.sentenceCount' + - id: "default.sentenceCount" parameters: minSentences: 1 maxSentences: 20 not: false - - id: 'default.characterCount' + - id: "default.characterCount" parameters: minCharacters: 10 maxCharacters: 4000 not: false actions: - onFail: 'block' - message: 'Content length out of bounds' + onFail: "block" + message: "Content length out of bounds" json_validation: - summary: '[BASIC] JSON Structure Validation' + summary: "[BASIC] JSON Structure Validation" value: - name: 'JSON Response Validation' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "JSON Response Validation" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'default.jsonSchema' + - id: "default.jsonSchema" parameters: schema: - type: 'object' + type: "object" properties: result: - type: 'string' + type: "string" confidence: - type: 'number' + type: "number" minimum: 0 maximum: 1 metadata: - type: 'object' - required: ['result'] + type: "object" + required: ["result"] not: false - - id: 'default.jsonKeys' + - id: "default.jsonKeys" parameters: - keys: ['result', 'timestamp', 'id'] - operator: 'all' + keys: ["result", "timestamp", "id"] + operator: "all" actions: - onFail: 'block' - message: 'Response does not match expected format' + onFail: "block" + message: "Response does not match expected format" content_analysis: - summary: '[BASIC] Content Analysis Checks' + summary: "[BASIC] Content Analysis Checks" value: - name: 'Content Quality Checks' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "Content Quality Checks" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'default.contains' + - id: "default.contains" parameters: - words: ['please', 'thank you', 'help'] - operator: 'any' - - id: 'default.validUrls' + words: ["please", "thank you", "help"] + operator: "any" + - id: "default.validUrls" parameters: onlyDNS: true not: false - - id: 'default.containsCode' + - id: "default.containsCode" parameters: - format: 'SQL' + format: "SQL" not: true actions: - onFail: 'warn' - message: 'Content quality check failed' + onFail: "warn" + message: "Content quality check failed" webhook_integration: - summary: '[BASIC] Custom Webhook Validation' + summary: "[BASIC] Custom Webhook Validation" value: - name: 'External Validation Service' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "External Validation Service" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'default.webhook' + - id: "default.webhook" parameters: - webhookURL: 'https://api.example.com/validate-content' + webhookURL: "https://api.example.com/validate-content" headers: - 'Authorization': 'Bearer token123' - 'Content-Type': 'application/json' - 'X-API-Version': 'v1' + "Authorization": "Bearer token123" + "Content-Type": "application/json" + "X-API-Version": "v1" timeout: 5000 failOnError: true actions: - onFail: 'block' - message: 'External validation failed' + onFail: "block" + message: "External validation failed" metadata_validation: - summary: '[BASIC] Required Metadata Keys' + summary: "[BASIC] Required Metadata Keys" value: - name: 'Metadata Requirement Check' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "Metadata Requirement Check" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'default.requiredMetadataKeys' + - id: "default.requiredMetadataKeys" parameters: - metadataKeys: ['user_id', 'session_id', 'request_type'] - operator: 'all' + metadataKeys: ["user_id", "session_id", "request_type"] + operator: "all" actions: - onFail: 'block' - message: 'Required metadata missing' + onFail: "block" + message: "Required metadata missing" # PRO CATEGORY EXAMPLES portkey_moderation: - summary: '[PRO] OpenAI Content Moderation' + summary: "[PRO] OpenAI Content Moderation" value: - name: 'Advanced Content Moderation' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "Advanced Content Moderation" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'portkey.moderateContent' + - id: "portkey.moderateContent" parameters: categories: [ - 'hate/threatening', - 'harassment/threatening', - 'self-harm/intent', - 'sexual/minors', - 'violence/graphic', + "hate/threatening", + "harassment/threatening", + "self-harm/intent", + "sexual/minors", + "violence/graphic", ] timeout: 5000 actions: - onFail: 'block' - message: 'Content flagged by moderation system' + onFail: "block" + message: "Content flagged by moderation system" portkey_language: - summary: '[PRO] Language Detection & Validation' + summary: "[PRO] Language Detection & Validation" value: - name: 'Multi-Language Support' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "Multi-Language Support" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'portkey.language' + - id: "portkey.language" parameters: - language: 'eng_Latn' + language: "eng_Latn" not: false timeout: 5000 actions: - onFail: 'block' - message: 'Content not in expected language' + onFail: "block" + message: "Content not in expected language" portkey_pii: - summary: '[PRO] Advanced PII Detection' + summary: "[PRO] Advanced PII Detection" value: - name: 'PII Protection System' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "PII Protection System" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'portkey.pii' + - id: "portkey.pii" parameters: redact: true categories: [ - 'EMAIL_ADDRESS', - 'PHONE_NUMBER', - 'SSN', - 'CREDIT_CARD', - 'NAME', + "EMAIL_ADDRESS", + "PHONE_NUMBER", + "SSN", + "CREDIT_CARD", + "NAME", ] timeout: 5000 actions: - onFail: 'block' - message: 'PII detected and redacted' + onFail: "block" + message: "PII detected and redacted" portkey_gibberish: - summary: '[PRO] Gibberish Detection' + summary: "[PRO] Gibberish Detection" value: - name: 'Content Quality Filter' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "Content Quality Filter" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'portkey.gibberish' + - id: "portkey.gibberish" parameters: timeout: 5000 actions: - onFail: 'block' - message: 'Content appears to be gibberish' + onFail: "block" + message: "Content appears to be gibberish" # PARTNER CATEGORY EXAMPLES sydelabs_security: - summary: '[PARTNER] SydeLabs AI Security' + summary: "[PARTNER] SydeLabs AI Security" value: - name: 'AI Security Suite' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "AI Security Suite" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'sydelabs.sydeguard' + - id: "sydelabs.sydeguard" parameters: prompt_injection_threshold: 0.5 toxicity_threshold: 0.3 evasion_threshold: 0.6 timeout: 5000 actions: - onFail: 'block' - message: 'AI security check failed' + onFail: "block" + message: "AI security check failed" aporia_validation: - summary: '[PARTNER] Aporia Project Validation' + summary: "[PARTNER] Aporia Project Validation" value: - name: 'Aporia Policy Enforcement' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "Aporia Policy Enforcement" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'aporia.validateProject' + - id: "aporia.validateProject" parameters: - projectID: 'proj_abc123' + projectID: "proj_abc123" timeout: 5000 actions: - onFail: 'block' - message: 'Aporia validation failed' + onFail: "block" + message: "Aporia validation failed" pillar_scanning: - summary: '[PARTNER] Pillar Security Scanning' + summary: "[PARTNER] Pillar Security Scanning" value: - name: 'Comprehensive Security Scan' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "Comprehensive Security Scan" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'pillar.scanPrompt' + - id: "pillar.scanPrompt" parameters: scanners: [ - 'prompt_injection', - 'pii', - 'secrets', - 'toxic_language', - 'invisible_characters', + "prompt_injection", + "pii", + "secrets", + "toxic_language", + "invisible_characters", ] timeout: 5000 - - id: 'pillar.scanResponse' + - id: "pillar.scanResponse" parameters: - scanners: ['pii', 'secrets', 'toxic_language'] + scanners: ["pii", "secrets", "toxic_language"] timeout: 5000 actions: - onFail: 'block' - message: 'Security scan detected issues' + onFail: "block" + message: "Security scan detected issues" patronus_comprehensive: - summary: '[PARTNER] Patronus AI Complete Suite' + summary: "[PARTNER] Patronus AI Complete Suite" value: - name: 'Patronus Content Analysis' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "Patronus Content Analysis" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'patronus.pii' + - id: "patronus.pii" parameters: redact: true timeout: 5000 - - id: 'patronus.toxicity' + - id: "patronus.toxicity" parameters: timeout: 5000 - - id: 'patronus.noGenderBias' + - id: "patronus.noGenderBias" parameters: timeout: 15000 - - id: 'patronus.isHelpful' + - id: "patronus.isHelpful" parameters: timeout: 15000 - - id: 'patronus.custom' + - id: "patronus.custom" parameters: - profile: 'system:is-concise' + profile: "system:is-concise" timeout: 15000 actions: - onFail: 'block' - message: 'Content failed Patronus analysis' + onFail: "block" + message: "Content failed Patronus analysis" azure_content_safety: - summary: '[PARTNER] Azure Content Safety Suite' + summary: "[PARTNER] Azure Content Safety Suite" value: - name: 'Microsoft Azure Safety' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "Microsoft Azure Safety" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'azure.contentSafety' + - id: "azure.contentSafety" parameters: - blocklistNames: ['company_blocklist'] - apiVersion: '2024-09-01' + blocklistNames: ["company_blocklist"] + apiVersion: "2024-09-01" severity: 2 - categories: ['Hate', 'SelfHarm', 'Sexual', 'Violence'] + categories: ["Hate", "SelfHarm", "Sexual", "Violence"] timeout: 5000 - - id: 'azure.pii' + - id: "azure.pii" parameters: - domain: 'phi' - apiVersion: '2024-11-01' - modelVersion: 'latest' + domain: "phi" + apiVersion: "2024-11-01" + modelVersion: "latest" redact: true timeout: 5000 actions: - onFail: 'block' - message: 'Azure safety checks failed' + onFail: "block" + message: "Azure safety checks failed" mistral_moderation: - summary: '[PARTNER] Mistral Content Moderation' + summary: "[PARTNER] Mistral Content Moderation" value: - name: 'Mistral AI Moderation' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "Mistral AI Moderation" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'mistral.moderateContent' + - id: "mistral.moderateContent" parameters: categories: [ - 'sexual', - 'hate_and_discrimination', - 'violence_and_threats', - 'selfharm', - 'pii', + "sexual", + "hate_and_discrimination", + "violence_and_threats", + "selfharm", + "pii", ] timeout: 5000 actions: - onFail: 'block' - message: 'Mistral moderation flagged content' + onFail: "block" + message: "Mistral moderation flagged content" bedrock_enterprise: - summary: '[PARTNER] AWS Bedrock Guardrails' + summary: "[PARTNER] AWS Bedrock Guardrails" value: - name: 'Enterprise AWS Security' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "Enterprise AWS Security" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'bedrock.guard' + - id: "bedrock.guard" parameters: - guardrailVersion: 'DRAFT' - guardrailId: 'gdrail123abc' + guardrailVersion: "DRAFT" + guardrailId: "gdrail123abc" redact: true timeout: 5000 actions: - onFail: 'block' - message: 'AWS Bedrock guardrail violation' + onFail: "block" + message: "AWS Bedrock guardrail violation" promptfoo_testing: - summary: '[PARTNER] Promptfoo Security Testing' + summary: "[PARTNER] Promptfoo Security Testing" value: - name: 'Security Testing Suite' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "Security Testing Suite" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'promptfoo.guard' + - id: "promptfoo.guard" parameters: timeout: 5000 - - id: 'promptfoo.pii' + - id: "promptfoo.pii" parameters: redact: true timeout: 5000 - - id: 'promptfoo.harm' + - id: "promptfoo.harm" parameters: timeout: 5000 actions: - onFail: 'block' - message: 'Promptfoo security tests failed' + onFail: "block" + message: "Promptfoo security tests failed" acuvity_comprehensive: - summary: '[PARTNER] Acuvity Multi-Vector Security' + summary: "[PARTNER] Acuvity Multi-Vector Security" value: - name: 'Complete Security Analysis' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "Complete Security Analysis" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'acuvity.scan' + - id: "acuvity.scan" parameters: prompt_injection: true prompt_injection_threshold: 0.5 @@ -2573,72 +2573,72 @@ paths: biased: true harmful: true language: true - language_values: 'english' + language_values: "english" pii: true pii_redact: true - pii_categories: ['email_address', 'ssn', 'credit_card'] + pii_categories: ["email_address", "ssn", "credit_card"] secrets: true secrets_redact: true secrets_categories: - ['aws_secret_key', 'openai', 'github'] + ["aws_secret_key", "openai", "github"] timeout: 5000 actions: - onFail: 'block' - message: 'Comprehensive security scan failed' + onFail: "block" + message: "Comprehensive security scan failed" lasso_classification: - summary: '[PARTNER] Lasso Security Classification' + summary: "[PARTNER] Lasso Security Classification" value: - name: 'Content Classification' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "Content Classification" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'lasso.classify' + - id: "lasso.classify" parameters: timeout: 5000 actions: - onFail: 'block' - message: 'Lasso classification failed' + onFail: "block" + message: "Lasso classification failed" panw_prisma: - summary: '[PARTNER] PANW Prisma AIRS Enterprise' + summary: "[PARTNER] PANW Prisma AIRS Enterprise" value: - name: 'Enterprise Security Runtime' - workspace_id: '550e8400-e29b-41d4-a716-446655440000' + name: "Enterprise Security Runtime" + workspace_id: "550e8400-e29b-41d4-a716-446655440000" checks: - - id: 'panw-prisma-airs.intercept' + - id: "panw-prisma-airs.intercept" parameters: - profile_name: 'enterprise_profile' - ai_model: 'gpt-4' - app_user: 'api_user_123' + profile_name: "enterprise_profile" + ai_model: "gpt-4" + app_user: "api_user_123" actions: - onFail: 'block' - message: 'Prisma AIRS blocked request' + onFail: "block" + message: "Prisma AIRS blocked request" responses: - '200': + "200": description: Guardrail created successfully content: application/json: schema: - $ref: '#/components/schemas/CreateGuardrailResponse' - '400': + $ref: "#/components/schemas/CreateGuardrailResponse" + "400": description: Bad request - validation failed content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden - insufficient permissions or guardrail not allowed content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" get: summary: List guardrails @@ -2675,24 +2675,24 @@ paths: minimum: 0 default: 0 responses: - '200': + "200": description: List of guardrails retrieved successfully content: application/json: schema: - $ref: '#/components/schemas/ListGuardrailsResponse' - '400': + $ref: "#/components/schemas/ListGuardrailsResponse" + "400": description: Bad request - invalid parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden - insufficient permissions content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" /guardrails/{guardrailId}: get: @@ -2711,29 +2711,29 @@ paths: examples: uuid: summary: Using UUID - value: '550e8400-e29b-41d4-a716-446655440000' + value: "550e8400-e29b-41d4-a716-446655440000" slug: summary: Using slug - value: 'guard_abc123' + value: "guard_abc123" responses: - '200': + "200": description: Guardrail details retrieved successfully content: application/json: schema: - $ref: '#/components/schemas/GuardrailDetails' - '403': + $ref: "#/components/schemas/GuardrailDetails" + "403": description: Forbidden - guardrail not found or insufficient permissions content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" put: summary: Update a guardrail @@ -2753,26 +2753,26 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateGuardrailRequest' + $ref: "#/components/schemas/UpdateGuardrailRequest" responses: - '200': + "200": description: Guardrail updated successfully content: application/json: schema: - $ref: '#/components/schemas/UpdateGuardrailResponse' - '400': + $ref: "#/components/schemas/UpdateGuardrailResponse" + "400": description: Bad request - validation failed content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden - guardrail not found or insufficient permissions content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" delete: summary: Delete a guardrail @@ -2788,20 +2788,20 @@ paths: schema: type: string responses: - '200': + "200": description: Guardrail deleted successfully - '403': + "403": description: Forbidden - guardrail not found or insufficient permissions content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" /images/generations: servers: *DataPlaneServers @@ -2815,14 +2815,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateImageRequest' + $ref: "#/components/schemas/CreateImageRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ImagesResponse' + $ref: "#/components/schemas/ImagesResponse" security: - Portkey-Key: [] Virtual-Key: [] @@ -2946,14 +2946,14 @@ paths: content: multipart/form-data: schema: - $ref: '#/components/schemas/CreateImageEditRequest' + $ref: "#/components/schemas/CreateImageEditRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ImagesResponse' + $ref: "#/components/schemas/ImagesResponse" security: - Portkey-Key: [] Virtual-Key: [] @@ -3086,14 +3086,14 @@ paths: content: multipart/form-data: schema: - $ref: '#/components/schemas/CreateImageVariationRequest' + $ref: "#/components/schemas/CreateImageVariationRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ImagesResponse' + $ref: "#/components/schemas/ImagesResponse" security: - Portkey-Key: [] Virtual-Key: [] @@ -3214,14 +3214,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateEmbeddingRequest' + $ref: "#/components/schemas/CreateEmbeddingRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/CreateEmbeddingResponse' + $ref: "#/components/schemas/CreateEmbeddingResponse" security: - Portkey-Key: [] Virtual-Key: [] @@ -3350,24 +3350,24 @@ paths: Reranking is useful for improving search results by scoring and sorting documents based on semantic relevance to a query, rather than just keyword matching. parameters: - - $ref: '#/components/parameters/PortkeyTraceId' - - $ref: '#/components/parameters/PortkeySpanId' - - $ref: '#/components/parameters/PortkeyParentSpanId' - - $ref: '#/components/parameters/PortkeySpanName' - - $ref: '#/components/parameters/PortkeyMetadata' + - $ref: "#/components/parameters/PortkeyTraceId" + - $ref: "#/components/parameters/PortkeySpanId" + - $ref: "#/components/parameters/PortkeyParentSpanId" + - $ref: "#/components/parameters/PortkeySpanName" + - $ref: "#/components/parameters/PortkeyMetadata" requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/CreateRerankRequest' + $ref: "#/components/schemas/CreateRerankRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/CreateRerankResponse' + $ref: "#/components/schemas/CreateRerankResponse" security: - Portkey-Key: [] Virtual-Key: [] @@ -3529,9 +3529,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateSpeechRequest' + $ref: "#/components/schemas/CreateSpeechRequest" responses: - '200': + "200": description: OK headers: Transfer-Encoding: @@ -3685,16 +3685,16 @@ paths: content: multipart/form-data: schema: - $ref: '#/components/schemas/CreateTranscriptionRequest' + $ref: "#/components/schemas/CreateTranscriptionRequest" responses: - '200': + "200": description: OK content: application/json: schema: oneOf: - - $ref: '#/components/schemas/CreateTranscriptionResponseJson' - - $ref: '#/components/schemas/CreateTranscriptionResponseVerboseJson' + - $ref: "#/components/schemas/CreateTranscriptionResponseJson" + - $ref: "#/components/schemas/CreateTranscriptionResponseVerboseJson" security: - Portkey-Key: [] @@ -3818,16 +3818,16 @@ paths: content: multipart/form-data: schema: - $ref: '#/components/schemas/CreateTranslationRequest' + $ref: "#/components/schemas/CreateTranslationRequest" responses: - '200': + "200": description: OK content: application/json: schema: oneOf: - - $ref: '#/components/schemas/CreateTranslationResponseJson' - - $ref: '#/components/schemas/CreateTranslationResponseVerboseJson' + - $ref: "#/components/schemas/CreateTranslationResponseJson" + - $ref: "#/components/schemas/CreateTranslationResponseVerboseJson" security: - Portkey-Key: [] @@ -3954,12 +3954,12 @@ paths: type: string description: Only return files with the given purpose. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ListFilesResponse' + $ref: "#/components/schemas/ListFilesResponse" security: - Portkey-Key: [] @@ -4020,14 +4020,14 @@ paths: content: multipart/form-data: schema: - $ref: '#/components/schemas/CreateFileRequest' + $ref: "#/components/schemas/CreateFileRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/OpenAIFile' + $ref: "#/components/schemas/OpenAIFile" security: - Portkey-Key: [] @@ -4099,12 +4099,12 @@ paths: type: string description: The ID of the file to use for this request. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/DeleteFileResponse' + $ref: "#/components/schemas/DeleteFileResponse" security: - Portkey-Key: [] @@ -4166,12 +4166,12 @@ paths: type: string description: The ID of the file to use for this request. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/OpenAIFile' + $ref: "#/components/schemas/OpenAIFile" security: - Portkey-Key: [] @@ -4234,7 +4234,7 @@ paths: type: string description: The ID of the file to use for this request. responses: - '200': + "200": description: OK content: application/json: @@ -4295,12 +4295,12 @@ paths: description: Finetune a provider model parameters: [] responses: - '200': + "200": description: The request has succeeded. content: application/json: schema: - $ref: '#/components/schemas/FineTuningJob' + $ref: "#/components/schemas/FineTuningJob" tags: - Finetune requestBody: @@ -4309,9 +4309,9 @@ paths: application/json: schema: anyOf: - - $ref: '#/components/schemas/OpenAIFinetuneJob' - - $ref: '#/components/schemas/BedrockFinetuneJob' - - $ref: '#/components/schemas/PortkeyFinetuneJob' + - $ref: "#/components/schemas/OpenAIFinetuneJob" + - $ref: "#/components/schemas/BedrockFinetuneJob" + - $ref: "#/components/schemas/PortkeyFinetuneJob" security: - Portkey-Key: [] @@ -4439,12 +4439,12 @@ paths: type: integer default: 20 responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ListPaginatedFineTuningJobsResponse' + $ref: "#/components/schemas/ListPaginatedFineTuningJobsResponse" security: - Portkey-Key: [] @@ -4555,12 +4555,12 @@ paths: description: | The ID of the fine-tuning job. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/FineTuningJob' + $ref: "#/components/schemas/FineTuningJob" security: - Portkey-Key: [] @@ -4678,12 +4678,12 @@ paths: type: integer default: 20 responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ListFineTuningJobEventsResponse' + $ref: "#/components/schemas/ListFineTuningJobEventsResponse" security: - Portkey-Key: [] @@ -4798,12 +4798,12 @@ paths: description: | The ID of the fine-tuning job to cancel. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/FineTuningJob' + $ref: "#/components/schemas/FineTuningJob" security: - Portkey-Key: [] @@ -4919,12 +4919,12 @@ paths: type: integer default: 10 responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ListFineTuningJobCheckpointsResponse' + $ref: "#/components/schemas/ListFineTuningJobCheckpointsResponse" security: - Portkey-Key: [] @@ -5062,20 +5062,20 @@ paths: enum: [asc, desc] default: asc responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ListModelsResponse' + $ref: "#/components/schemas/ListModelsResponse" example: - object: 'list' + object: "list" total: 500 data: - - id: '@ai-provider-slug/gpt-5' - slug: 'gpt-5' - canonical_slug: 'gpt-5' - object: 'model' + - id: "@ai-provider-slug/gpt-5" + slug: "gpt-5" + canonical_slug: "gpt-5" + object: "model" security: - Portkey-Key: [] x-code-samples: @@ -5172,12 +5172,12 @@ paths: example: gpt-3.5-turbo description: The ID of the model to use for this request responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/Model' + $ref: "#/components/schemas/Model" security: - Portkey-Key: [] @@ -5239,12 +5239,12 @@ paths: example: ft:gpt-3.5-turbo:acemeco:suffix:abc123 description: The model to delete responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/DeleteModelResponse' + $ref: "#/components/schemas/DeleteModelResponse" security: - Portkey-Key: [] @@ -5305,14 +5305,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateModerationRequest' + $ref: "#/components/schemas/CreateModerationRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/CreateModerationResponse' + $ref: "#/components/schemas/CreateModerationResponse" security: - Portkey-Key: [] @@ -5430,7 +5430,7 @@ paths: schema: type: string default: desc - enum: ['asc', 'desc'] + enum: ["asc", "desc"] - name: after in: query description: &pagination_after_param_description | @@ -5444,12 +5444,12 @@ paths: schema: type: string responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ListAssistantsResponse' + $ref: "#/components/schemas/ListAssistantsResponse" security: - Portkey-Key: [] @@ -5570,14 +5570,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateAssistantRequest' + $ref: "#/components/schemas/CreateAssistantRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/AssistantObject' + $ref: "#/components/schemas/AssistantObject" security: - Portkey-Key: [] @@ -5678,12 +5678,12 @@ paths: type: string description: The ID of the assistant to retrieve. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/AssistantObject' + $ref: "#/components/schemas/AssistantObject" security: - Portkey-Key: [] @@ -5771,14 +5771,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ModifyAssistantRequest' + $ref: "#/components/schemas/ModifyAssistantRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/AssistantObject' + $ref: "#/components/schemas/AssistantObject" security: - Portkey-Key: [] @@ -5886,12 +5886,12 @@ paths: type: string description: The ID of the assistant to delete. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/DeleteAssistantResponse' + $ref: "#/components/schemas/DeleteAssistantResponse" security: - Portkey-Key: [] @@ -5960,17 +5960,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateResponse' + $ref: "#/components/schemas/CreateResponse" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" text/event-stream: schema: - $ref: '#/components/schemas/ResponseStreamEvent' + $ref: "#/components/schemas/ResponseStreamEvent" /responses/{response_id}: servers: *DataPlaneServers get: @@ -5992,7 +5992,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/Includable' + $ref: "#/components/schemas/Includable" description: > Specify additional output data to include in the response. Currently @@ -6006,12 +6006,12 @@ paths: - `computer_call_output.output.image_url`: Include image urls from the computer call output. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" delete: operationId: deleteResponse tags: @@ -6027,14 +6027,14 @@ paths: example: resp_677efb5139a88190b512bc3fef8e535d description: The ID of the response to delete. responses: - '200': + "200": description: OK - '404': + "404": description: Not Found content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: "#/components/schemas/Error" /responses/{response_id}/input_items: servers: *DataPlaneServers get: @@ -6084,12 +6084,12 @@ paths: description: | An item ID to list items before, used in pagination. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ResponseItemList' + $ref: "#/components/schemas/ResponseItemList" /threads: servers: *DataPlaneServers post: @@ -6101,14 +6101,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateThreadRequest' + $ref: "#/components/schemas/CreateThreadRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ThreadObject' + $ref: "#/components/schemas/ThreadObject" security: - Portkey-Key: [] @@ -6214,12 +6214,12 @@ paths: type: string description: The ID of the thread to retrieve. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ThreadObject' + $ref: "#/components/schemas/ThreadObject" security: - Portkey-Key: [] @@ -6300,14 +6300,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ModifyThreadRequest' + $ref: "#/components/schemas/ModifyThreadRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ThreadObject' + $ref: "#/components/schemas/ThreadObject" security: - Portkey-Key: [] @@ -6398,12 +6398,12 @@ paths: type: string description: The ID of the thread to delete. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/DeleteThreadResponse' + $ref: "#/components/schemas/DeleteThreadResponse" security: - Portkey-Key: [] @@ -6487,7 +6487,7 @@ paths: schema: type: string default: desc - enum: ['asc', 'desc'] + enum: ["asc", "desc"] - name: after in: query description: *pagination_after_param_description @@ -6505,12 +6505,12 @@ paths: schema: type: string responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ListMessagesResponse' + $ref: "#/components/schemas/ListMessagesResponse" security: - Portkey-Key: [] @@ -6628,14 +6628,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateMessageRequest' + $ref: "#/components/schemas/CreateMessageRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/MessageObject' + $ref: "#/components/schemas/MessageObject" security: - Portkey-Key: [] @@ -6739,12 +6739,12 @@ paths: type: string description: The ID of the message to retrieve. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/MessageObject' + $ref: "#/components/schemas/MessageObject" security: - Portkey-Key: [] @@ -6844,14 +6844,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ModifyMessageRequest' + $ref: "#/components/schemas/ModifyMessageRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/MessageObject' + $ref: "#/components/schemas/MessageObject" security: - Portkey-Key: [] @@ -6961,12 +6961,12 @@ paths: type: string description: The ID of the message to delete. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/DeleteMessageResponse' + $ref: "#/components/schemas/DeleteMessageResponse" security: - Portkey-Key: [] @@ -7039,14 +7039,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateThreadAndRunRequest' + $ref: "#/components/schemas/CreateThreadAndRunRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/RunObject' + $ref: "#/components/schemas/RunObject" security: - Portkey-Key: [] @@ -7181,7 +7181,7 @@ paths: schema: type: string default: desc - enum: ['asc', 'desc'] + enum: ["asc", "desc"] - name: after in: query description: *pagination_after_param_description @@ -7193,12 +7193,12 @@ paths: schema: type: string responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ListRunsResponse' + $ref: "#/components/schemas/ListRunsResponse" security: - Portkey-Key: [] @@ -7373,7 +7373,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateRunRequest' + $ref: "#/components/schemas/CreateRunRequest" security: - Portkey-Key: [] @@ -7389,12 +7389,12 @@ paths: Custom-Host: [] responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/RunObject' + $ref: "#/components/schemas/RunObject" x-code-samples: - lang: curl source: | @@ -7498,12 +7498,12 @@ paths: type: string description: The ID of the run to retrieve. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/RunObject' + $ref: "#/components/schemas/RunObject" security: - Portkey-Key: [] @@ -7622,14 +7622,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ModifyRunRequest' + $ref: "#/components/schemas/ModifyRunRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/RunObject' + $ref: "#/components/schemas/RunObject" security: - Portkey-Key: [] @@ -7774,14 +7774,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SubmitToolOutputsRunRequest' + $ref: "#/components/schemas/SubmitToolOutputsRunRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/RunObject' + $ref: "#/components/schemas/RunObject" security: - Portkey-Key: [] @@ -7935,12 +7935,12 @@ paths: type: string description: The ID of the run to cancel. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/RunObject' + $ref: "#/components/schemas/RunObject" security: - Portkey-Key: [] @@ -8065,7 +8065,7 @@ paths: schema: type: string default: desc - enum: ['asc', 'desc'] + enum: ["asc", "desc"] - name: after in: query description: *pagination_after_param_description @@ -8077,12 +8077,12 @@ paths: schema: type: string responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ListRunStepsResponse' + $ref: "#/components/schemas/ListRunStepsResponse" security: - Portkey-Key: [] @@ -8201,12 +8201,12 @@ paths: type: string description: The ID of the run step to retrieve. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/RunStepObject' + $ref: "#/components/schemas/RunStepObject" security: - Portkey-Key: [] @@ -8312,7 +8312,7 @@ paths: schema: type: string default: desc - enum: ['asc', 'desc'] + enum: ["asc", "desc"] - name: after in: query description: *pagination_after_param_description @@ -8324,12 +8324,12 @@ paths: schema: type: string responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ListVectorStoresResponse' + $ref: "#/components/schemas/ListVectorStoresResponse" security: - Portkey-Key: [] @@ -8425,14 +8425,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateVectorStoreRequest' + $ref: "#/components/schemas/CreateVectorStoreRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/VectorStoreObject' + $ref: "#/components/schemas/VectorStoreObject" security: - Portkey-Key: [] @@ -8518,12 +8518,12 @@ paths: type: string description: The ID of the vector store to retrieve. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/VectorStoreObject' + $ref: "#/components/schemas/VectorStoreObject" security: - Portkey-Key: [] @@ -8599,14 +8599,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateVectorStoreRequest' + $ref: "#/components/schemas/UpdateVectorStoreRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/VectorStoreObject' + $ref: "#/components/schemas/VectorStoreObject" security: - Portkey-Key: [] @@ -8695,12 +8695,12 @@ paths: type: string description: The ID of the vector store to delete. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/DeleteVectorStoreResponse' + $ref: "#/components/schemas/DeleteVectorStoreResponse" security: - Portkey-Key: [] @@ -8787,7 +8787,7 @@ paths: schema: type: string default: desc - enum: ['asc', 'desc'] + enum: ["asc", "desc"] - name: after in: query description: *pagination_after_param_description @@ -8800,17 +8800,17 @@ paths: type: string - name: filter in: query - description: 'Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.' + description: "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`." schema: type: string - enum: ['in_progress', 'completed', 'failed', 'cancelled'] + enum: ["in_progress", "completed", "failed", "cancelled"] responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ListVectorStoreFilesResponse' + $ref: "#/components/schemas/ListVectorStoreFilesResponse" security: - Portkey-Key: [] @@ -8903,14 +8903,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateVectorStoreFileRequest' + $ref: "#/components/schemas/CreateVectorStoreFileRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileObject' + $ref: "#/components/schemas/VectorStoreFileObject" security: - Portkey-Key: [] @@ -9003,12 +9003,12 @@ paths: example: file-abc123 description: The ID of the file being retrieved. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileObject' + $ref: "#/components/schemas/VectorStoreFileObject" security: - Portkey-Key: [] @@ -9091,12 +9091,12 @@ paths: type: string description: The ID of the file to delete. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/DeleteVectorStoreFileResponse' + $ref: "#/components/schemas/DeleteVectorStoreFileResponse" security: - Portkey-Key: [] @@ -9179,14 +9179,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateVectorStoreFileBatchRequest' + $ref: "#/components/schemas/CreateVectorStoreFileBatchRequest" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + $ref: "#/components/schemas/VectorStoreFileBatchObject" security: - Portkey-Key: [] @@ -9284,12 +9284,12 @@ paths: example: vsfb_abc123 description: The ID of the file batch being retrieved. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + $ref: "#/components/schemas/VectorStoreFileBatchObject" security: - Portkey-Key: [] @@ -9380,12 +9380,12 @@ paths: type: string description: The ID of the file batch to cancel. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + $ref: "#/components/schemas/VectorStoreFileBatchObject" security: - Portkey-Key: [] @@ -9489,7 +9489,7 @@ paths: schema: type: string default: desc - enum: ['asc', 'desc'] + enum: ["asc", "desc"] - name: after in: query description: *pagination_after_param_description @@ -9502,17 +9502,17 @@ paths: type: string - name: filter in: query - description: 'Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.' + description: "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`." schema: type: string - enum: ['in_progress', 'completed', 'failed', 'cancelled'] + enum: ["in_progress", "completed", "failed", "cancelled"] responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ListVectorStoreFilesResponse' + $ref: "#/components/schemas/ListVectorStoreFilesResponse" security: - Portkey-Key: [] @@ -9602,17 +9602,17 @@ paths: application/json: schema: anyOf: - - $ref: '#/components/schemas/OpenAIBatchJob' - - $ref: '#/components/schemas/BedrockBatchJob' - - $ref: '#/components/schemas/VertexBatchJob' - - $ref: '#/components/schemas/PortkeyBatchJob' + - $ref: "#/components/schemas/OpenAIBatchJob" + - $ref: "#/components/schemas/BedrockBatchJob" + - $ref: "#/components/schemas/VertexBatchJob" + - $ref: "#/components/schemas/PortkeyBatchJob" responses: - '200': + "200": description: Batch created successfully. content: application/json: schema: - $ref: '#/components/schemas/Batch' + $ref: "#/components/schemas/Batch" security: - Portkey-Key: [] @@ -9747,12 +9747,12 @@ paths: type: integer default: 20 responses: - '200': + "200": description: Batch listed successfully. content: application/json: schema: - $ref: '#/components/schemas/ListBatchesResponse' + $ref: "#/components/schemas/ListBatchesResponse" security: - Portkey-Key: [] @@ -9860,7 +9860,7 @@ paths: type: string description: The ID of the batch to retrieve output for. responses: - '200': + "200": description: Batch output returned successfully. content: application/octet-stream: @@ -9970,12 +9970,12 @@ paths: type: string description: The ID of the batch to retrieve. responses: - '200': + "200": description: Batch retrieved successfully. content: application/json: schema: - $ref: '#/components/schemas/Batch' + $ref: "#/components/schemas/Batch" security: - Portkey-Key: [] @@ -10079,12 +10079,12 @@ paths: type: string description: The ID of the batch to cancel. responses: - '200': + "200": description: Batch is cancelling. Returns the cancelling batch's details. content: application/json: schema: - $ref: '#/components/schemas/Batch' + $ref: "#/components/schemas/Batch" security: - Portkey-Key: [] @@ -10183,7 +10183,7 @@ paths: - Configs operationId: listConfigs responses: - '200': + "200": description: A list of configs content: application/json: @@ -10230,21 +10230,21 @@ paths: example-1: value: { - 'success': true, - 'data': + "success": true, + "data": [ { - 'id': '4e54a1a4-109c-43ee-b0f7-11e7d60b0066', - 'name': 'Pplx Cache Test', - 'slug': 'pc-pplx-c-ca7a87', - 'organisation_id': '472d2804-d054-4226-b4ae-9d4e2e61e69e', - 'workspace_id': '472d2804-d054-4226-b4ae-9d4e2e61e69e', - 'is_default': 0, - 'status': 'active', - 'owner_id': 'c4c7996d-be62-429d-b787-5d48fe94da86', - 'updated_by': '439268ba-94a2-4031-9ca7-ca88ddda5096', - 'created_at': '2024-05-12T21:37:06.000Z', - 'last_updated_at': '2024-05-23T23:36:06.000Z', + "id": "4e54a1a4-109c-43ee-b0f7-11e7d60b0066", + "name": "Pplx Cache Test", + "slug": "pc-pplx-c-ca7a87", + "organisation_id": "472d2804-d054-4226-b4ae-9d4e2e61e69e", + "workspace_id": "472d2804-d054-4226-b4ae-9d4e2e61e69e", + "is_default": 0, + "status": "active", + "owner_id": "c4c7996d-be62-429d-b787-5d48fe94da86", + "updated_by": "439268ba-94a2-4031-9ca7-ca88ddda5096", + "created_at": "2024-05-12T21:37:06.000Z", + "last_updated_at": "2024-05-23T23:36:06.000Z", }, ], } @@ -10335,13 +10335,13 @@ paths: example-1: value: { - 'name': 'New config', - 'config': { 'retry': { 'attempts': 3 } }, - 'workspace_id': '', - 'isDefault': 1, + "name": "New config", + "config": { "retry": { "attempts": 3 } }, + "workspace_id": "", + "isDefault": 1, } responses: - '200': + "200": description: Config created successfully content: application/json: @@ -10363,11 +10363,11 @@ paths: example-1: value: { - 'success': true, - 'data': + "success": true, + "data": { - 'id': 'f3d8d070-f29d-43a3-bf97-3159c60f4ce0', - 'version_id': '0db4065b-ead2-4daa-bf5e-7e9106585133', + "id": "f3d8d070-f29d-43a3-bf97-3159c60f4ce0", + "version_id": "0db4065b-ead2-4daa-bf5e-7e9106585133", }, } x-code-samples: @@ -10483,7 +10483,7 @@ paths: schema: type: string responses: - '200': + "200": description: Config deleted successfully content: application/json: @@ -10554,7 +10554,7 @@ paths: schema: type: string responses: - '200': + "200": description: Config details content: application/json: @@ -10603,27 +10603,27 @@ paths: example-1: value: { - 'success': true, - 'data': + "success": true, + "data": { - 'config': + "config": { - 'retry': + "retry": { - 'attempts': 5, - 'on_status_codes': [429, 529], + "attempts": 5, + "on_status_codes": [429, 529], }, - 'cache': { 'mode': 'simple', 'max_age': 3600 }, - 'strategy': { 'mode': 'fallback' }, - 'targets': + "cache": { "mode": "simple", "max_age": 3600 }, + "strategy": { "mode": "fallback" }, + "targets": [ { - 'provider': 'openai', - 'virtual_key': 'main-258f4d', + "provider": "openai", + "virtual_key": "main-258f4d", }, { - 'provider': 'azure-openai', - 'virtual_key': 'azure-test-4110dd', + "provider": "azure-openai", + "virtual_key": "azure-test-4110dd", }, ], }, @@ -10725,12 +10725,12 @@ paths: example-1: value: { - 'name': 'testConf', - 'config': { 'virtual_key': 'copy-of-anthrop-b20259' }, - 'status': 'active', + "name": "testConf", + "config": { "virtual_key": "copy-of-anthrop-b20259" }, + "status": "active", } responses: - '200': + "200": description: Config updated successfully content: application/json: @@ -10749,10 +10749,10 @@ paths: example-1: value: { - 'success': true, - 'data': + "success": true, + "data": { - 'version_id': 'abe447e2-f6aa-4229-93b7-8ee3183b6667', + "version_id": "abe447e2-f6aa-4229-93b7-8ee3183b6667", }, } x-code-samples: @@ -10866,7 +10866,7 @@ paths: schema: type: string responses: - '200': + "200": description: A list of config versions content: application/json: @@ -10927,27 +10927,27 @@ paths: example-1: value: { - 'object': 'list', - 'total': 1, - 'data': + "object": "list", + "total": 1, + "data": [ { - 'id': 'daab995b-8d3b-42c5-a490-47217fbf4e0e', - 'name': 'PII Redaction Guardrail', - 'workspace_id': '8610029e-692a-4df6-9052-3fa3eff69911', - 'slug': 'pc-pii-re-7f1051', - 'organisation_id': '472d2804-d054-4226-b4ae-9d4e2e61e69e', - 'is_default': 0, - 'status': 'active', - 'owner_id': 'c4c7996d-be62-429d-b787-5d48fe94da86', - 'updated_by': 'c4c7996d-be62-429d-b787-5d48fe94da86', - 'created_at': '2025-10-17T19:11:47.000Z', - 'last_updated_at': '2025-10-17T19:11:47.000Z', - 'config': '{"input_guardrails":["pg-patron-1d0224"]}', - 'format': 'json', - 'type': 'ORG_CONFIG', - 'version_id': '8c1a4fbf-26d9-49df-82ca-ab772ba397d2', - 'object': 'config', + "id": "daab995b-8d3b-42c5-a490-47217fbf4e0e", + "name": "PII Redaction Guardrail", + "workspace_id": "8610029e-692a-4df6-9052-3fa3eff69911", + "slug": "pc-pii-re-7f1051", + "organisation_id": "472d2804-d054-4226-b4ae-9d4e2e61e69e", + "is_default": 0, + "status": "active", + "owner_id": "c4c7996d-be62-429d-b787-5d48fe94da86", + "updated_by": "c4c7996d-be62-429d-b787-5d48fe94da86", + "created_at": "2025-10-17T19:11:47.000Z", + "last_updated_at": "2025-10-17T19:11:47.000Z", + "config": '{"input_guardrails":["pg-patron-1d0224"]}', + "format": "json", + "type": "ORG_CONFIG", + "version_id": "8c1a4fbf-26d9-49df-82ca-ab772ba397d2", + "object": "config", }, ], } @@ -10971,14 +10971,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FeedbackRequest' + $ref: "#/components/schemas/FeedbackRequest" responses: - '200': + "200": description: Feedback successfully saved content: application/json: schema: - $ref: '#/components/schemas/FeedbackResponse' + $ref: "#/components/schemas/FeedbackResponse" x-code-samples: - lang: python label: Default @@ -11080,14 +11080,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FeedbackUpdateRequest' + $ref: "#/components/schemas/FeedbackUpdateRequest" responses: - '200': + "200": description: Feedback successfully updated content: application/json: schema: - $ref: '#/components/schemas/FeedbackResponse' + $ref: "#/components/schemas/FeedbackResponse" x-code-samples: - lang: python label: Default @@ -11199,7 +11199,7 @@ paths: description: For type=workspace, the API will only return Workpace-Scoped integrations. For type=organisation, the API will only return Global (organisation level) integrations. For type=all, both types of integrations will be returned. responses: - '200': + "200": description: Successful response content: application/json: @@ -11215,7 +11215,7 @@ paths: data: type: array items: - $ref: '#/components/schemas/IntegrationList' + $ref: "#/components/schemas/IntegrationList" x-code-samples: - lang: python label: Default @@ -11289,9 +11289,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateIntegrationRequest' + $ref: "#/components/schemas/CreateIntegrationRequest" responses: - '200': + "200": description: Successful response content: application/json: @@ -11408,12 +11408,12 @@ paths: schema: type: string responses: - '200': + "200": description: Successful response content: application/json: schema: - $ref: '#/components/schemas/IntegrationDetailResponse' + $ref: "#/components/schemas/IntegrationDetailResponse" x-code-samples: - lang: python label: Default @@ -11501,9 +11501,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateIntegrationRequest' + $ref: "#/components/schemas/UpdateIntegrationRequest" responses: - '200': + "200": description: Successful response content: application/json: @@ -11610,7 +11610,7 @@ paths: schema: type: string responses: - '200': + "200": description: Successful response content: application/json: @@ -11699,12 +11699,12 @@ paths: schema: type: string responses: - '200': + "200": description: List of integration models content: application/json: schema: - $ref: '#/components/schemas/IntegrationModelsResponse' + $ref: "#/components/schemas/IntegrationModelsResponse" put: summary: Bulk update integration models @@ -11724,9 +11724,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BulkUpdateModelsRequest' + $ref: "#/components/schemas/BulkUpdateModelsRequest" responses: - '200': + "200": description: Models updated successfully content: application/json: @@ -11750,9 +11750,9 @@ paths: description: Comma-separated list of model slugs to delete schema: type: string - example: 'gpt-4,gpt-3.5-turbo' + example: "gpt-4,gpt-3.5-turbo" responses: - '200': + "200": description: Models deleted successfully content: application/json: @@ -11772,12 +11772,12 @@ paths: schema: type: string responses: - '200': + "200": description: List of workspace access configurations content: application/json: schema: - $ref: '#/components/schemas/IntegrationWorkspacesResponse' + $ref: "#/components/schemas/IntegrationWorkspacesResponse" put: summary: Bulk update workspace access @@ -11797,9 +11797,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BulkUpdateWorkspacesRequest' + $ref: "#/components/schemas/BulkUpdateWorkspacesRequest" responses: - '200': + "200": description: Workspace access updated successfully content: application/json: @@ -11830,7 +11830,7 @@ paths: description: Not required when using workspace API keys. Required when using organisation admin keys responses: - '200': + "200": description: Successful response content: application/json: @@ -11846,7 +11846,7 @@ paths: data: type: array items: - $ref: '#/components/schemas/Providers' + $ref: "#/components/schemas/Providers" x-code-samples: - lang: python label: Default @@ -11944,9 +11944,9 @@ paths: type: string nullable: true usage_limits: - $ref: '#/components/schemas/UsageLimits' + $ref: "#/components/schemas/UsageLimits" rate_limits: - $ref: '#/components/schemas/RateLimits' + $ref: "#/components/schemas/RateLimits" expires_at: type: string format: date-time @@ -11956,19 +11956,19 @@ paths: examples: generic: value: - name: 'My first provider' - note: 'Provider description' - integration_id: 'my-openai-integration' + name: "My first provider" + note: "Provider description" + integration_id: "my-openai-integration" usage_limits: { - 'credit_limit': 10, - 'periodic_reset': 'monthly', - 'alert_threshold': 9, + "credit_limit": 10, + "periodic_reset": "monthly", + "alert_threshold": 9, } - workspace_id: '' - slug: 'first-openai-provider' + workspace_id: "" + slug: "first-openai-provider" responses: - '200': + "200": description: Successful response content: application/json: @@ -12090,12 +12090,12 @@ paths: required: true description: Provider slug responses: - '200': + "200": description: Successful response content: application/json: schema: - $ref: '#/components/schemas/Providers' + $ref: "#/components/schemas/Providers" x-code-samples: - lang: python label: Default @@ -12200,10 +12200,10 @@ paths: note: type: string usage_limits: - $ref: '#/components/schemas/UsageLimits' + $ref: "#/components/schemas/UsageLimits" nullable: true rate_limits: - $ref: '#/components/schemas/RateLimits' + $ref: "#/components/schemas/RateLimits" expires_at: type: string format: date-time @@ -12212,7 +12212,7 @@ paths: type: boolean responses: - '200': + "200": description: Successful response content: application/json: @@ -12335,7 +12335,7 @@ paths: required: true description: Provider slug responses: - '200': + "200": description: Successful response content: application/json: @@ -12436,7 +12436,7 @@ paths: description: Page size, default to 50 responses: - '200': + "200": description: Successful response content: application/json: @@ -12452,8 +12452,8 @@ paths: data: type: array items: - $ref: '#/components/schemas/VirtualKeys' - '401': + $ref: "#/components/schemas/VirtualKeys" + "401": description: Unauthorized response content: application/json: @@ -12470,7 +12470,7 @@ paths: example: success: false data: - message: 'Unauthorised Request' + message: "Unauthorised Request" x-code-samples: - lang: python label: Default @@ -12616,81 +12616,81 @@ paths: type: boolean deploymentName: type: string - required: ['apiVersion', 'deploymentName'] + required: ["apiVersion", "deploymentName"] usage_limits: - $ref: '#/components/schemas/UsageLimits' + $ref: "#/components/schemas/UsageLimits" rate_limits: - $ref: '#/components/schemas/RateLimits' + $ref: "#/components/schemas/RateLimits" expires_at: type: string format: date-time secret_mappings: type: array items: - $ref: '#/components/schemas/SecretMapping' + $ref: "#/components/schemas/SecretMapping" description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "model_config." (e.g. "model_config.awsSecretAccessKey"). Each target_field must be unique. When "key" is mapped, the key field becomes optional. examples: generic: value: - name: 'My first virtual key' - provider: 'openai' - key: 'sk-jhkfkjs8d9f7jksfghkjhfg' - note: 'Virtual key description' + name: "My first virtual key" + provider: "openai" + key: "sk-jhkfkjs8d9f7jksfghkjhfg" + note: "Virtual key description" usage_limits: { - 'credit_limit': 10, - 'periodic_reset': 'monthly', - 'alert_threshold': 9, + "credit_limit": 10, + "periodic_reset": "monthly", + "alert_threshold": 9, } - workspace_id: '' + workspace_id: "" azure-openai: value: - provider: 'azure-openai' - key: 'openai-test' - name: 'Key 1 Azure Open AI' - note: 'description' + provider: "azure-openai" + key: "openai-test" + name: "Key 1 Azure Open AI" + note: "description" deploymentConfig: [ { - 'apiVersion': 'a', - 'alias': 'b', - 'deploymentName': 'c', + "apiVersion": "a", + "alias": "b", + "deploymentName": "c", is_default: true, }, { - 'apiVersion': 'a', - 'alias': 'b', - 'deploymentName': 'c', + "apiVersion": "a", + "alias": "b", + "deploymentName": "c", is_default: false, }, ] - resourceName: 'c' + resourceName: "c" bedrock: value: - provider: 'bedrock' - key: 'openai-test' - name: 'Bedrock Key' - note: 'description' - awsAccessKeyId: 'a' - awsSecretAccessKey: 'b' - awsRegion: 'c' + provider: "bedrock" + key: "openai-test" + name: "Bedrock Key" + note: "description" + awsAccessKeyId: "a" + awsSecretAccessKey: "b" + awsRegion: "c" vertex-ai: value: - provider: 'vertex-ai' - key: 'vertex test' - name: 'Vertex AI Key' - note: 'description' - vertexProjectId: 'a' - vertexRegion: 'b' + provider: "vertex-ai" + key: "vertex test" + name: "Vertex AI Key" + note: "description" + vertexProjectId: "a" + vertexRegion: "b" workers-ai: value: - provider: 'vertex-ai' - key: 'cloudflare test' - name: 'CF Workers AI Key' - note: 'description' - workersAiAccountId: 'a' + provider: "vertex-ai" + key: "cloudflare test" + name: "CF Workers AI Key" + note: "description" + workersAiAccountId: "a" responses: - '200': + "200": description: Successful response content: application/json: @@ -12704,7 +12704,7 @@ paths: properties: slug: type: string - '401': + "401": description: Unauthorized response content: application/json: @@ -12721,7 +12721,7 @@ paths: example: success: false data: - message: 'Unauthorised Request' + message: "Unauthorised Request" x-code-samples: - lang: python label: Default @@ -12827,13 +12827,13 @@ paths: schema: type: string responses: - '200': + "200": description: Successful response content: application/json: schema: - $ref: '#/components/schemas/VirtualKeys' - '401': + $ref: "#/components/schemas/VirtualKeys" + "401": description: Unauthorized response content: application/json: @@ -12850,7 +12850,7 @@ paths: example: success: false data: - message: 'Unauthorised Request' + message: "Unauthorised Request" x-code-samples: - lang: python label: Default @@ -12960,23 +12960,23 @@ paths: type: boolean deploymentName: type: string - required: ['apiVersion', 'deploymentName'] + required: ["apiVersion", "deploymentName"] usage_limits: - $ref: '#/components/schemas/UsageLimits' + $ref: "#/components/schemas/UsageLimits" secret_mappings: type: array items: - $ref: '#/components/schemas/SecretMapping' + $ref: "#/components/schemas/SecretMapping" description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "model_config." (e.g. "model_config.awsSecretAccessKey"). Each target_field must be unique. responses: - '200': + "200": description: Successful response content: application/json: schema: type: object - '401': + "401": description: Unauthorized response content: application/json: @@ -12993,7 +12993,7 @@ paths: example: success: false data: - message: 'Unauthorised Request' + message: "Unauthorised Request" x-code-samples: - lang: python label: Default @@ -13113,14 +13113,14 @@ paths: schema: type: string responses: - '200': + "200": description: Successful response content: application/json: schema: type: object - '401': + "401": description: Unauthorized response content: application/json: @@ -13137,7 +13137,7 @@ paths: example: success: false data: - message: 'Unauthorised Request' + message: "Unauthorised Request" x-code-samples: - lang: python label: Default @@ -13216,12 +13216,12 @@ paths: description: Send an invite to user for your organization parameters: [] responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/SuccessInvite' + $ref: "#/components/schemas/SuccessInvite" tags: - User-invites requestBody: @@ -13229,7 +13229,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateInvite' + $ref: "#/components/schemas/CreateInvite" x-code-samples: - lang: python label: Default @@ -13410,12 +13410,12 @@ paths: in: query schema: type: integer - example: '1' + example: "1" - name: currentPage in: query schema: type: integer - example: '0' + example: "0" - name: role in: query schema: @@ -13423,13 +13423,13 @@ paths: enum: - admin - member - example: 'admin' + example: "admin" - name: email in: query schema: type: string format: email - example: 'foo@bar.com' + example: "foo@bar.com" - name: status in: query schema: @@ -13439,9 +13439,9 @@ paths: - cancelled - accepted - expired - example: 'pending' + example: "pending" responses: - '200': + "200": description: OK headers: Content-Type: @@ -13451,7 +13451,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InviteList' + $ref: "#/components/schemas/InviteList" example: object: list total: 2 @@ -13460,14 +13460,14 @@ paths: id: 419641fb-1458-47d6-94d0-e308159b3ec2 email: horace.slughorn@example.com role: member - created_at: '2023-12-12 13:56:32' - expires_at: '2023-12-12 13:56:32' - accepted_at: '2023-12-12 13:56:32' + created_at: "2023-12-12 13:56:32" + expires_at: "2023-12-12 13:56:32" + accepted_at: "2023-12-12 13:56:32" status: pending invited_by: a90e74fb-269e-457b-8b59-9426cdd8907e workspaces: - - workspace_id: '' - role: '' + - workspace_id: "" + role: "" x-code-samples: - lang: python label: Default @@ -13554,7 +13554,7 @@ paths: required: true description: string responses: - '200': + "200": description: OK headers: Content-Type: @@ -13564,20 +13564,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Invite' + $ref: "#/components/schemas/Invite" example: object: invite id: 419641fb-1458-47d6-94d0-e308159b3ec2 email: horace.slughorn@example.com role: member - created_at: '2023-12-12 13:56:32' - expires_at: '2023-12-12 13:56:32' - accepted_at: '2023-12-12 13:56:32' + created_at: "2023-12-12 13:56:32" + expires_at: "2023-12-12 13:56:32" + accepted_at: "2023-12-12 13:56:32" status: pending invited_by: 8dcfa174-c5ed-42c7-8a63-be755cc6e3123 workspaces: - - workspace_id: '' - role: '' + - workspace_id: "" + role: "" x-code-samples: - lang: python label: Default @@ -13660,7 +13660,7 @@ paths: type: string required: true responses: - '200': + "200": description: OK headers: Content-Type: @@ -13762,7 +13762,7 @@ paths: type: string required: true responses: - '200': + "200": description: OK headers: Content-Type: @@ -13868,17 +13868,17 @@ paths: in: header schema: type: string - example: '{{PORTKEY_API_KEY}}' + example: "{{PORTKEY_API_KEY}}" - name: pageSize in: query schema: type: integer - example: '1' + example: "1" - name: currentPage in: query schema: type: integer - example: '0' + example: "0" - name: role in: query schema: @@ -13887,15 +13887,15 @@ paths: - admin - member - owner - example: 'admin' + example: "admin" - name: email in: query schema: type: string format: email - example: 'foo@bar.com' + example: "foo@bar.com" responses: - '200': + "200": description: OK headers: Content-Type: @@ -13905,7 +13905,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UserList' + $ref: "#/components/schemas/UserList" example: total: 2 object: list @@ -13916,8 +13916,8 @@ paths: last_name: slughorn role: member email: horace.slughorn@example.com - created_at: '2024-01-25 11:35:07' - last_updated_at: '2024-01-25 11:35:07' + created_at: "2024-01-25 11:35:07" + last_updated_at: "2024-01-25 11:35:07" x-code-samples: - lang: python label: Default @@ -13999,7 +13999,7 @@ paths: type: string required: true responses: - '200': + "200": description: OK headers: Content-Type: @@ -14009,7 +14009,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/User' + $ref: "#/components/schemas/User" example: object: user id: 61e08f60-4822-465e-ba23-39f85cd741cb @@ -14017,9 +14017,9 @@ paths: last_name: slughorn role: member email: horace.slughorn@example.com - created_at: '2024-01-25 11:35:07' - last_updated_at: '2024-01-25 11:35:07' - workspace_ids: ['ws-shared-123'] + created_at: "2024-01-25 11:35:07" + last_updated_at: "2024-01-25 11:35:07" + workspace_ids: ["ws-shared-123"] x-code-sample: - lang: python label: Default @@ -14104,7 +14104,7 @@ paths: type: string required: true responses: - '200': + "200": description: OK headers: Content-Type: @@ -14213,7 +14213,7 @@ paths: type: string required: true responses: - '200': + "200": description: OK headers: Content-Type: @@ -14348,7 +14348,7 @@ paths: type: string required: true responses: - '200': + "200": description: OK content: application/json: @@ -14476,21 +14476,21 @@ paths: in: query schema: type: string - enum: ['admin', 'manager', 'member'] - example: 'admin' + enum: ["admin", "manager", "member"] + example: "admin" - name: email in: query schema: type: string - example: 'foo@bar.com' + example: "foo@bar.com" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/WorkspaceMemberList' + $ref: "#/components/schemas/WorkspaceMemberList" x-code-samples: - lang: python label: Default @@ -14594,7 +14594,7 @@ paths: type: string required: true responses: - '200': + "200": description: OK headers: Content-Type: @@ -14704,7 +14704,7 @@ paths: type: string required: true responses: - '200': + "200": description: OK headers: Content-Type: @@ -14812,7 +14812,7 @@ paths: type: string required: true responses: - '200': + "200": description: OK headers: Content-Type: @@ -14822,7 +14822,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/WorkspaceMember' + $ref: "#/components/schemas/WorkspaceMember" example: object: workspace-user id: 66dc015d-0270-11f1-8eec-0e27d7367989 @@ -14830,8 +14830,8 @@ paths: last_name: Doe org_role: admin role: admin - created_at: '2026-03-09T07:55:25.000Z' - last_updated_at: '2026-03-09T07:55:25.000Z' + created_at: "2026-03-09T07:55:25.000Z" + last_updated_at: "2026-03-09T07:55:25.000Z" status: active workspace_id: bf276bb9-4cef-4d87-b69b-b23a6ed6b1dd email: john.doe@example.com @@ -14961,11 +14961,11 @@ paths: usage_limits: type: array items: - $ref: '#/components/schemas/UsageLimits' + $ref: "#/components/schemas/UsageLimits" rate_limits: type: array items: - $ref: '#/components/schemas/RateLimits' + $ref: "#/components/schemas/RateLimits" example: name: My Workspace @@ -14975,7 +14975,7 @@ paths: environment: production foo: bar responses: - '200': + "200": description: OK headers: Content-Type: @@ -14985,7 +14985,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Workspace' + $ref: "#/components/schemas/Workspace" x-code-samples: - lang: python label: Default @@ -15118,23 +15118,23 @@ paths: in: query schema: type: integer - example: '1' + example: "1" - name: current_page in: query schema: type: integer - example: '0' + example: "0" - name: name in: query schema: type: string - example: 'workspace' - description: 'Workspace name to filter results, case sensitive' + example: "workspace" + description: "Workspace name to filter results, case sensitive" - name: exact_name in: query schema: type: string - description: 'Workspace name filter with strict check' + description: "Workspace name filter with strict check" - name: status in: query schema: @@ -15142,10 +15142,10 @@ paths: enum: - active - archived - example: 'active,archived' - description: 'Workspace status to filter results, comma separated' + example: "active,archived" + description: "Workspace status to filter results, comma separated" responses: - '200': + "200": description: OK headers: Content-Type: @@ -15155,7 +15155,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/WorkspaceList' + $ref: "#/components/schemas/WorkspaceList" example: total: 2 object: list @@ -15163,14 +15163,14 @@ paths: - id: test-prod-ws-12345 name: Test prod workspace description: This is a production workspace - created_at: '2023-07-13 13:51:27' - last_updated_at: '2023-07-13 14:51:27' + created_at: "2023-07-13 13:51:27" + last_updated_at: "2023-07-13 14:51:27" object: workspace - id: test-prod-ws-12345 name: Test prod workspace description: This is a production workspace - created_at: '2023-07-13 13:51:27' - last_updated_at: '2023-07-13 14:51:27' + created_at: "2023-07-13 13:51:27" + last_updated_at: "2023-07-13 14:51:27" object: workspace x-code-samples: - lang: python @@ -15268,11 +15268,11 @@ paths: usage_limits: type: array items: - $ref: '#/components/schemas/UsageLimits' + $ref: "#/components/schemas/UsageLimits" rate_limits: type: array items: - $ref: '#/components/schemas/RateLimits' + $ref: "#/components/schemas/RateLimits" example: name: My Workspace @@ -15287,7 +15287,7 @@ paths: type: string required: true responses: - '200': + "200": description: OK headers: Content-Type: @@ -15406,7 +15406,7 @@ paths: type: string required: true responses: - '200': + "200": description: OK headers: Content-Type: @@ -15416,7 +15416,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/WorkspaceWithUsers' + $ref: "#/components/schemas/WorkspaceWithUsers" x-code-samples: - lang: python label: Default @@ -15500,7 +15500,7 @@ paths: type: string required: true responses: - '200': + "200": description: OK x-code-samples: - lang: python @@ -15587,22 +15587,22 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateMcpIntegration' + $ref: "#/components/schemas/CreateMcpIntegration" examples: default: summary: Minimal (required fields only) value: - name: 'My MCP Server' - url: 'https://mcp.example.com/mcp' - auth_type: 'none' - transport: 'http' + name: "My MCP Server" + url: "https://mcp.example.com/mcp" + auth_type: "none" + transport: "http" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/McpIntegrationCreateResponse' + $ref: "#/components/schemas/McpIntegrationCreateResponse" get: operationId: McpIntegrations_list tags: @@ -15646,12 +15646,12 @@ paths: schema: type: string responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/McpIntegrationListResponse' + $ref: "#/components/schemas/McpIntegrationListResponse" /mcp-integrations/{mcpIntegrationId}: servers: *ControlPlaneServers @@ -15668,12 +15668,12 @@ paths: - MCP Integrations summary: Get MCP Integration responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/McpIntegration' + $ref: "#/components/schemas/McpIntegration" put: operationId: McpIntegrations_update tags: @@ -15683,9 +15683,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateMcpIntegration' + $ref: "#/components/schemas/UpdateMcpIntegration" responses: - '200': + "200": description: OK content: application/json: @@ -15697,7 +15697,7 @@ paths: - MCP Integrations summary: Delete MCP Integration responses: - '200': + "200": description: OK content: application/json: @@ -15725,14 +15725,14 @@ paths: type: string description: When set, response uses data/total shape instead of workspaces responses: - '200': + "200": description: OK content: application/json: schema: oneOf: - - $ref: '#/components/schemas/McpIntegrationWorkspacesListResponse' - - $ref: '#/components/schemas/McpIntegrationWorkspacesLegacyResponse' + - $ref: "#/components/schemas/McpIntegrationWorkspacesListResponse" + - $ref: "#/components/schemas/McpIntegrationWorkspacesLegacyResponse" put: operationId: McpIntegrationWorkspaces_bulkUpdate tags: @@ -15743,9 +15743,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BulkUpdateMcpIntegrationWorkspaces' + $ref: "#/components/schemas/BulkUpdateMcpIntegrationWorkspaces" responses: - '200': + "200": description: OK content: application/json: @@ -15790,12 +15790,12 @@ paths: - resource - resource_template responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/McpIntegrationCapabilitiesListResponse' + $ref: "#/components/schemas/McpIntegrationCapabilitiesListResponse" put: operationId: McpIntegrationCapabilities_bulkUpdate tags: @@ -15806,14 +15806,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BulkUpdateMcpIntegrationCapabilities' + $ref: "#/components/schemas/BulkUpdateMcpIntegrationCapabilities" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/McpIntegrationCapabilitiesBulkUpdateResponse' + $ref: "#/components/schemas/McpIntegrationCapabilitiesBulkUpdateResponse" /mcp-integrations/{mcpIntegrationId}/metadata: servers: *ControlPlaneServers parameters: @@ -15829,12 +15829,12 @@ paths: - MCP Integrations > Metadata summary: Get MCP Integration Metadata responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/McpIntegrationMetadata' + $ref: "#/components/schemas/McpIntegrationMetadata" /mcp-servers: servers: *ControlPlaneServers @@ -15849,20 +15849,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateMcpServer' + $ref: "#/components/schemas/CreateMcpServer" examples: default: summary: Minimal (required fields only) value: - name: 'My MCP Server' - mcp_integration_id: 'MCP_INTEGRATION_ID_OR_SLUG' + name: "My MCP Server" + mcp_integration_id: "MCP_INTEGRATION_ID_OR_SLUG" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/McpServerCreateResponse' + $ref: "#/components/schemas/McpServerCreateResponse" get: operationId: McpServers_list tags: @@ -15899,12 +15899,12 @@ paths: type: string maxLength: 255 responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/McpServerListResponse' + $ref: "#/components/schemas/McpServerListResponse" /mcp-servers/{mcpServerId}: servers: *ControlPlaneServers @@ -15921,12 +15921,12 @@ paths: - MCP Servers summary: Get MCP Server responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/McpServer' + $ref: "#/components/schemas/McpServer" put: operationId: McpServers_update tags: @@ -15936,9 +15936,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateMcpServer' + $ref: "#/components/schemas/UpdateMcpServer" responses: - '200': + "200": description: OK content: application/json: @@ -15950,7 +15950,7 @@ paths: - MCP Servers summary: Delete MCP Server responses: - '200': + "200": description: OK content: application/json: @@ -15973,12 +15973,12 @@ paths: summary: Test MCP Server Connection description: Test connectivity to the MCP server via its integration URL. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/McpServerTestResponse' + $ref: "#/components/schemas/McpServerTestResponse" /mcp-servers/{mcpServerId}/capabilities: servers: *ControlPlaneServers @@ -16018,12 +16018,12 @@ paths: - resource - resource_template responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/McpServerCapabilitiesListResponse' + $ref: "#/components/schemas/McpServerCapabilitiesListResponse" put: operationId: McpServerCapabilities_bulkUpdate tags: @@ -16034,14 +16034,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BulkUpdateMcpServerCapabilities' + $ref: "#/components/schemas/BulkUpdateMcpServerCapabilities" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/McpServerCapabilitiesBulkUpdateResponse' + $ref: "#/components/schemas/McpServerCapabilitiesBulkUpdateResponse" /mcp-servers/{mcpServerId}/user-access: servers: *ControlPlaneServers @@ -16077,12 +16077,12 @@ paths: type: string description: Search by user name or email responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/McpServerUserAccessListResponse' + $ref: "#/components/schemas/McpServerUserAccessListResponse" put: operationId: McpServerUserAccess_bulkUpdate tags: @@ -16092,14 +16092,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BulkUpdateMcpServerUserAccess' + $ref: "#/components/schemas/BulkUpdateMcpServerUserAccess" responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/McpServerUserAccessBulkUpdateResponse' + $ref: "#/components/schemas/McpServerUserAccessBulkUpdateResponse" /mcp-servers/{mcpServerId}/connections: servers: *ControlPlaneServers @@ -16140,12 +16140,12 @@ paths: maximum: 500 default: 100 responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/McpServerConnectionsListResponse' + $ref: "#/components/schemas/McpServerConnectionsListResponse" delete: operationId: McpServerConnections_delete tags: @@ -16164,12 +16164,12 @@ paths: type: string description: Workspace ID or slug. Required when using org admin API key; optional when API key is workspace-scoped. responses: - '200': + "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/McpServerConnectionDeleteResponse' + $ref: "#/components/schemas/McpServerConnectionDeleteResponse" /logs: servers: *DataPlaneServers @@ -16184,12 +16184,12 @@ paths: application/json: schema: oneOf: - - $ref: '#/components/schemas/CustomLog' + - $ref: "#/components/schemas/CustomLog" - type: array items: - $ref: '#/components/schemas/CustomLog' + $ref: "#/components/schemas/CustomLog" responses: - '200': + "200": description: Successful response x-code-samples: - lang: python @@ -16385,12 +16385,12 @@ paths: schema: type: string responses: - '200': + "200": description: Successful response content: application/json: schema: - $ref: '#/components/schemas/LogObject' + $ref: "#/components/schemas/LogObject" /logs/exports/{exportId}: servers: *ControlPlaneServers get: @@ -16404,12 +16404,12 @@ paths: schema: type: string responses: - '200': + "200": description: Successful response content: application/json: schema: - $ref: '#/components/schemas/ExportItem' + $ref: "#/components/schemas/ExportItem" x-code-samples: - lang: python label: Default @@ -16506,18 +16506,18 @@ paths: workspace_id: type: string filters: - $ref: '#/components/schemas/GenerationsFilterSchema' + $ref: "#/components/schemas/GenerationsFilterSchema" requested_data: - $ref: '#/components/schemas/LogExportsRequestedData' + $ref: "#/components/schemas/LogExportsRequestedData" required: - filters responses: - '200': + "200": description: Successful response content: application/json: schema: - $ref: '#/components/schemas/UpdateExportResponse' + $ref: "#/components/schemas/UpdateExportResponse" x-code-samples: - lang: python label: Default @@ -16628,12 +16628,12 @@ paths: schema: type: string responses: - '200': + "200": description: Successful response content: application/json: schema: - $ref: '#/components/schemas/ExportListResponse' + $ref: "#/components/schemas/ExportListResponse" x-code-samples: - lang: python label: Default @@ -16724,19 +16724,19 @@ paths: workspace_id: type: string filters: - $ref: '#/components/schemas/GenerationsFilterSchema' + $ref: "#/components/schemas/GenerationsFilterSchema" requested_data: - $ref: '#/components/schemas/LogExportsRequestedData' + $ref: "#/components/schemas/LogExportsRequestedData" required: - filters - requested_data responses: - '200': + "200": description: Successful response content: application/json: schema: - $ref: '#/components/schemas/UpdateExportResponse' + $ref: "#/components/schemas/UpdateExportResponse" x-code-samples: - lang: python label: Default @@ -16962,12 +16962,12 @@ paths: schema: type: string responses: - '200': + "200": description: Successful response content: application/json: schema: - $ref: '#/components/schemas/ExportTaskResponse' + $ref: "#/components/schemas/ExportTaskResponse" x-code-samples: - lang: python label: Default @@ -17055,12 +17055,12 @@ paths: schema: type: string responses: - '200': + "200": description: Successful response content: application/json: schema: - $ref: '#/components/schemas/ExportTaskResponse' + $ref: "#/components/schemas/ExportTaskResponse" x-code-samples: - lang: python label: Default @@ -17148,12 +17148,12 @@ paths: schema: type: string responses: - '200': + "200": description: Successful response content: application/json: schema: - $ref: '#/components/schemas/DownloadLogsResponse' + $ref: "#/components/schemas/DownloadLogsResponse" x-code-samples: - lang: python label: Default @@ -17337,12 +17337,12 @@ paths: minimum: 0 maximum: 100 responses: - '200': + "200": description: Successful response content: application/json: schema: - $ref: '#/components/schemas/AuditLogObjectList' + $ref: "#/components/schemas/AuditLogObjectList" /api-keys/{type}/{sub-type}: servers: *ControlPlaneServers @@ -17357,21 +17357,21 @@ paths: in: path schema: type: string - enum: ['organisation', 'workspace'] + enum: ["organisation", "workspace"] required: true - name: sub-type in: path schema: type: string - enum: ['user', 'service'] + enum: ["user", "service"] required: true requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateApiKeyObject' + $ref: "#/components/schemas/CreateApiKeyObject" responses: - '200': + "200": description: OK headers: Content-Type: @@ -17386,14 +17386,14 @@ paths: id: type: string format: uuid - example: '183f497a-2a7f-4f47-992e-26213fa863we' + example: "183f497a-2a7f-4f47-992e-26213fa863we" key: type: string - example: 'abssofjosfjs' + example: "abssofjosfjs" object: type: string - enum: ['api-key'] - example: 'api-key' + enum: ["api-key"] + example: "api-key" x-code-samples: - lang: python label: Default @@ -17660,19 +17660,19 @@ paths: in: query schema: type: integer - example: '1' + example: "1" - name: current_page in: query schema: type: integer - example: '0' + example: "0" - name: workspace_id in: query schema: type: string - example: 'ws-shared-123' + example: "ws-shared-123" responses: - '200': + "200": description: OK headers: Content-Type: @@ -17682,7 +17682,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ApiKeyObjectList' + $ref: "#/components/schemas/ApiKeyObjectList" x-code-samples: - lang: python label: Default @@ -17765,7 +17765,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateApiKeyObject' + $ref: "#/components/schemas/UpdateApiKeyObject" examples: update_api_key: summary: Update key metadata and limits @@ -17787,7 +17787,7 @@ paths: format: uuid required: true responses: - '200': + "200": description: OK headers: Content-Type: @@ -18165,7 +18165,7 @@ paths: format: uuid required: true responses: - '200': + "200": description: OK headers: Content-Type: @@ -18175,7 +18175,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ApiKeyObject' + $ref: "#/components/schemas/ApiKeyObject" x-code-samples: - lang: python label: Default @@ -18262,7 +18262,7 @@ paths: format: uuid required: true responses: - '200': + "200": description: OK headers: Content-Type: @@ -18359,7 +18359,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RotateApiKeyRequest' + $ref: "#/components/schemas/RotateApiKeyRequest" examples: default: summary: Rotate with a custom transition period @@ -18373,7 +18373,7 @@ paths: format: uuid required: true responses: - '200': + "200": description: OK headers: Content-Type: @@ -18383,7 +18383,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RotateApiKeyResponse' + $ref: "#/components/schemas/RotateApiKeyResponse" x-code-samples: - lang: python label: Default @@ -18484,7 +18484,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateUsageLimitsPolicyRequest' + $ref: "#/components/schemas/CreateUsageLimitsPolicyRequest" examples: monthlyCostLimit: summary: Monthly Cost Limit per API Key @@ -18512,21 +18512,21 @@ paths: credit_limit: 1000000 periodic_reset: weekly responses: - '200': + "200": description: Policy created successfully content: application/json: schema: - $ref: '#/components/schemas/CreatePolicyResponse' - '400': + $ref: "#/components/schemas/CreatePolicyResponse" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy not found - '500': + "500": description: Server error get: @@ -18538,7 +18538,7 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: '#/components/parameters/WorkspaceIdQuery' + - $ref: "#/components/parameters/WorkspaceIdQuery" - name: status in: query description: Filter by status @@ -18554,24 +18554,24 @@ paths: schema: type: string enum: [cost, tokens] - - $ref: '#/components/parameters/PageSize' - - $ref: '#/components/parameters/CurrentPage' + - $ref: "#/components/parameters/PageSize" + - $ref: "#/components/parameters/CurrentPage" responses: - '200': + "200": description: List of usage limits policies content: application/json: schema: - $ref: '#/components/schemas/UsageLimitsPolicyListResponse' - '400': + $ref: "#/components/schemas/UsageLimitsPolicyListResponse" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy not found - '500': + "500": description: Server error /policies/usage-limits/{policyUsageLimitsId}: @@ -18584,7 +18584,7 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: '#/components/parameters/PolicyUsageLimitsId' + - $ref: "#/components/parameters/PolicyUsageLimitsId" - name: status in: query description: Filter by status @@ -18601,21 +18601,21 @@ paths: type: boolean default: false responses: - '200': + "200": description: Usage limits policy details content: application/json: schema: - $ref: '#/components/schemas/UsageLimitsPolicyResponse' - '400': + $ref: "#/components/schemas/UsageLimitsPolicyResponse" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy not found - '500': + "500": description: Server error put: @@ -18627,19 +18627,19 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: '#/components/parameters/PolicyUsageLimitsId' + - $ref: "#/components/parameters/PolicyUsageLimitsId" requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UpdateUsageLimitsPolicyRequest' + $ref: "#/components/schemas/UpdateUsageLimitsPolicyRequest" example: credit_limit: 2000.0 alert_threshold: 1500.0 reset_usage_for_value: api-key-123 responses: - '200': + "200": description: OK headers: Content-Type: @@ -18651,15 +18651,15 @@ paths: schema: type: object example: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy not found - '500': + "500": description: Server error delete: @@ -18671,9 +18671,9 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: '#/components/parameters/PolicyUsageLimitsId' + - $ref: "#/components/parameters/PolicyUsageLimitsId" responses: - '200': + "200": description: OK headers: Content-Type: @@ -18685,15 +18685,15 @@ paths: schema: type: object example: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy not found - '500': + "500": description: Server error /policies/usage-limits/{policyUsageLimitsId}/entities: @@ -18706,7 +18706,7 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: '#/components/parameters/PolicyUsageLimitsId' + - $ref: "#/components/parameters/PolicyUsageLimitsId" - name: status in: query description: Filter by entity usage status @@ -18728,23 +18728,23 @@ paths: type: integer minimum: 1 maximum: 100 - - $ref: '#/components/parameters/CurrentPage' + - $ref: "#/components/parameters/CurrentPage" responses: - '200': + "200": description: List of entities for the policy content: application/json: schema: - $ref: '#/components/schemas/UsageLimitsPolicyEntityListResponse' - '400': + $ref: "#/components/schemas/UsageLimitsPolicyEntityListResponse" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy not found - '500': + "500": description: Server error /policies/usage-limits/{policyUsageLimitsId}/entities/{entityId}/reset: @@ -18757,25 +18757,25 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: '#/components/parameters/PolicyUsageLimitsId' - - $ref: '#/components/parameters/UsageLimitsPolicyEntityId' + - $ref: "#/components/parameters/PolicyUsageLimitsId" + - $ref: "#/components/parameters/UsageLimitsPolicyEntityId" responses: - '200': + "200": description: Entity usage reset successfully content: application/json: schema: type: object example: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy or entity not found - '500': + "500": description: Server error /policies/rate-limits: @@ -18792,7 +18792,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateRateLimitsPolicyRequest' + $ref: "#/components/schemas/CreateRateLimitsPolicyRequest" examples: requestsPerMinute: summary: 100 Requests per Minute per API Key @@ -18819,19 +18819,19 @@ paths: unit: rph value: 10000 responses: - '200': + "200": description: Policy created successfully content: application/json: schema: - $ref: '#/components/schemas/CreatePolicyResponse' - '400': + $ref: "#/components/schemas/CreatePolicyResponse" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '500': + "500": description: Server error get: @@ -18843,7 +18843,7 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: '#/components/parameters/WorkspaceIdQuery' + - $ref: "#/components/parameters/WorkspaceIdQuery" - name: status in: query description: Filter by status @@ -18866,24 +18866,24 @@ paths: schema: type: string enum: [rpm, rph, rpd] - - $ref: '#/components/parameters/PageSize' - - $ref: '#/components/parameters/CurrentPage' + - $ref: "#/components/parameters/PageSize" + - $ref: "#/components/parameters/CurrentPage" responses: - '200': + "200": description: List of rate limits policies content: application/json: schema: - $ref: '#/components/schemas/RateLimitsPolicyListResponse' - '400': + $ref: "#/components/schemas/RateLimitsPolicyListResponse" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy not found - '500': + "500": description: Server error /policies/rate-limits/{rateLimitsPolicyId}: @@ -18896,7 +18896,7 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: '#/components/parameters/RateLimitsPolicyId' + - $ref: "#/components/parameters/RateLimitsPolicyId" - name: status in: query description: Filter by status @@ -18906,21 +18906,21 @@ paths: enum: [active, archived] default: active responses: - '200': + "200": description: Rate limits policy details content: application/json: schema: - $ref: '#/components/schemas/RateLimitsPolicyResponse' - '400': + $ref: "#/components/schemas/RateLimitsPolicyResponse" + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy not found - '500': + "500": description: Server error put: @@ -18932,18 +18932,18 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: '#/components/parameters/RateLimitsPolicyId' + - $ref: "#/components/parameters/RateLimitsPolicyId" requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UpdateRateLimitsPolicyRequest' + $ref: "#/components/schemas/UpdateRateLimitsPolicyRequest" example: value: 200 unit: rph responses: - '200': + "200": description: OK headers: Content-Type: @@ -18955,15 +18955,15 @@ paths: schema: type: object example: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy not found - '500': + "500": description: Server error delete: @@ -18975,9 +18975,9 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: '#/components/parameters/RateLimitsPolicyId' + - $ref: "#/components/parameters/RateLimitsPolicyId" responses: - '200': + "200": description: OK headers: Content-Type: @@ -18989,15 +18989,15 @@ paths: schema: type: object example: {} - '400': + "400": description: Bad request - '401': + "401": description: Unauthorized - '403': + "403": description: Forbidden - '404': + "404": description: Policy not found - '500': + "500": description: Server error /analytics/graphs/requests: @@ -19007,30 +19007,30 @@ paths: - Analytics > Graphs summary: Get requests graph parameters: - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -19082,30 +19082,30 @@ paths: - Analytics > Graphs summary: Get cost graph parameters: - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -19165,30 +19165,30 @@ paths: - Analytics > Graphs summary: Get latency graph parameters: - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -19265,30 +19265,30 @@ paths: - Analytics > Graphs summary: Get tokens graph parameters: - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -19348,30 +19348,30 @@ paths: - Analytics > Graphs summary: Get users graph. Returns unique user count across different time buckets parameters: - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -19423,30 +19423,30 @@ paths: - Analytics > Graphs summary: Get users requests graph. Returns average requests per user across different time buckets parameters: - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -19506,30 +19506,30 @@ paths: - Analytics > Graphs summary: Get errors graph parameters: - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -19581,30 +19581,30 @@ paths: - Analytics > Graphs summary: Get percentage error rate graph parameters: - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -19656,30 +19656,30 @@ paths: - Analytics > Graphs summary: Get status code wise stacked error graph parameters: - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -19739,30 +19739,30 @@ paths: - Analytics > Graphs summary: Get status code wise grouped error graph. parameters: - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -19817,30 +19817,30 @@ paths: - Analytics > Graphs summary: Get retry and fallback rescued requests graph parameters: - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -19880,10 +19880,10 @@ paths: properties: retry_success_count: type: integer - description: 'Retry attempt count at which the request was rescued' + description: "Retry attempt count at which the request was rescued" count: type: integer - description: 'Total requests rescued at this retry attempt' + description: "Total requests rescued at this retry attempt" fallback: type: integer description: Total requests rescued using fallback for this data point bucket @@ -19908,30 +19908,30 @@ paths: - Analytics > Graphs summary: Get cache hit rate graph parameters: - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -20003,30 +20003,30 @@ paths: - Analytics > Graphs summary: Get cache hit latency graph parameters: - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -20072,30 +20072,30 @@ paths: - Analytics > Graphs summary: Get feedbacks graph parameters: - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -20147,30 +20147,30 @@ paths: - Analytics > Graphs summary: Get score-wise feedbacks distribution graph parameters: - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -20221,30 +20221,30 @@ paths: - Analytics > Graphs summary: Get weighted feedbacks graph. Weighted feedback is (value * score) parameters: - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -20296,30 +20296,30 @@ paths: - Analytics > Graphs summary: Get feedbacks per ai_models graph parameters: - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -20368,30 +20368,30 @@ paths: - Analytics > Summary summary: Get cache summary data for the selected time period parameters: - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -20433,32 +20433,32 @@ paths: - Analytics > Groups summary: Get metadata users grouped data. parameters: - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/CurrentPage' - - $ref: '#/components/parameters/PageSize' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/CurrentPage" + - $ref: "#/components/parameters/PageSize" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -20506,32 +20506,32 @@ paths: - Analytics > Groups summary: Get ai model grouped data. parameters: - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/CurrentPage' - - $ref: '#/components/parameters/PageSize' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/CurrentPage" + - $ref: "#/components/parameters/PageSize" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -20581,32 +20581,32 @@ paths: schema: type: string required: true - - $ref: '#/components/parameters/WorkspaceSlug' - - $ref: '#/components/parameters/TimeOfGenerationMin' - - $ref: '#/components/parameters/TimeOfGenerationMax' - - $ref: '#/components/parameters/TotalUnitsMin' - - $ref: '#/components/parameters/TotalUnitsMax' - - $ref: '#/components/parameters/CostMin' - - $ref: '#/components/parameters/CostMax' - - $ref: '#/components/parameters/PromptTokenMin' - - $ref: '#/components/parameters/PromptTokenMax' - - $ref: '#/components/parameters/CompletionTokenMin' - - $ref: '#/components/parameters/CompletionTokenMax' - - $ref: '#/components/parameters/StatusCode' - - $ref: '#/components/parameters/WeightedFeedbackMin' - - $ref: '#/components/parameters/WeightedFeedbackMax' - - $ref: '#/components/parameters/VirtualKeys' - - $ref: '#/components/parameters/Configs' - - $ref: '#/components/parameters/ApiKeyIds' - - $ref: '#/components/parameters/CurrentPage' - - $ref: '#/components/parameters/PageSize' - - $ref: '#/components/parameters/Metadata' - - $ref: '#/components/parameters/AiOrgModel' - - $ref: '#/components/parameters/TraceId' - - $ref: '#/components/parameters/SpanId' - - $ref: '#/components/parameters/PromptSlug' + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/CurrentPage" + - $ref: "#/components/parameters/PageSize" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" responses: - '200': + "200": description: OK headers: Content-Type: @@ -20711,12 +20711,12 @@ paths: type: string example: gpt-5 responses: - '200': + "200": description: Pricing configuration for the specified model content: application/json: schema: - $ref: '#/components/schemas/ModelPricingConfig' + $ref: "#/components/schemas/ModelPricingConfig" examples: openai-gpt4: summary: OpenAI GPT-4 @@ -20808,7 +20808,7 @@ paths: search: price: 3.5 currency: USD - '404': + "404": description: Model or provider not found content: application/json: @@ -20861,7 +20861,7 @@ paths: default: 20 description: Items per page (1-100), defaults to 20 responses: - '200': + "200": description: Successful response content: application/json: @@ -20876,7 +20876,7 @@ paths: data: type: array items: - $ref: '#/components/schemas/SecretReferenceListItem' + $ref: "#/components/schemas/SecretReferenceListItem" security: - Portkey-Key: [] x-code-samples: @@ -20901,9 +20901,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateSecretReferenceRequest' + $ref: "#/components/schemas/CreateSecretReferenceRequest" responses: - '200': + "200": description: Successful response content: application/json: @@ -20918,9 +20918,9 @@ paths: object: type: string enum: [secret-reference] - '400': + "400": description: Validation failure (schema, duplicate slug, invalid workspaces, conflicting allow_all_workspaces + allowed_workspaces) - '403': + "403": description: secretReferences feature not enabled on subscription security: - Portkey-Key: [] @@ -20975,13 +20975,13 @@ paths: type: string description: UUID or slug of the secret reference responses: - '200': + "200": description: Successful response content: application/json: schema: - $ref: '#/components/schemas/SecretReferenceDetailResponse' - '404': + $ref: "#/components/schemas/SecretReferenceDetailResponse" + "404": description: Secret reference not found security: - Portkey-Key: [] @@ -21014,17 +21014,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateSecretReferenceRequest' + $ref: "#/components/schemas/UpdateSecretReferenceRequest" responses: - '200': + "200": description: Successful response content: application/json: schema: type: object - '400': + "400": description: Validation failure or no valid fields to update - '404': + "404": description: Secret reference not found security: - Portkey-Key: [] @@ -21063,15 +21063,15 @@ paths: type: string description: UUID or slug of the secret reference responses: - '200': + "200": description: Successful response content: application/json: schema: type: object - '400': + "400": description: Secret reference is in use by integrations or virtual keys - '404': + "404": description: Secret reference not found security: - Portkey-Key: [] @@ -21099,7 +21099,7 @@ components: name: x-portkey-virtual-key Provider-Auth: type: http - scheme: 'bearer' + scheme: "bearer" Provider-Name: type: apiKey in: header @@ -21121,7 +21121,7 @@ components: schema: type: string format: date-time - example: '2026-02-23T14:20:31+05:30' + example: "2026-02-23T14:20:31+05:30" description: Minimum time of generation in ISO8601 format (YYYY-MM-DDTHH:MM:SS±HH:MM). TimeOfGenerationMax: in: query @@ -21130,7 +21130,7 @@ components: schema: type: string format: date-time - example: '2026-02-24T14:20:31+05:30' + example: "2026-02-24T14:20:31+05:30" description: Maximum time of generation in ISO8601 format (YYYY-MM-DDTHH:MM:SS±HH:MM). TotalUnitsMin: in: query @@ -21385,34 +21385,34 @@ components: description: Complete pricing configuration for a model properties: pay_as_you_go: - $ref: '#/components/schemas/ModelPayAsYouGo' + $ref: "#/components/schemas/ModelPayAsYouGo" calculate: - $ref: '#/components/schemas/ModelCalculateConfig' + $ref: "#/components/schemas/ModelCalculateConfig" currency: type: string enum: [USD] description: Currency code (always USD) finetune_config: - $ref: '#/components/schemas/ModelFinetuneConfig' + $ref: "#/components/schemas/ModelFinetuneConfig" ModelPayAsYouGo: type: object description: Token-based pricing (all prices in USD cents) properties: request_token: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" response_token: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" cache_write_input_token: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" cache_read_input_token: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" request_audio_token: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" response_audio_token: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" cache_read_audio_input_token: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" additional_units: type: object description: | @@ -21425,9 +21425,9 @@ components: - `image_token`: Image generation tokens - `video_duration_seconds_*`: Video generation (OpenAI Sora) additionalProperties: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" image: - $ref: '#/components/schemas/ModelImagePricing' + $ref: "#/components/schemas/ModelImagePricing" ModelTokenPrice: type: object @@ -21446,7 +21446,7 @@ components: additionalProperties: type: object additionalProperties: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" example: standard: 1024x1024: @@ -21464,9 +21464,9 @@ components: description: Cost calculation formulas properties: request: - $ref: '#/components/schemas/ModelCalculateOperation' + $ref: "#/components/schemas/ModelCalculateOperation" response: - $ref: '#/components/schemas/ModelCalculateOperation' + $ref: "#/components/schemas/ModelCalculateOperation" ModelCalculateOperation: type: object @@ -21481,8 +21481,8 @@ components: description: Operands for the operation items: oneOf: - - $ref: '#/components/schemas/ModelCalculateOperation' - - $ref: '#/components/schemas/ModelValueReference' + - $ref: "#/components/schemas/ModelCalculateOperation" + - $ref: "#/components/schemas/ModelValueReference" ModelValueReference: type: object @@ -21503,9 +21503,9 @@ components: description: Fine-tuning pricing configuration properties: pay_per_token: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" pay_per_hour: - $ref: '#/components/schemas/ModelTokenPrice' + $ref: "#/components/schemas/ModelTokenPrice" Error: type: object @@ -21531,7 +21531,7 @@ components: type: object properties: error: - $ref: '#/components/schemas/Error' + $ref: "#/components/schemas/Error" required: - error @@ -21547,9 +21547,9 @@ components: workspaces: type: array items: - $ref: '#/components/schemas/WorkspaceInvite' + $ref: "#/components/schemas/WorkspaceInvite" role: - $ref: '#/components/schemas/InviteRole' + $ref: "#/components/schemas/InviteRole" workspace_api_key_details: type: object properties: @@ -21580,7 +21580,7 @@ components: type: string description: Workspace Slug role: - $ref: '#/components/schemas/WorkspaceInviteRole' + $ref: "#/components/schemas/WorkspaceInviteRole" WorkspaceInviteRole: type: string enum: @@ -21615,7 +21615,7 @@ components: data: type: array items: - $ref: '#/components/schemas/Model' + $ref: "#/components/schemas/Model" required: - object - data @@ -21642,29 +21642,29 @@ components: anyOf: - type: string - type: string - enum: ['gpt-3.5-turbo-instruct', 'davinci-002', 'babbage-002'] + enum: ["gpt-3.5-turbo-instruct", "davinci-002", "babbage-002"] x-oaiTypeLabel: string prompt: description: &completions_prompt_description | The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document. - default: '<|endoftext|>' + default: "<|endoftext|>" nullable: true oneOf: - type: string - default: '' - example: 'This is a test.' + default: "" + example: "This is a test." - type: array items: type: string - default: '' - example: 'This is a test.' + default: "" + example: "This is a test." - type: array minItems: 1 items: type: integer - example: '[1212, 318, 257, 1332, 13]' + example: "[1212, 318, 257, 1332, 13]" - type: array minItems: 1 items: @@ -21672,7 +21672,7 @@ components: minItems: 1 items: type: integer - example: '[[1212, 318, 257, 1332, 13]]' + example: "[[1212, 318, 257, 1332, 13]]" best_of: type: integer default: 1 @@ -21788,7 +21788,7 @@ components: nullable: true default: false stream_options: - $ref: '#/components/schemas/ChatCompletionStreamOptions' + $ref: "#/components/schemas/ChatCompletionStreamOptions" suffix: description: | The suffix that comes after a completion of inserted text. @@ -21797,7 +21797,7 @@ components: default: null nullable: true type: string - example: 'test.' + example: "test." temperature: type: number minimum: 0 @@ -21854,7 +21854,7 @@ components: The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, or `content_filter` if content was omitted due to a flag from our content filters. - enum: ['stop', 'length', 'content_filter'] + enum: ["stop", "length", "content_filter"] index: type: integer logprobs: @@ -21898,7 +21898,7 @@ components: description: The object type, which is always "text_completion" enum: [text_completion] usage: - $ref: '#/components/schemas/CompletionUsage' + $ref: "#/components/schemas/CompletionUsage" required: - id - object @@ -21931,8 +21931,8 @@ components: ChatCompletionRequestMessageContentPart: oneOf: - - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartText' - - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartImage' + - $ref: "#/components/schemas/ChatCompletionRequestMessageContentPartText" + - $ref: "#/components/schemas/ChatCompletionRequestMessageContentPartImage" x-oaiExpandable: true ChatCompletionRequestMessageContentPartImage: @@ -21941,7 +21941,7 @@ components: properties: type: type: string - enum: ['image_url'] + enum: ["image_url"] description: The type of the content part. image_url: type: object @@ -21953,8 +21953,8 @@ components: detail: type: string description: Specifies the detail level of the image. Learn more in the [Vision guide](https://platform.openai.com/docs/guides/vision/low-or-high-fidelity-image-understanding). - enum: ['auto', 'low', 'high'] - default: 'auto' + enum: ["auto", "low", "high"] + default: "auto" required: - url required: @@ -21967,7 +21967,7 @@ components: properties: type: type: string - enum: ['text'] + enum: ["text"] description: The type of the content part. text: type: string @@ -21982,7 +21982,7 @@ components: properties: type: type: string - enum: ['thinking'] + enum: ["thinking"] description: The type of the content part. thinking: type: string @@ -21997,7 +21997,7 @@ components: properties: type: type: string - enum: ['redacted_thinking'] + enum: ["redacted_thinking"] description: The type of the content part. data: type: string @@ -22008,12 +22008,12 @@ components: ChatCompletionRequestMessage: oneOf: - - $ref: '#/components/schemas/ChatCompletionRequestSystemMessage' - - $ref: '#/components/schemas/ChatCompletionRequestDeveloperMessage' - - $ref: '#/components/schemas/ChatCompletionRequestUserMessage' - - $ref: '#/components/schemas/ChatCompletionRequestAssistantMessage' - - $ref: '#/components/schemas/ChatCompletionRequestToolMessage' - - $ref: '#/components/schemas/ChatCompletionRequestFunctionMessage' + - $ref: "#/components/schemas/ChatCompletionRequestSystemMessage" + - $ref: "#/components/schemas/ChatCompletionRequestDeveloperMessage" + - $ref: "#/components/schemas/ChatCompletionRequestUserMessage" + - $ref: "#/components/schemas/ChatCompletionRequestAssistantMessage" + - $ref: "#/components/schemas/ChatCompletionRequestToolMessage" + - $ref: "#/components/schemas/ChatCompletionRequestFunctionMessage" x-oaiExpandable: true ChatCompletionRequestSystemMessage: @@ -22025,7 +22025,7 @@ components: type: string role: type: string - enum: ['system'] + enum: ["system"] description: The role of the messages author, in this case `system`. name: type: string @@ -22044,7 +22044,7 @@ components: type: string role: type: string - enum: ['developer'] + enum: ["developer"] description: The role of the messages author, in this case `Developer`. name: type: string @@ -22068,12 +22068,12 @@ components: description: An array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts. Image input is only supported when using the `gpt-4-visual-preview` model. title: Array of content parts items: - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPart' + $ref: "#/components/schemas/ChatCompletionRequestMessageContentPart" minItems: 1 x-oaiExpandable: true role: type: string - enum: ['user'] + enum: ["user"] description: The role of the messages author, in this case `user`. name: type: string @@ -22093,17 +22093,17 @@ components: The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified. role: type: string - enum: ['assistant'] + enum: ["assistant"] description: The role of the messages author, in this case `assistant`. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: - $ref: '#/components/schemas/ChatCompletionMessageToolCalls' + $ref: "#/components/schemas/ChatCompletionMessageToolCalls" function_call: type: object deprecated: true - description: 'Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.' + description: "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model." nullable: true properties: arguments: @@ -22147,8 +22147,8 @@ components: filters: description: A filter to apply based on file attributes. oneOf: - - $ref: '#/components/schemas/ComparisonFilter' - - $ref: '#/components/schemas/CompoundFilter' + - $ref: "#/components/schemas/ComparisonFilter" + - $ref: "#/components/schemas/CompoundFilter" x-oaiExpandable: true ranking_options: description: Ranking options for search. @@ -22235,7 +22235,7 @@ components: description: | The name of the file. attributes: - $ref: '#/components/schemas/VectorStoreFileAttributes' + $ref: "#/components/schemas/VectorStoreFileAttributes" score: type: number format: float @@ -22259,7 +22259,7 @@ components: The contents of the assistant message. Required unless `function_call` is specified. role: type: string - enum: ['assistant'] + enum: ["assistant"] description: The role of the messages author, in this case `assistant`. name: type: string @@ -22281,7 +22281,7 @@ components: weight: type: integer enum: [0, 1] - description: 'Controls whether the assistant message is trained against (0 or 1)' + description: "Controls whether the assistant message is trained against (0 or 1)" required: - role @@ -22291,7 +22291,7 @@ components: properties: role: type: string - enum: ['tool'] + enum: ["tool"] description: The role of the messages author, in this case `tool`. content: type: string @@ -22311,7 +22311,7 @@ components: properties: role: type: string - enum: ['function'] + enum: ["function"] description: The role of the messages author, in this case `function`. content: nullable: true @@ -22331,7 +22331,7 @@ components: - type: object title: Function message deprecated: false - - $ref: '#/components/schemas/ChatCompletionRequestFunctionMessage' + - $ref: "#/components/schemas/ChatCompletionRequestFunctionMessage" FunctionParameters: type: object @@ -22349,7 +22349,7 @@ components: type: string description: The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. parameters: - $ref: '#/components/schemas/FunctionParameters' + $ref: "#/components/schemas/FunctionParameters" required: - name @@ -22369,10 +22369,10 @@ components: properties: type: type: string - enum: ['function'] + enum: ["function"] description: The type of the tool. Currently, only `function` is supported. function: - $ref: '#/components/schemas/FunctionObject' + $ref: "#/components/schemas/FunctionObject" required: - type - function @@ -22393,7 +22393,7 @@ components: `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools. enum: [none, auto, required] - - $ref: '#/components/schemas/ChatCompletionNamedToolChoice' + - $ref: "#/components/schemas/ChatCompletionNamedToolChoice" x-oaiExpandable: true ChatCompletionNamedToolChoice: @@ -22402,7 +22402,7 @@ components: properties: type: type: string - enum: ['function'] + enum: ["function"] description: The type of the tool. Currently, only `function` is supported. function: type: object @@ -22442,16 +22442,16 @@ components: - transcript OutputContent: oneOf: - - $ref: '#/components/schemas/OutputText' - - $ref: '#/components/schemas/Refusal' + - $ref: "#/components/schemas/OutputText" + - $ref: "#/components/schemas/Refusal" OutputItem: anyOf: - - $ref: '#/components/schemas/OutputMessage' - - $ref: '#/components/schemas/FileSearchToolCall' - - $ref: '#/components/schemas/FunctionToolCall' - - $ref: '#/components/schemas/WebSearchToolCall' - - $ref: '#/components/schemas/ComputerToolCall' - - $ref: '#/components/schemas/ReasoningItem' + - $ref: "#/components/schemas/OutputMessage" + - $ref: "#/components/schemas/FileSearchToolCall" + - $ref: "#/components/schemas/FunctionToolCall" + - $ref: "#/components/schemas/WebSearchToolCall" + - $ref: "#/components/schemas/ComputerToolCall" + - $ref: "#/components/schemas/ReasoningItem" x-oaiExpandable: true discriminator: propertyName: type @@ -22486,7 +22486,7 @@ components: x-oaiExpandable: true items: x-oaiExpandable: true - $ref: '#/components/schemas/OutputContent' + $ref: "#/components/schemas/OutputContent" status: type: string description: > @@ -22527,7 +22527,7 @@ components: The annotations of the text output. items: x-oaiExpandable: true - $ref: '#/components/schemas/Annotation' + $ref: "#/components/schemas/Annotation" required: - type - text @@ -22541,7 +22541,7 @@ components: type: array description: The tool calls generated by the model, such as function calls. items: - $ref: '#/components/schemas/ChatCompletionMessageToolCall' + $ref: "#/components/schemas/ChatCompletionMessageToolCall" ChatCompletionMessageToolCall: type: object @@ -22552,7 +22552,7 @@ components: description: The ID of the tool call. type: type: string - enum: ['function'] + enum: ["function"] description: The type of the tool. Currently, only `function` is supported. function: type: object @@ -22582,7 +22582,7 @@ components: description: The ID of the tool call. type: type: string - enum: ['function'] + enum: ["function"] description: The type of the tool. Currently, only `function` is supported. function: type: object @@ -22623,9 +22623,9 @@ components: type: object description: A block of content in a chat completion message. oneOf: - - $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartText' - - $ref: '#/components/schemas/ChatCompletionMessageContentPartThinking' - - $ref: '#/components/schemas/ChatCompletionMessageContentPartRedactedThinking' + - $ref: "#/components/schemas/ChatCompletionRequestMessageContentPartText" + - $ref: "#/components/schemas/ChatCompletionMessageContentPartThinking" + - $ref: "#/components/schemas/ChatCompletionMessageContentPartRedactedThinking" ChatCompletionResponseMessage: type: object @@ -22636,15 +22636,15 @@ components: description: The contents of the message. nullable: true tool_calls: - $ref: '#/components/schemas/ChatCompletionMessageToolCalls' + $ref: "#/components/schemas/ChatCompletionMessageToolCalls" role: type: string - enum: ['assistant'] + enum: ["assistant"] description: The role of the author of this message. function_call: type: object deprecated: true - description: 'Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.' + description: "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model." properties: arguments: type: string @@ -22661,7 +22661,7 @@ components: description: The content blocks of the message. This is only present for certain providers with strict-open-ai-compliance flag set to false items: type: object - $ref: '#/components/schemas/ChatCompletionMessageContentBlock' + $ref: "#/components/schemas/ChatCompletionMessageContentBlock" required: - role - content @@ -22677,7 +22677,7 @@ components: function_call: deprecated: true type: object - description: 'Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.' + description: "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model." properties: arguments: type: string @@ -22688,10 +22688,10 @@ components: tool_calls: type: array items: - $ref: '#/components/schemas/ChatCompletionMessageToolCallChunk' + $ref: "#/components/schemas/ChatCompletionMessageToolCallChunk" role: type: string - enum: ['system', 'user', 'assistant', 'tool'] + enum: ["system", "user", "assistant", "tool"] description: The role of the author of this message. CreateChatCompletionRequest: @@ -22702,45 +22702,45 @@ components: type: array minItems: 1 items: - $ref: '#/components/schemas/ChatCompletionRequestMessage' + $ref: "#/components/schemas/ChatCompletionRequestMessage" model: description: ID of the model to use. See the [model endpoint compatibility](https://platform.openai.com/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API. - example: 'gpt-5' + example: "gpt-5" anyOf: - type: string - type: string enum: [ - 'gpt-5', - 'gpt-5-mini', - 'gpt-5-nano', - 'o4-mini', - 'o3', - 'o3-mini', - 'o1', - 'o1-mini', - 'gpt-4o', - 'gpt-4o-mini', - 'gpt-4o-2024-05-13', - 'gpt-4-turbo', - 'gpt-4-turbo-2024-04-09', - 'gpt-4-0125-preview', - 'gpt-4-turbo-preview', - 'gpt-4-1106-preview', - 'gpt-4-vision-preview', - 'gpt-4', - 'gpt-4-0314', - 'gpt-4-0613', - 'gpt-4-32k', - 'gpt-4-32k-0314', - 'gpt-4-32k-0613', - 'gpt-3.5-turbo', - 'gpt-3.5-turbo-16k', - 'gpt-3.5-turbo-0301', - 'gpt-3.5-turbo-0613', - 'gpt-3.5-turbo-1106', - 'gpt-3.5-turbo-0125', - 'gpt-3.5-turbo-16k-0613', + "gpt-5", + "gpt-5-mini", + "gpt-5-nano", + "o4-mini", + "o3", + "o3-mini", + "o1", + "o1-mini", + "gpt-4o", + "gpt-4o-mini", + "gpt-4o-2024-05-13", + "gpt-4-turbo", + "gpt-4-turbo-2024-04-09", + "gpt-4-0125-preview", + "gpt-4-turbo-preview", + "gpt-4-1106-preview", + "gpt-4-vision-preview", + "gpt-4", + "gpt-4-0314", + "gpt-4-0613", + "gpt-4-32k", + "gpt-4-32k-0314", + "gpt-4-32k-0613", + "gpt-3.5-turbo", + "gpt-3.5-turbo-16k", + "gpt-3.5-turbo-0301", + "gpt-3.5-turbo-0613", + "gpt-3.5-turbo-1106", + "gpt-3.5-turbo-0125", + "gpt-3.5-turbo-16k-0613", ] x-oaiTypeLabel: string frequency_penalty: @@ -22818,9 +22818,9 @@ components: Using `json_schema` is preferred for models that support it. oneOf: - - $ref: '#/components/schemas/ResponseFormatText' - - $ref: '#/components/schemas/ResponseFormatJsonSchema' - - $ref: '#/components/schemas/ResponseFormatJsonObject' + - $ref: "#/components/schemas/ResponseFormatText" + - $ref: "#/components/schemas/ResponseFormatJsonSchema" + - $ref: "#/components/schemas/ResponseFormatJsonObject" seed: type: integer minimum: -9223372036854775808 @@ -22852,7 +22852,7 @@ components: nullable: true default: false stream_options: - $ref: '#/components/schemas/ChatCompletionStreamOptions' + $ref: "#/components/schemas/ChatCompletionStreamOptions" thinking: type: object nullable: true @@ -22861,9 +22861,9 @@ components: properties: type: type: string - enum: ['enabled', 'disabled'] + enum: ["enabled", "disabled"] description: Enables or disables the thinking mode capability. - default: 'disabled' + default: "disabled" budget_tokens: type: integer description: | @@ -22873,7 +22873,7 @@ components: example: 2030 required: - type - example: { 'type': 'enabled', 'budget_tokens': 2030 } + example: { "type": "enabled", "budget_tokens": 2030 } temperature: type: number minimum: 0 @@ -22896,11 +22896,11 @@ components: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. items: - $ref: '#/components/schemas/ChatCompletionTool' + $ref: "#/components/schemas/ChatCompletionTool" tool_choice: - $ref: '#/components/schemas/ChatCompletionToolChoiceOption' + $ref: "#/components/schemas/ChatCompletionToolChoiceOption" parallel_tool_calls: - $ref: '#/components/schemas/ParallelToolCalls' + $ref: "#/components/schemas/ParallelToolCalls" user: *end_user_param_configuration function_call: deprecated: true @@ -22919,7 +22919,7 @@ components: `none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function. enum: [none, auto] - - $ref: '#/components/schemas/ChatCompletionFunctionCallOption' + - $ref: "#/components/schemas/ChatCompletionFunctionCallOption" x-oaiExpandable: true functions: deprecated: true @@ -22931,7 +22931,7 @@ components: minItems: 1 maxItems: 128 items: - $ref: '#/components/schemas/ChatCompletionFunctions' + $ref: "#/components/schemas/ChatCompletionFunctions" required: - model @@ -22964,17 +22964,17 @@ components: `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function. enum: [ - 'stop', - 'length', - 'tool_calls', - 'content_filter', - 'function_call', + "stop", + "length", + "tool_calls", + "content_filter", + "function_call", ] index: type: integer description: The index of the choice in the list of choices. message: - $ref: '#/components/schemas/ChatCompletionResponseMessage' + $ref: "#/components/schemas/ChatCompletionResponseMessage" logprobs: &chat_completion_response_logprobs description: Log probability information for the choice. type: object @@ -22984,7 +22984,7 @@ components: description: A list of message content tokens with log probability information. type: array items: - $ref: '#/components/schemas/ChatCompletionTokenLogprob' + $ref: "#/components/schemas/ChatCompletionTokenLogprob" nullable: true required: - content @@ -23005,7 +23005,7 @@ components: description: The object type, which is always `chat.completion`. enum: [chat.completion] usage: - $ref: '#/components/schemas/CompletionUsage' + $ref: "#/components/schemas/CompletionUsage" required: - choices - created @@ -23036,12 +23036,12 @@ components: description: &chat_completion_function_finish_reason_description | The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, or `function_call` if the model called a function. - enum: ['stop', 'length', 'function_call', 'content_filter'] + enum: ["stop", "length", "function_call", "content_filter"] index: type: integer description: The index of the choice in the list of choices. message: - $ref: '#/components/schemas/ChatCompletionResponseMessage' + $ref: "#/components/schemas/ChatCompletionResponseMessage" created: type: integer description: The Unix timestamp (in seconds) of when the chat completion was created. @@ -23059,7 +23059,7 @@ components: description: The object type, which is always `chat.completion`. enum: [chat.completion] usage: - $ref: '#/components/schemas/CompletionUsage' + $ref: "#/components/schemas/CompletionUsage" required: - choices - created @@ -23107,7 +23107,7 @@ components: data: type: array items: - $ref: '#/components/schemas/FineTuningJob' + $ref: "#/components/schemas/FineTuningJob" has_more: type: boolean object: @@ -23138,18 +23138,18 @@ components: - index properties: delta: - $ref: '#/components/schemas/ChatCompletionStreamResponseDelta' + $ref: "#/components/schemas/ChatCompletionStreamResponseDelta" logprobs: *chat_completion_response_logprobs finish_reason: type: string description: *chat_completion_finish_reason_description enum: [ - 'stop', - 'length', - 'tool_calls', - 'content_filter', - 'function_call', + "stop", + "length", + "tool_calls", + "content_filter", + "function_call", ] nullable: true index: @@ -23206,15 +23206,15 @@ components: prompt: description: A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`. type: string - example: 'A cute baby sea otter' + example: "A cute baby sea otter" model: anyOf: - type: string - type: string - enum: ['dall-e-2', 'dall-e-3'] + enum: ["dall-e-2", "dall-e-3"] x-oaiTypeLabel: string - default: 'dall-e-2' - example: 'dall-e-3' + default: "dall-e-2" + example: "dall-e-3" nullable: true description: The model to use for image generation. n: &images_n @@ -23227,29 +23227,29 @@ components: description: The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported. quality: type: string - enum: ['standard', 'hd'] - default: 'standard' - example: 'standard' + enum: ["standard", "hd"] + default: "standard" + example: "standard" description: The quality of the image that will be generated. `hd` creates images with finer details and greater consistency across the image. This param is only supported for `dall-e-3`. response_format: &images_response_format type: string - enum: ['url', 'b64_json'] - default: 'url' - example: 'url' + enum: ["url", "b64_json"] + default: "url" + example: "url" nullable: true description: The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. size: &images_size type: string - enum: ['256x256', '512x512', '1024x1024', '1792x1024', '1024x1792'] - default: '1024x1024' - example: '1024x1024' + enum: ["256x256", "512x512", "1024x1024", "1792x1024", "1024x1792"] + default: "1024x1024" + example: "1024x1024" nullable: true description: The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. Must be one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3` models. style: type: string - enum: ['vivid', 'natural'] - default: 'vivid' - example: 'vivid' + enum: ["vivid", "natural"] + default: "vivid" + example: "vivid" nullable: true description: The style of the generated images. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for `dall-e-3`. user: *end_user_param_configuration @@ -23263,7 +23263,7 @@ components: data: type: array items: - $ref: '#/components/schemas/Image' + $ref: "#/components/schemas/Image" required: - created - data @@ -23300,7 +23300,7 @@ components: The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. parameters: - $ref: '#/components/schemas/FunctionParameters' + $ref: "#/components/schemas/FunctionParameters" strict: type: boolean nullable: true @@ -23446,7 +23446,7 @@ components: - output FunctionToolCallOutputResource: allOf: - - $ref: '#/components/schemas/FunctionToolCallOutput' + - $ref: "#/components/schemas/FunctionToolCallOutput" - type: object properties: id: @@ -23457,7 +23457,7 @@ components: - id FunctionToolCallResource: allOf: - - $ref: '#/components/schemas/FunctionToolCall' + - $ref: "#/components/schemas/FunctionToolCall" - type: object properties: id: @@ -23519,9 +23519,9 @@ components: - format InputContent: oneOf: - - $ref: '#/components/schemas/InputText' - - $ref: '#/components/schemas/InputImage' - - $ref: '#/components/schemas/InputFile' + - $ref: "#/components/schemas/InputText" + - $ref: "#/components/schemas/InputImage" + - $ref: "#/components/schemas/InputFile" x-oaiExpandable: true InputFile: type: object @@ -23594,15 +23594,15 @@ components: - detail InputItem: oneOf: - - $ref: '#/components/schemas/EasyInputMessage' + - $ref: "#/components/schemas/EasyInputMessage" - type: object title: Item description: | An item representing part of the context for the response to be generated by the model. Can contain text, images, and audio inputs, as well as previous assistant responses and tool call outputs. - $ref: '#/components/schemas/Item' - - $ref: '#/components/schemas/ItemReference' + $ref: "#/components/schemas/Item" + - $ref: "#/components/schemas/ItemReference" discriminator: propertyName: type InputMessage: @@ -23642,7 +23642,7 @@ components: - completed - incomplete content: - $ref: '#/components/schemas/InputMessageContentList' + $ref: "#/components/schemas/InputMessageContentList" required: - role - content @@ -23657,10 +23657,10 @@ components: x-oaiExpandable: true items: x-oaiExpandable: true - $ref: '#/components/schemas/InputContent' + $ref: "#/components/schemas/InputContent" InputMessageResource: allOf: - - $ref: '#/components/schemas/InputMessage' + - $ref: "#/components/schemas/InputMessage" - type: object properties: id: @@ -23699,7 +23699,7 @@ components: prompt: description: A text description of the desired image(s). The maximum length is 1000 characters. type: string - example: 'A cute baby sea otter wearing a beret' + example: "A cute baby sea otter wearing a beret" mask: description: An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`. type: string @@ -23708,10 +23708,10 @@ components: anyOf: - type: string - type: string - enum: ['dall-e-2'] + enum: ["dall-e-2"] x-oaiTypeLabel: string - default: 'dall-e-2' - example: 'dall-e-2' + default: "dall-e-2" + example: "dall-e-2" nullable: true description: The model to use for image generation. Only `dall-e-2` is supported at this time. n: @@ -23724,9 +23724,9 @@ components: description: The number of images to generate. Must be between 1 and 10. size: &dalle2_images_size type: string - enum: ['256x256', '512x512', '1024x1024'] - default: '1024x1024' - example: '1024x1024' + enum: ["256x256", "512x512", "1024x1024"] + default: "1024x1024" + example: "1024x1024" nullable: true description: The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`. response_format: *images_response_format @@ -23746,10 +23746,10 @@ components: anyOf: - type: string - type: string - enum: ['dall-e-2'] + enum: ["dall-e-2"] x-oaiTypeLabel: string - default: 'dall-e-2' - example: 'dall-e-2' + default: "dall-e-2" + example: "dall-e-2" nullable: true description: The model to use for image generation. Only `dall-e-2` is supported at this time. n: *images_n @@ -23760,7 +23760,7 @@ components: - image CreateModelResponseProperties: allOf: - - $ref: '#/components/schemas/ModelResponseProperties' + - $ref: "#/components/schemas/ModelResponseProperties" CreateModerationRequest: type: object properties: @@ -23768,25 +23768,25 @@ components: description: The input text to classify oneOf: - type: string - default: '' - example: 'I want to kill them.' + default: "" + example: "I want to kill them." - type: array items: type: string - default: '' - example: 'I want to kill them.' + default: "" + example: "I want to kill them." model: description: | Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`. The default is `text-moderation-latest` which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use `text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy of `text-moderation-stable` may be slightly lower than for `text-moderation-latest`. nullable: false - default: 'text-moderation-latest' - example: 'text-moderation-stable' + default: "text-moderation-latest" + example: "text-moderation-stable" anyOf: - type: string - type: string - enum: ['text-moderation-latest', 'text-moderation-stable'] + enum: ["text-moderation-latest", "text-moderation-stable"] x-oaiTypeLabel: string required: - input @@ -23918,8 +23918,8 @@ components: - results CreateResponse: allOf: - - $ref: '#/components/schemas/CreateModelResponseProperties' - - $ref: '#/components/schemas/ResponseProperties' + - $ref: "#/components/schemas/CreateModelResponseProperties" + - $ref: "#/components/schemas/ResponseProperties" - type: object properties: input: @@ -23955,7 +23955,7 @@ components: different content types. items: x-oaiExpandable: true - $ref: '#/components/schemas/InputItem' + $ref: "#/components/schemas/InputItem" include: type: array description: > @@ -23973,7 +23973,7 @@ components: from the computer call output. items: x-oaiExpandable: true - $ref: '#/components/schemas/Includable' + $ref: "#/components/schemas/Includable" nullable: true parallel_tool_calls: type: boolean @@ -24014,7 +24014,7 @@ components: data: type: array items: - $ref: '#/components/schemas/OpenAIFile' + $ref: "#/components/schemas/OpenAIFile" object: type: string enum: [list] @@ -24037,7 +24037,7 @@ components: Use "assistants" for [Assistants](https://platform.openai.com/docs/api-reference/assistants) and [Message](https://platform.openai.com/docs/api-reference/messages) files, "vision" for Assistants image file inputs, "batch" for [Batch API](https://platform.openai.com/docs/guides/batch), and "fine-tune" for [Fine-tuning](https://platform.openai.com/docs/api-reference/fine-tuning). type: string - enum: ['assistants', 'batch', 'fine-tune', 'vision'] + enum: ["assistants", "batch", "fine-tune", "vision"] required: - file - purpose @@ -24072,7 +24072,7 @@ components: type: string description: Finetune job's output s3 location, will be constructed based on `training_file` if not provided allOf: - - $ref: '#/components/schemas/OpenAIFinetuneJob' + - $ref: "#/components/schemas/OpenAIFinetuneJob" OpenAIFinetuneJob: type: object @@ -24177,14 +24177,14 @@ components: description: Finetune job's output s3 location, will be constructed based on `training_file` if not provided portkey_options: allOf: - - $ref: '#/components/schemas/PortkeyOptions' + - $ref: "#/components/schemas/PortkeyOptions" description: Portkey Gateway Provider specific headers to be passed to the provider, if portkey is used as a provider provider_options: allOf: - - $ref: '#/components/schemas/BedrockParams' + - $ref: "#/components/schemas/BedrockParams" description: Provider specific options to be passed to the provider, optional can be passed directly as well. Can be skipped if same keys are passed at top the level. allOf: - - $ref: '#/components/schemas/OpenAIFinetuneJob' + - $ref: "#/components/schemas/OpenAIFinetuneJob" description: Gateway supported body params for portkey managed fine-tuning. title: Portkey Params PortkeyOptions: @@ -24210,7 +24210,7 @@ components: VertexFinetuneJob: type: object allOf: - - $ref: '#/components/schemas/OpenAIFinetuneJob' + - $ref: "#/components/schemas/OpenAIFinetuneJob" ListFineTuningJobEventsResponse: type: object @@ -24218,7 +24218,7 @@ components: data: type: array items: - $ref: '#/components/schemas/FineTuningJobEvent' + $ref: "#/components/schemas/FineTuningJobEvent" object: type: string enum: [list] @@ -24232,7 +24232,7 @@ components: data: type: array items: - $ref: '#/components/schemas/FineTuningJobCheckpoint' + $ref: "#/components/schemas/FineTuningJobCheckpoint" object: type: string enum: [list] @@ -24256,13 +24256,13 @@ components: input: description: | Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. - example: 'The quick brown fox jumped over the lazy dog' + example: "The quick brown fox jumped over the lazy dog" oneOf: - type: string title: string description: The string that will be turned into an embedding. - default: '' - example: 'This is a test.' + default: "" + example: "This is a test." - type: array title: array description: The array of strings that will be turned into an embedding. @@ -24270,7 +24270,7 @@ components: maxItems: 2048 items: type: string - default: '' + default: "" example: "['This is a test.']" - type: array title: array @@ -24279,7 +24279,7 @@ components: maxItems: 2048 items: type: integer - example: '[1212, 318, 257, 1332, 13]' + example: "[1212, 318, 257, 1332, 13]" - type: array title: array description: The array of arrays containing integers that will be turned into an embedding. @@ -24290,27 +24290,27 @@ components: minItems: 1 items: type: integer - example: '[[1212, 318, 257, 1332, 13]]' + example: "[[1212, 318, 257, 1332, 13]]" x-oaiExpandable: true model: description: *model_description - example: 'text-embedding-3-small' + example: "text-embedding-3-small" anyOf: - type: string - type: string enum: [ - 'text-embedding-ada-002', - 'text-embedding-3-small', - 'text-embedding-3-large', + "text-embedding-ada-002", + "text-embedding-3-small", + "text-embedding-3-large", ] x-oaiTypeLabel: string encoding_format: - description: 'The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).' - example: 'float' - default: 'float' + description: "The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/)." + example: "float" + default: "float" type: string - enum: ['float', 'base64'] + enum: ["float", "base64"] dimensions: description: | The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models. @@ -24328,7 +24328,7 @@ components: type: array description: The list of embeddings generated by the model. items: - $ref: '#/components/schemas/Embedding' + $ref: "#/components/schemas/Embedding" model: type: string description: The name of the model used to generate the embedding. @@ -24362,7 +24362,7 @@ components: - type: string title: string description: A simple text string to be reranked. - example: 'Paris is the capital of France.' + example: "Paris is the capital of France." - type: object title: object description: An object containing the document text and optional metadata. @@ -24370,7 +24370,7 @@ components: text: type: string description: The text content of the document. - example: 'Paris is the capital of France.' + example: "Paris is the capital of France." required: - text additionalProperties: true @@ -24390,23 +24390,23 @@ components: - **Bedrock**: Model ARN (e.g., `arn:aws:bedrock:us-west-2::foundation-model/cohere.rerank-v3-5:0`) - **Azure AI**: Cohere rerank deployments on Azure AI Inference; use the model name from your deployment, typically prefixed with `cohere.` (the gateway strips that prefix for the upstream request) type: string - example: 'rerank-v3.5' + example: "rerank-v3.5" query: description: The search query to compare against the documents. type: string - example: 'What is the capital of France?' + example: "What is the capital of France?" documents: description: | The list of documents to rerank. Each document can be a string or an object with a `text` field. The documents will be scored based on their relevance to the query. type: array items: - $ref: '#/components/schemas/RerankDocument' + $ref: "#/components/schemas/RerankDocument" minItems: 1 example: - - 'Paris is the capital of France.' - - 'Berlin is the capital of Germany.' - - 'Madrid is the capital of Spain.' + - "Paris is the capital of France." + - "Berlin is the capital of Germany." + - "Madrid is the capital of Spain." top_n: description: | The number of top results to return. If not specified, all documents are returned sorted by relevance. @@ -24434,7 +24434,7 @@ components: type: array items: type: string - example: ['text', 'title'] + example: ["text", "title"] truncation: description: | Whether to truncate documents that exceed the model's maximum context length. Voyage-specific parameter. @@ -24492,28 +24492,28 @@ components: id: type: string description: A unique identifier for the rerank request. - example: 'rerank-abc123' + example: "rerank-abc123" object: type: string description: The object type, which is always "list". enum: [list] - example: 'list' + example: "list" results: type: array description: | The reranked results sorted by relevance score in descending order. items: - $ref: '#/components/schemas/RerankResult' + $ref: "#/components/schemas/RerankResult" model: type: string description: The model used for reranking. - example: 'rerank-v3.5' + example: "rerank-v3.5" usage: - $ref: '#/components/schemas/RerankUsage' + $ref: "#/components/schemas/RerankUsage" provider: type: string description: The provider that processed the request. - example: 'cohere' + example: "cohere" required: - object - results @@ -24536,7 +24536,7 @@ components: anyOf: - type: string - type: string - enum: ['whisper-1'] + enum: ["whisper-1"] x-oaiTypeLabel: string language: description: | @@ -24673,12 +24673,12 @@ components: type: array description: Extracted words and their corresponding timestamps. items: - $ref: '#/components/schemas/TranscriptionWord' + $ref: "#/components/schemas/TranscriptionWord" segments: type: array description: Segments of the transcribed text and their corresponding details. items: - $ref: '#/components/schemas/TranscriptionSegment' + $ref: "#/components/schemas/TranscriptionSegment" required: [language, duration, text] CreateTranslationRequest: @@ -24698,7 +24698,7 @@ components: anyOf: - type: string - type: string - enum: ['whisper-1'] + enum: ["whisper-1"] x-oaiTypeLabel: string prompt: description: | @@ -24743,7 +24743,7 @@ components: type: array description: Segments of the translated text and their corresponding details. items: - $ref: '#/components/schemas/TranscriptionSegment' + $ref: "#/components/schemas/TranscriptionSegment" required: [language, duration, text] CreateSpeechRequest: @@ -24756,7 +24756,7 @@ components: anyOf: - type: string - type: string - enum: ['tts-1', 'tts-1-hd'] + enum: ["tts-1", "tts-1-hd"] x-oaiTypeLabel: string input: type: string @@ -24765,14 +24765,14 @@ components: voice: description: The voice to use when generating the audio. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. Previews of the voices are available in the [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech/voice-options). type: string - enum: ['alloy', 'echo', 'fable', 'onyx', 'nova', 'shimmer'] + enum: ["alloy", "echo", "fable", "onyx", "nova", "shimmer"] response_format: - description: 'The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.' - default: 'mp3' + description: "The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`." + default: "mp3" type: string - enum: ['mp3', 'opus', 'aac', 'flac', 'wav', 'pcm'] + enum: ["mp3", "opus", "aac", "flac", "wav", "pcm"] speed: - description: 'The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.' + description: "The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default." type: number default: 1.0 minimum: 0.25 @@ -24850,25 +24850,25 @@ components: object: type: string description: The object type, which is always `file`. - enum: ['file'] + enum: ["file"] purpose: type: string description: The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results` and `vision`. enum: [ - 'assistants', - 'assistants_output', - 'batch', - 'batch_output', - 'fine-tune', - 'fine-tune-results', - 'vision', + "assistants", + "assistants_output", + "batch", + "batch_output", + "fine-tune", + "fine-tune-results", + "vision", ] status: type: string deprecated: true description: Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`. - enum: ['uploaded', 'processed', 'error'] + enum: ["uploaded", "processed", "error"] status_details: type: string deprecated: true @@ -24958,7 +24958,7 @@ components: x-oaiExpandable: true description: | A series of x/y coordinate pairs in the drag path. - $ref: '#/components/schemas/Coordinate' + $ref: "#/components/schemas/Coordinate" required: - type - path @@ -25003,7 +25003,7 @@ components: title: Text input description: | A text input to the model. - - $ref: '#/components/schemas/InputMessageContentList' + - $ref: "#/components/schemas/InputMessageContentList" type: type: string description: | @@ -25128,12 +25128,12 @@ components: description: The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`. enum: [ - 'validating_files', - 'queued', - 'running', - 'succeeded', - 'failed', - 'cancelled', + "validating_files", + "queued", + "running", + "succeeded", + "failed", + "cancelled", ] trained_tokens: type: integer @@ -25153,7 +25153,7 @@ components: maxItems: 5 items: oneOf: - - $ref: '#/components/schemas/FineTuningIntegration' + - $ref: "#/components/schemas/FineTuningIntegration" x-oaiExpandable: true seed: type: integer @@ -25188,8 +25188,8 @@ components: properties: type: type: string - description: 'The type of the integration being enabled for the fine-tuning job' - enum: ['wandb'] + description: "The type of the integration being enabled for the fine-tuning job" + enum: ["wandb"] wandb: type: object description: | @@ -25203,7 +25203,7 @@ components: description: | The name of the project that the new run will be created under. type: string - example: 'my-wandb-project' + example: "my-wandb-project" name: description: | A display name to set for the run. If not set, we will use the Job ID as the name. @@ -25222,7 +25222,7 @@ components: type: array items: type: string - example: 'custom-tag' + example: "custom-tag" FineTuningJobEvent: type: object @@ -25234,7 +25234,7 @@ components: type: integer level: type: string - enum: ['info', 'warn', 'error'] + enum: ["info", "warn", "error"] message: type: string object: @@ -25338,10 +25338,10 @@ components: minItems: 1 items: oneOf: - - $ref: '#/components/schemas/ChatCompletionRequestSystemMessage' - - $ref: '#/components/schemas/ChatCompletionRequestUserMessage' - - $ref: '#/components/schemas/FineTuneChatCompletionRequestAssistantMessage' - - $ref: '#/components/schemas/FineTuneChatCompletionRequestFunctionMessage' + - $ref: "#/components/schemas/ChatCompletionRequestSystemMessage" + - $ref: "#/components/schemas/ChatCompletionRequestUserMessage" + - $ref: "#/components/schemas/FineTuneChatCompletionRequestAssistantMessage" + - $ref: "#/components/schemas/FineTuneChatCompletionRequestFunctionMessage" x-oaiExpandable: true functions: description: A list of functions the model may generate JSON inputs for. @@ -25349,7 +25349,7 @@ components: minItems: 1 maxItems: 128 items: - $ref: '#/components/schemas/ChatCompletionFunctions' + $ref: "#/components/schemas/ChatCompletionFunctions" x-code-samples: name: Training format for chat models example: | @@ -25516,7 +25516,7 @@ components: type: array items: x-oaiExpandable: true - $ref: '#/components/schemas/CodeInterpreterToolOutput' + $ref: "#/components/schemas/CodeInterpreterToolOutput" description: | The results of the code interpreter tool call. required: @@ -25527,8 +25527,8 @@ components: - results CodeInterpreterToolOutput: oneOf: - - $ref: '#/components/schemas/CodeInterpreterTextOutput' - - $ref: '#/components/schemas/CodeInterpreterFileOutput' + - $ref: "#/components/schemas/CodeInterpreterTextOutput" + - $ref: "#/components/schemas/CodeInterpreterFileOutput" ComparisonFilter: type: object additionalProperties: false @@ -25641,7 +25641,7 @@ components: properties: type: type: string - description: 'Type of operation: `and` or `or`.' + description: "Type of operation: `and` or `or`." enum: - and - or @@ -25652,7 +25652,7 @@ components: `CompoundFilter`. items: oneOf: - - $ref: '#/components/schemas/ComparisonFilter' + - $ref: "#/components/schemas/ComparisonFilter" - type: object additionalProperties: true required: @@ -25660,15 +25660,15 @@ components: - filters ComputerAction: oneOf: - - $ref: '#/components/schemas/Click' - - $ref: '#/components/schemas/DoubleClick' - - $ref: '#/components/schemas/Drag' - - $ref: '#/components/schemas/KeyPress' - - $ref: '#/components/schemas/Move' - - $ref: '#/components/schemas/Screenshot' - - $ref: '#/components/schemas/Scroll' - - $ref: '#/components/schemas/Type' - - $ref: '#/components/schemas/Wait' + - $ref: "#/components/schemas/Click" + - $ref: "#/components/schemas/DoubleClick" + - $ref: "#/components/schemas/Drag" + - $ref: "#/components/schemas/KeyPress" + - $ref: "#/components/schemas/Move" + - $ref: "#/components/schemas/Screenshot" + - $ref: "#/components/schemas/Scroll" + - $ref: "#/components/schemas/Type" + - $ref: "#/components/schemas/Wait" ComputerScreenshotImage: type: object description: | @@ -25752,13 +25752,13 @@ components: description: | An identifier used when responding to the tool call with output. action: - $ref: '#/components/schemas/ComputerAction' + $ref: "#/components/schemas/ComputerAction" x-oaiExpandable: true pending_safety_checks: type: array x-oaiExpandable: true items: - $ref: '#/components/schemas/ComputerToolCallSafetyCheck' + $ref: "#/components/schemas/ComputerToolCallSafetyCheck" description: | The pending safety checks for the computer call. status: @@ -25809,9 +25809,9 @@ components: developer. items: - $ref: '#/components/schemas/ComputerToolCallSafetyCheck' + $ref: "#/components/schemas/ComputerToolCallSafetyCheck" output: - $ref: '#/components/schemas/ComputerScreenshotImage' + $ref: "#/components/schemas/ComputerScreenshotImage" status: type: string description: > @@ -25829,7 +25829,7 @@ components: - output ComputerToolCallOutputResource: allOf: - - $ref: '#/components/schemas/ComputerToolCallOutput' + - $ref: "#/components/schemas/ComputerToolCallOutput" - type: object properties: id: @@ -25862,10 +25862,10 @@ components: oneOf: - title: Input content types x-oaiExpandable: true - $ref: '#/components/schemas/InputContent' + $ref: "#/components/schemas/InputContent" - title: Output content types x-oaiExpandable: true - $ref: '#/components/schemas/OutputContent' + $ref: "#/components/schemas/OutputContent" Coordinate: type: object title: Coordinate @@ -25927,7 +25927,7 @@ components: x-oaiExpandable: true properties: effort: - $ref: '#/components/schemas/ReasoningEffort' + $ref: "#/components/schemas/ReasoningEffort" generate_summary: type: string description: > @@ -26040,8 +26040,8 @@ components: - refusal Response: allOf: - - $ref: '#/components/schemas/ModelResponseProperties' - - $ref: '#/components/schemas/ResponseProperties' + - $ref: "#/components/schemas/ModelResponseProperties" + - $ref: "#/components/schemas/ResponseProperties" - type: object properties: id: @@ -26072,7 +26072,7 @@ components: description: | Unix timestamp (in seconds) of when this Response was created. error: - $ref: '#/components/schemas/ResponseError' + $ref: "#/components/schemas/ResponseError" incomplete_details: type: object nullable: true @@ -26101,7 +26101,7 @@ components: the model, you might consider using the `output_text` property where supported in SDKs. items: - $ref: '#/components/schemas/OutputItem' + $ref: "#/components/schemas/OutputItem" x-oaiExpandable: true output_text: type: string @@ -26118,7 +26118,7 @@ components: - python - javascript usage: - $ref: '#/components/schemas/ResponseUsage' + $ref: "#/components/schemas/ResponseUsage" parallel_tool_calls: type: boolean description: | @@ -26274,7 +26274,7 @@ components: The index of the output item that the code interpreter call is in progress. code_interpreter_call: - $ref: '#/components/schemas/CodeInterpreterToolCall' + $ref: "#/components/schemas/CodeInterpreterToolCall" required: - type - response_id @@ -26298,7 +26298,7 @@ components: The index of the output item that the code interpreter call is in progress. code_interpreter_call: - $ref: '#/components/schemas/CodeInterpreterToolCall' + $ref: "#/components/schemas/CodeInterpreterToolCall" required: - type - response_id @@ -26324,7 +26324,7 @@ components: The index of the output item that the code interpreter call is in progress. code_interpreter_call: - $ref: '#/components/schemas/CodeInterpreterToolCall' + $ref: "#/components/schemas/CodeInterpreterToolCall" required: - type - response_id @@ -26342,7 +26342,7 @@ components: - response.completed x-stainless-const: true response: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" description: | Properties of the completed response. required: @@ -26373,7 +26373,7 @@ components: The index of the content part that was added. part: x-oaiExpandable: true - $ref: '#/components/schemas/OutputContent' + $ref: "#/components/schemas/OutputContent" description: | The content part that was added. required: @@ -26407,7 +26407,7 @@ components: The index of the content part that is done. part: x-oaiExpandable: true - $ref: '#/components/schemas/OutputContent' + $ref: "#/components/schemas/OutputContent" description: | The content part that is done. required: @@ -26429,7 +26429,7 @@ components: - response.created x-stainless-const: true response: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" description: | The response that was created. required: @@ -26442,7 +26442,7 @@ components: nullable: true properties: code: - $ref: '#/components/schemas/ResponseErrorCode' + $ref: "#/components/schemas/ResponseErrorCode" message: type: string description: | @@ -26516,7 +26516,7 @@ components: - response.failed x-stainless-const: true response: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" description: | The response that failed. required: @@ -26649,7 +26649,7 @@ components: underscores and dashes, with a maximum length of 64. schema: - $ref: '#/components/schemas/ResponseFormatJsonSchemaSchema' + $ref: "#/components/schemas/ResponseFormatJsonSchemaSchema" strict: type: boolean nullable: true @@ -26759,7 +26759,7 @@ components: - response.in_progress x-stainless-const: true response: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" description: | The response that is in progress. required: @@ -26778,7 +26778,7 @@ components: - response.incomplete x-stainless-const: true response: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" description: | The response that was incomplete. required: @@ -26798,7 +26798,7 @@ components: type: array description: A list of items used to generate this response. items: - $ref: '#/components/schemas/ItemResource' + $ref: "#/components/schemas/ItemResource" has_more: type: boolean description: Whether there are more items available. @@ -26875,7 +26875,7 @@ components: description: | The index of the output item that was added. item: - $ref: '#/components/schemas/OutputItem' + $ref: "#/components/schemas/OutputItem" x-oaiExpandable: true description: | The output item that was added. @@ -26899,7 +26899,7 @@ components: description: | The index of the output item that was marked done. item: - $ref: '#/components/schemas/OutputItem' + $ref: "#/components/schemas/OutputItem" x-oaiExpandable: true description: | The output item that was marked done. @@ -26929,9 +26929,9 @@ components: guide](/docs/models) to browse and compare available models. - $ref: '#/components/schemas/ModelIdsResponses' + $ref: "#/components/schemas/ModelIdsResponses" reasoning: - $ref: '#/components/schemas/Reasoning' + $ref: "#/components/schemas/Reasoning" nullable: true max_output_tokens: description: > @@ -26968,7 +26968,7 @@ components: - [Structured Outputs](/docs/guides/structured-outputs) properties: format: - $ref: '#/components/schemas/TextResponseFormatConfiguration' + $ref: "#/components/schemas/TextResponseFormatConfiguration" tools: type: array description: > @@ -26992,7 +26992,7 @@ components: enabling the model to call your own code. Learn more about [function calling](/docs/guides/function-calling). items: - $ref: '#/components/schemas/Tool' + $ref: "#/components/schemas/Tool" tool_choice: description: > How the model should select which tool (or tools) to use when @@ -27004,9 +27004,9 @@ components: the model can call. x-oaiExpandable: true oneOf: - - $ref: '#/components/schemas/ToolChoiceOptions' - - $ref: '#/components/schemas/ToolChoiceTypes' - - $ref: '#/components/schemas/ToolChoiceFunction' + - $ref: "#/components/schemas/ToolChoiceOptions" + - $ref: "#/components/schemas/ToolChoiceTypes" + - $ref: "#/components/schemas/ToolChoiceFunction" truncation: type: string description: > @@ -27092,38 +27092,38 @@ components: - refusal ResponseStreamEvent: anyOf: - - $ref: '#/components/schemas/ResponseAudioDeltaEvent' - - $ref: '#/components/schemas/ResponseAudioDoneEvent' - - $ref: '#/components/schemas/ResponseAudioTranscriptDeltaEvent' - - $ref: '#/components/schemas/ResponseAudioTranscriptDoneEvent' - - $ref: '#/components/schemas/ResponseCodeInterpreterCallCodeDeltaEvent' - - $ref: '#/components/schemas/ResponseCodeInterpreterCallCodeDoneEvent' - - $ref: '#/components/schemas/ResponseCodeInterpreterCallCompletedEvent' - - $ref: '#/components/schemas/ResponseCodeInterpreterCallInProgressEvent' - - $ref: '#/components/schemas/ResponseCodeInterpreterCallInterpretingEvent' - - $ref: '#/components/schemas/ResponseCompletedEvent' - - $ref: '#/components/schemas/ResponseContentPartAddedEvent' - - $ref: '#/components/schemas/ResponseContentPartDoneEvent' - - $ref: '#/components/schemas/ResponseCreatedEvent' - - $ref: '#/components/schemas/ResponseErrorEvent' - - $ref: '#/components/schemas/ResponseFileSearchCallCompletedEvent' - - $ref: '#/components/schemas/ResponseFileSearchCallInProgressEvent' - - $ref: '#/components/schemas/ResponseFileSearchCallSearchingEvent' - - $ref: '#/components/schemas/ResponseFunctionCallArgumentsDeltaEvent' - - $ref: '#/components/schemas/ResponseFunctionCallArgumentsDoneEvent' - - $ref: '#/components/schemas/ResponseInProgressEvent' - - $ref: '#/components/schemas/ResponseFailedEvent' - - $ref: '#/components/schemas/ResponseIncompleteEvent' - - $ref: '#/components/schemas/ResponseOutputItemAddedEvent' - - $ref: '#/components/schemas/ResponseOutputItemDoneEvent' - - $ref: '#/components/schemas/ResponseRefusalDeltaEvent' - - $ref: '#/components/schemas/ResponseRefusalDoneEvent' - - $ref: '#/components/schemas/ResponseTextAnnotationDeltaEvent' - - $ref: '#/components/schemas/ResponseTextDeltaEvent' - - $ref: '#/components/schemas/ResponseTextDoneEvent' - - $ref: '#/components/schemas/ResponseWebSearchCallCompletedEvent' - - $ref: '#/components/schemas/ResponseWebSearchCallInProgressEvent' - - $ref: '#/components/schemas/ResponseWebSearchCallSearchingEvent' + - $ref: "#/components/schemas/ResponseAudioDeltaEvent" + - $ref: "#/components/schemas/ResponseAudioDoneEvent" + - $ref: "#/components/schemas/ResponseAudioTranscriptDeltaEvent" + - $ref: "#/components/schemas/ResponseAudioTranscriptDoneEvent" + - $ref: "#/components/schemas/ResponseCodeInterpreterCallCodeDeltaEvent" + - $ref: "#/components/schemas/ResponseCodeInterpreterCallCodeDoneEvent" + - $ref: "#/components/schemas/ResponseCodeInterpreterCallCompletedEvent" + - $ref: "#/components/schemas/ResponseCodeInterpreterCallInProgressEvent" + - $ref: "#/components/schemas/ResponseCodeInterpreterCallInterpretingEvent" + - $ref: "#/components/schemas/ResponseCompletedEvent" + - $ref: "#/components/schemas/ResponseContentPartAddedEvent" + - $ref: "#/components/schemas/ResponseContentPartDoneEvent" + - $ref: "#/components/schemas/ResponseCreatedEvent" + - $ref: "#/components/schemas/ResponseErrorEvent" + - $ref: "#/components/schemas/ResponseFileSearchCallCompletedEvent" + - $ref: "#/components/schemas/ResponseFileSearchCallInProgressEvent" + - $ref: "#/components/schemas/ResponseFileSearchCallSearchingEvent" + - $ref: "#/components/schemas/ResponseFunctionCallArgumentsDeltaEvent" + - $ref: "#/components/schemas/ResponseFunctionCallArgumentsDoneEvent" + - $ref: "#/components/schemas/ResponseInProgressEvent" + - $ref: "#/components/schemas/ResponseFailedEvent" + - $ref: "#/components/schemas/ResponseIncompleteEvent" + - $ref: "#/components/schemas/ResponseOutputItemAddedEvent" + - $ref: "#/components/schemas/ResponseOutputItemDoneEvent" + - $ref: "#/components/schemas/ResponseRefusalDeltaEvent" + - $ref: "#/components/schemas/ResponseRefusalDoneEvent" + - $ref: "#/components/schemas/ResponseTextAnnotationDeltaEvent" + - $ref: "#/components/schemas/ResponseTextDeltaEvent" + - $ref: "#/components/schemas/ResponseTextDoneEvent" + - $ref: "#/components/schemas/ResponseWebSearchCallCompletedEvent" + - $ref: "#/components/schemas/ResponseWebSearchCallInProgressEvent" + - $ref: "#/components/schemas/ResponseWebSearchCallSearchingEvent" discriminator: propertyName: type ResponseTextAnnotationDeltaEvent: @@ -27155,7 +27155,7 @@ components: description: | The index of the annotation that was added. annotation: - $ref: '#/components/schemas/Annotation' + $ref: "#/components/schemas/Annotation" required: - type - item_id @@ -27392,7 +27392,7 @@ components: description: > `auto` is the default value enum: [none, auto] - - $ref: '#/components/schemas/AssistantsApiResponseFormat' + - $ref: "#/components/schemas/AssistantsApiResponseFormat" x-oaiExpandable: true AssistantsApiResponseFormat: @@ -27402,15 +27402,15 @@ components: properties: type: type: string - enum: ['text', 'json_object'] - example: 'json_object' - default: 'text' + enum: ["text", "json_object"] + example: "json_object" + default: "text" description: Must be one of `text` or `json_object`. Annotation: oneOf: - - $ref: '#/components/schemas/FileCitation' - - $ref: '#/components/schemas/UrlCitation' - - $ref: '#/components/schemas/FilePath' + - $ref: "#/components/schemas/FileCitation" + - $ref: "#/components/schemas/UrlCitation" + - $ref: "#/components/schemas/FilePath" AssistantObject: type: object title: Assistant @@ -27455,9 +27455,9 @@ components: maxItems: 128 items: oneOf: - - $ref: '#/components/schemas/AssistantToolsCode' - - $ref: '#/components/schemas/AssistantToolsFileSearch' - - $ref: '#/components/schemas/AssistantToolsFunction' + - $ref: "#/components/schemas/AssistantToolsCode" + - $ref: "#/components/schemas/AssistantToolsFileSearch" + - $ref: "#/components/schemas/AssistantToolsFunction" x-oaiExpandable: true tool_resources: type: object @@ -27513,7 +27513,7 @@ components: We generally recommend altering this or temperature but not both. response_format: - $ref: '#/components/schemas/AssistantsApiResponseFormatOption' + $ref: "#/components/schemas/AssistantsApiResponseFormatOption" nullable: true required: - id @@ -27536,32 +27536,32 @@ components: properties: model: description: *model_description - example: 'gpt-4-turbo' + example: "gpt-4-turbo" anyOf: - type: string - type: string enum: [ - 'gpt-4o', - 'gpt-4o-2024-05-13', - 'gpt-4-turbo', - 'gpt-4-turbo-2024-04-09', - 'gpt-4-0125-preview', - 'gpt-4-turbo-preview', - 'gpt-4-1106-preview', - 'gpt-4-vision-preview', - 'gpt-4', - 'gpt-4-0314', - 'gpt-4-0613', - 'gpt-4-32k', - 'gpt-4-32k-0314', - 'gpt-4-32k-0613', - 'gpt-3.5-turbo', - 'gpt-3.5-turbo-16k', - 'gpt-3.5-turbo-0613', - 'gpt-3.5-turbo-1106', - 'gpt-3.5-turbo-0125', - 'gpt-3.5-turbo-16k-0613', + "gpt-4o", + "gpt-4o-2024-05-13", + "gpt-4-turbo", + "gpt-4-turbo-2024-04-09", + "gpt-4-0125-preview", + "gpt-4-turbo-preview", + "gpt-4-1106-preview", + "gpt-4-vision-preview", + "gpt-4", + "gpt-4-0314", + "gpt-4-0613", + "gpt-4-32k", + "gpt-4-32k-0314", + "gpt-4-32k-0613", + "gpt-3.5-turbo", + "gpt-3.5-turbo-16k", + "gpt-3.5-turbo-0613", + "gpt-3.5-turbo-1106", + "gpt-3.5-turbo-0125", + "gpt-3.5-turbo-16k-0613", ] x-oaiTypeLabel: string name: @@ -27586,9 +27586,9 @@ components: maxItems: 128 items: oneOf: - - $ref: '#/components/schemas/AssistantToolsCode' - - $ref: '#/components/schemas/AssistantToolsFileSearch' - - $ref: '#/components/schemas/AssistantToolsFunction' + - $ref: "#/components/schemas/AssistantToolsCode" + - $ref: "#/components/schemas/AssistantToolsFileSearch" + - $ref: "#/components/schemas/AssistantToolsFunction" x-oaiExpandable: true tool_resources: type: object @@ -27644,7 +27644,7 @@ components: type: type: string description: Always `auto`. - enum: ['auto'] + enum: ["auto"] required: - type - type: object @@ -27654,7 +27654,7 @@ components: type: type: string description: Always `static`. - enum: ['static'] + enum: ["static"] static: type: object additionalProperties: false @@ -27708,7 +27708,7 @@ components: nullable: true description: *run_top_p_description response_format: - $ref: '#/components/schemas/AssistantsApiResponseFormatOption' + $ref: "#/components/schemas/AssistantsApiResponseFormatOption" nullable: true required: - model @@ -27744,7 +27744,7 @@ components: type: object properties: metadata: - $ref: '#/components/schemas/Metadata' + $ref: "#/components/schemas/Metadata" temperature: type: number minimum: 0 @@ -27816,9 +27816,9 @@ components: maxItems: 128 items: oneOf: - - $ref: '#/components/schemas/AssistantToolsCode' - - $ref: '#/components/schemas/AssistantToolsFileSearch' - - $ref: '#/components/schemas/AssistantToolsFunction' + - $ref: "#/components/schemas/AssistantToolsCode" + - $ref: "#/components/schemas/AssistantToolsFileSearch" + - $ref: "#/components/schemas/AssistantToolsFunction" x-oaiExpandable: true tool_resources: type: object @@ -27869,7 +27869,7 @@ components: nullable: true description: *run_top_p_description response_format: - $ref: '#/components/schemas/AssistantsApiResponseFormatOption' + $ref: "#/components/schemas/AssistantsApiResponseFormatOption" nullable: true DeleteAssistantResponse: @@ -27891,15 +27891,15 @@ components: description: | Content item used to generate a response. oneOf: - - $ref: '#/components/schemas/InputMessage' - - $ref: '#/components/schemas/OutputMessage' - - $ref: '#/components/schemas/FileSearchToolCall' - - $ref: '#/components/schemas/ComputerToolCall' - - $ref: '#/components/schemas/ComputerToolCallOutput' - - $ref: '#/components/schemas/WebSearchToolCall' - - $ref: '#/components/schemas/FunctionToolCall' - - $ref: '#/components/schemas/FunctionToolCallOutput' - - $ref: '#/components/schemas/ReasoningItem' + - $ref: "#/components/schemas/InputMessage" + - $ref: "#/components/schemas/OutputMessage" + - $ref: "#/components/schemas/FileSearchToolCall" + - $ref: "#/components/schemas/ComputerToolCall" + - $ref: "#/components/schemas/ComputerToolCallOutput" + - $ref: "#/components/schemas/WebSearchToolCall" + - $ref: "#/components/schemas/FunctionToolCall" + - $ref: "#/components/schemas/FunctionToolCallOutput" + - $ref: "#/components/schemas/ReasoningItem" x-oaiExpandable: true discriminator: propertyName: type @@ -27927,14 +27927,14 @@ components: description: | Content item used to generate a response. oneOf: - - $ref: '#/components/schemas/InputMessageResource' - - $ref: '#/components/schemas/OutputMessage' - - $ref: '#/components/schemas/FileSearchToolCall' - - $ref: '#/components/schemas/ComputerToolCall' - - $ref: '#/components/schemas/ComputerToolCallOutputResource' - - $ref: '#/components/schemas/WebSearchToolCall' - - $ref: '#/components/schemas/FunctionToolCallResource' - - $ref: '#/components/schemas/FunctionToolCallOutputResource' + - $ref: "#/components/schemas/InputMessageResource" + - $ref: "#/components/schemas/OutputMessage" + - $ref: "#/components/schemas/FileSearchToolCall" + - $ref: "#/components/schemas/ComputerToolCall" + - $ref: "#/components/schemas/ComputerToolCallOutputResource" + - $ref: "#/components/schemas/WebSearchToolCall" + - $ref: "#/components/schemas/FunctionToolCallResource" + - $ref: "#/components/schemas/FunctionToolCallOutputResource" x-oaiExpandable: true discriminator: propertyName: type @@ -27972,17 +27972,17 @@ components: properties: object: type: string - example: 'list' + example: "list" data: type: array items: - $ref: '#/components/schemas/AssistantObject' + $ref: "#/components/schemas/AssistantObject" first_id: type: string - example: 'asst_abc123' + example: "asst_abc123" last_id: type: string - example: 'asst_abc456' + example: "asst_abc456" has_more: type: boolean example: false @@ -28003,8 +28003,8 @@ components: properties: type: type: string - description: 'The type of tool being defined: `code_interpreter`' - enum: ['code_interpreter'] + description: "The type of tool being defined: `code_interpreter`" + enum: ["code_interpreter"] required: - type @@ -28014,8 +28014,8 @@ components: properties: type: type: string - description: 'The type of tool being defined: `file_search`' - enum: ['file_search'] + description: "The type of tool being defined: `file_search`" + enum: ["file_search"] file_search: type: object description: Overrides for the file search tool. @@ -28037,8 +28037,8 @@ components: properties: type: type: string - description: 'The type of tool being defined: `file_search`' - enum: ['file_search'] + description: "The type of tool being defined: `file_search`" + enum: ["file_search"] required: - type @@ -28048,10 +28048,10 @@ components: properties: type: type: string - description: 'The type of tool being defined: `function`' - enum: ['function'] + description: "The type of tool being defined: `function`" + enum: ["function"] function: - $ref: '#/components/schemas/FunctionObject' + $ref: "#/components/schemas/FunctionObject" required: - type - function @@ -28064,7 +28064,7 @@ components: type: type: string description: The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`. - enum: ['auto', 'last_messages'] + enum: ["auto", "last_messages"] last_messages: type: integer description: The number of most recent messages from the thread when constructing the context for the run. @@ -28088,7 +28088,7 @@ components: `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools before responding to the user. enum: [none, auto, required] - - $ref: '#/components/schemas/AssistantsNamedToolChoice' + - $ref: "#/components/schemas/AssistantsNamedToolChoice" x-oaiExpandable: true AssistantsNamedToolChoice: @@ -28097,7 +28097,7 @@ components: properties: type: type: string - enum: ['function', 'code_interpreter', 'file_search'] + enum: ["function", "code_interpreter", "file_search"] description: The type of the tool. If type is `function`, the function name must be set function: type: object @@ -28121,7 +28121,7 @@ components: object: description: The object type, which is always `thread.run`. type: string - enum: ['thread.run'] + enum: ["thread.run"] created_at: description: The Unix timestamp (in seconds) for when the run was created. type: integer @@ -28136,15 +28136,15 @@ components: type: string enum: [ - 'queued', - 'in_progress', - 'requires_action', - 'cancelling', - 'cancelled', - 'failed', - 'completed', - 'incomplete', - 'expired', + "queued", + "in_progress", + "requires_action", + "cancelling", + "cancelled", + "failed", + "completed", + "incomplete", + "expired", ] required_action: type: object @@ -28154,7 +28154,7 @@ components: type: description: For now, this is always `submit_tool_outputs`. type: string - enum: ['submit_tool_outputs'] + enum: ["submit_tool_outputs"] submit_tool_outputs: type: object description: Details on the tool outputs needed for this run to continue. @@ -28163,7 +28163,7 @@ components: type: array description: A list of the relevant tool calls. items: - $ref: '#/components/schemas/RunToolCallObject' + $ref: "#/components/schemas/RunToolCallObject" required: - tool_calls required: @@ -28177,7 +28177,7 @@ components: code: type: string description: One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`. - enum: ['server_error', 'rate_limit_exceeded', 'invalid_prompt'] + enum: ["server_error", "rate_limit_exceeded", "invalid_prompt"] message: type: string description: A human-readable description of the error. @@ -28212,7 +28212,7 @@ components: reason: description: The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run. type: string - enum: ['max_completion_tokens', 'max_prompt_tokens'] + enum: ["max_completion_tokens", "max_prompt_tokens"] model: description: The model that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run. type: string @@ -28226,9 +28226,9 @@ components: maxItems: 20 items: oneOf: - - $ref: '#/components/schemas/AssistantToolsCode' - - $ref: '#/components/schemas/AssistantToolsFileSearch' - - $ref: '#/components/schemas/AssistantToolsFunction' + - $ref: "#/components/schemas/AssistantToolsCode" + - $ref: "#/components/schemas/AssistantToolsFileSearch" + - $ref: "#/components/schemas/AssistantToolsFunction" x-oaiExpandable: true metadata: description: *metadata_description @@ -28236,7 +28236,7 @@ components: x-oaiTypeLabel: map nullable: true usage: - $ref: '#/components/schemas/RunCompletionUsage' + $ref: "#/components/schemas/RunCompletionUsage" temperature: description: The sampling temperature used for this run. If not set, defaults to 1. type: number @@ -28258,15 +28258,15 @@ components: The maximum number of completion tokens specified to have been used over the course of the run. minimum: 256 truncation_strategy: - $ref: '#/components/schemas/TruncationObject' + $ref: "#/components/schemas/TruncationObject" nullable: true tool_choice: - $ref: '#/components/schemas/AssistantsApiToolChoiceOption' + $ref: "#/components/schemas/AssistantsApiToolChoiceOption" nullable: true parallel_tool_calls: - $ref: '#/components/schemas/ParallelToolCalls' + $ref: "#/components/schemas/ParallelToolCalls" response_format: - $ref: '#/components/schemas/AssistantsApiResponseFormatOption' + $ref: "#/components/schemas/AssistantsApiResponseFormatOption" nullable: true required: - id @@ -28342,32 +28342,32 @@ components: type: string model: description: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. - example: 'gpt-4-turbo' + example: "gpt-4-turbo" anyOf: - type: string - type: string enum: [ - 'gpt-4o', - 'gpt-4o-2024-05-13', - 'gpt-4-turbo', - 'gpt-4-turbo-2024-04-09', - 'gpt-4-0125-preview', - 'gpt-4-turbo-preview', - 'gpt-4-1106-preview', - 'gpt-4-vision-preview', - 'gpt-4', - 'gpt-4-0314', - 'gpt-4-0613', - 'gpt-4-32k', - 'gpt-4-32k-0314', - 'gpt-4-32k-0613', - 'gpt-3.5-turbo', - 'gpt-3.5-turbo-16k', - 'gpt-3.5-turbo-0613', - 'gpt-3.5-turbo-1106', - 'gpt-3.5-turbo-0125', - 'gpt-3.5-turbo-16k-0613', + "gpt-4o", + "gpt-4o-2024-05-13", + "gpt-4-turbo", + "gpt-4-turbo-2024-04-09", + "gpt-4-0125-preview", + "gpt-4-turbo-preview", + "gpt-4-1106-preview", + "gpt-4-vision-preview", + "gpt-4", + "gpt-4-0314", + "gpt-4-0613", + "gpt-4-32k", + "gpt-4-32k-0314", + "gpt-4-32k-0613", + "gpt-3.5-turbo", + "gpt-3.5-turbo-16k", + "gpt-3.5-turbo-0613", + "gpt-3.5-turbo-1106", + "gpt-3.5-turbo-0125", + "gpt-3.5-turbo-16k-0613", ] x-oaiTypeLabel: string nullable: true @@ -28383,7 +28383,7 @@ components: description: Adds additional messages to the thread before creating the run. type: array items: - $ref: '#/components/schemas/CreateMessageRequest' + $ref: "#/components/schemas/CreateMessageRequest" nullable: true tools: description: Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. @@ -28392,9 +28392,9 @@ components: maxItems: 20 items: oneOf: - - $ref: '#/components/schemas/AssistantToolsCode' - - $ref: '#/components/schemas/AssistantToolsFileSearch' - - $ref: '#/components/schemas/AssistantToolsFunction' + - $ref: "#/components/schemas/AssistantToolsCode" + - $ref: "#/components/schemas/AssistantToolsFileSearch" + - $ref: "#/components/schemas/AssistantToolsFunction" x-oaiExpandable: true metadata: description: *metadata_description @@ -28435,15 +28435,15 @@ components: The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. minimum: 256 truncation_strategy: - $ref: '#/components/schemas/TruncationObject' + $ref: "#/components/schemas/TruncationObject" nullable: true tool_choice: - $ref: '#/components/schemas/AssistantsApiToolChoiceOption' + $ref: "#/components/schemas/AssistantsApiToolChoiceOption" nullable: true parallel_tool_calls: - $ref: '#/components/schemas/ParallelToolCalls' + $ref: "#/components/schemas/ParallelToolCalls" response_format: - $ref: '#/components/schemas/AssistantsApiResponseFormatOption' + $ref: "#/components/schemas/AssistantsApiResponseFormatOption" nullable: true required: - thread_id @@ -28453,17 +28453,17 @@ components: properties: object: type: string - example: 'list' + example: "list" data: type: array items: - $ref: '#/components/schemas/RunObject' + $ref: "#/components/schemas/RunObject" first_id: type: string - example: 'run_abc123' + example: "run_abc123" last_id: type: string - example: 'run_abc456' + example: "run_abc456" has_more: type: boolean example: false @@ -28532,9 +28532,9 @@ components: is preferred for models that support it. oneOf: - - $ref: '#/components/schemas/ResponseFormatText' - - $ref: '#/components/schemas/TextResponseFormatJsonSchema' - - $ref: '#/components/schemas/ResponseFormatJsonObject' + - $ref: "#/components/schemas/ResponseFormatText" + - $ref: "#/components/schemas/TextResponseFormatJsonSchema" + - $ref: "#/components/schemas/ResponseFormatJsonObject" x-oaiExpandable: true TextResponseFormatJsonSchema: type: object @@ -28562,7 +28562,7 @@ components: The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. schema: - $ref: '#/components/schemas/ResponseFormatJsonSchemaSchema' + $ref: "#/components/schemas/ResponseFormatJsonSchemaSchema" strict: type: boolean nullable: true @@ -28593,7 +28593,7 @@ components: type: type: string description: The type of tool call the output is required for. For now, this is always `function`. - enum: ['function'] + enum: ["function"] function: type: object description: The function definition. @@ -28673,36 +28673,36 @@ components: description: The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. type: string thread: - $ref: '#/components/schemas/CreateThreadRequest' + $ref: "#/components/schemas/CreateThreadRequest" description: If no thread is provided, an empty thread will be created. model: description: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. - example: 'gpt-4-turbo' + example: "gpt-4-turbo" anyOf: - type: string - type: string enum: [ - 'gpt-4o', - 'gpt-4o-2024-05-13', - 'gpt-4-turbo', - 'gpt-4-turbo-2024-04-09', - 'gpt-4-0125-preview', - 'gpt-4-turbo-preview', - 'gpt-4-1106-preview', - 'gpt-4-vision-preview', - 'gpt-4', - 'gpt-4-0314', - 'gpt-4-0613', - 'gpt-4-32k', - 'gpt-4-32k-0314', - 'gpt-4-32k-0613', - 'gpt-3.5-turbo', - 'gpt-3.5-turbo-16k', - 'gpt-3.5-turbo-0613', - 'gpt-3.5-turbo-1106', - 'gpt-3.5-turbo-0125', - 'gpt-3.5-turbo-16k-0613', + "gpt-4o", + "gpt-4o-2024-05-13", + "gpt-4-turbo", + "gpt-4-turbo-2024-04-09", + "gpt-4-0125-preview", + "gpt-4-turbo-preview", + "gpt-4-1106-preview", + "gpt-4-vision-preview", + "gpt-4", + "gpt-4-0314", + "gpt-4-0613", + "gpt-4-32k", + "gpt-4-32k-0314", + "gpt-4-32k-0613", + "gpt-3.5-turbo", + "gpt-3.5-turbo-16k", + "gpt-3.5-turbo-0613", + "gpt-3.5-turbo-1106", + "gpt-3.5-turbo-0125", + "gpt-3.5-turbo-16k-0613", ] x-oaiTypeLabel: string nullable: true @@ -28717,9 +28717,9 @@ components: maxItems: 20 items: oneOf: - - $ref: '#/components/schemas/AssistantToolsCode' - - $ref: '#/components/schemas/AssistantToolsFileSearch' - - $ref: '#/components/schemas/AssistantToolsFunction' + - $ref: "#/components/schemas/AssistantToolsCode" + - $ref: "#/components/schemas/AssistantToolsFileSearch" + - $ref: "#/components/schemas/AssistantToolsFunction" tool_resources: type: object description: | @@ -28786,15 +28786,15 @@ components: The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. minimum: 256 truncation_strategy: - $ref: '#/components/schemas/TruncationObject' + $ref: "#/components/schemas/TruncationObject" nullable: true tool_choice: - $ref: '#/components/schemas/AssistantsApiToolChoiceOption' + $ref: "#/components/schemas/AssistantsApiToolChoiceOption" nullable: true parallel_tool_calls: - $ref: '#/components/schemas/ParallelToolCalls' + $ref: "#/components/schemas/ParallelToolCalls" response_format: - $ref: '#/components/schemas/AssistantsApiResponseFormatOption' + $ref: "#/components/schemas/AssistantsApiResponseFormatOption" nullable: true required: - thread_id @@ -28811,7 +28811,7 @@ components: object: description: The object type, which is always `thread`. type: string - enum: ['thread'] + enum: ["thread"] created_at: description: The Unix timestamp (in seconds) for when the thread was created. type: integer @@ -28872,7 +28872,7 @@ components: description: A list of [messages](https://platform.openai.com/docs/api-reference/messages) to start the thread with. type: array items: - $ref: '#/components/schemas/CreateMessageRequest' + $ref: "#/components/schemas/CreateMessageRequest" tool_resources: type: object description: | @@ -28927,7 +28927,7 @@ components: type: type: string description: Always `auto`. - enum: ['auto'] + enum: ["auto"] required: - type - type: object @@ -28937,7 +28937,7 @@ components: type: type: string description: Always `static`. - enum: ['static'] + enum: ["static"] static: type: object additionalProperties: false @@ -29032,17 +29032,17 @@ components: properties: object: type: string - example: 'list' + example: "list" data: type: array items: - $ref: '#/components/schemas/ThreadObject' + $ref: "#/components/schemas/ThreadObject" first_id: type: string - example: 'asst_abc123' + example: "asst_abc123" last_id: type: string - example: 'asst_abc456' + example: "asst_abc456" has_more: type: boolean example: false @@ -29064,7 +29064,7 @@ components: object: description: The object type, which is always `thread.message`. type: string - enum: ['thread.message'] + enum: ["thread.message"] created_at: description: The Unix timestamp (in seconds) for when the message was created. type: integer @@ -29074,7 +29074,7 @@ components: status: description: The status of the message, which can be either `in_progress`, `incomplete`, or `completed`. type: string - enum: ['in_progress', 'incomplete', 'completed'] + enum: ["in_progress", "incomplete", "completed"] incomplete_details: description: On an incomplete message, details about why the message is incomplete. type: object @@ -29084,11 +29084,11 @@ components: description: The reason the message is incomplete. enum: [ - 'content_filter', - 'max_tokens', - 'run_cancelled', - 'run_expired', - 'run_failed', + "content_filter", + "max_tokens", + "run_cancelled", + "run_expired", + "run_failed", ] nullable: true required: @@ -29104,15 +29104,15 @@ components: role: description: The entity that produced the message. One of `user` or `assistant`. type: string - enum: ['user', 'assistant'] + enum: ["user", "assistant"] content: description: The content of the message in array of text and/or images. type: array items: oneOf: - - $ref: '#/components/schemas/MessageContentImageFileObject' - - $ref: '#/components/schemas/MessageContentImageUrlObject' - - $ref: '#/components/schemas/MessageContentTextObject' + - $ref: "#/components/schemas/MessageContentImageFileObject" + - $ref: "#/components/schemas/MessageContentImageUrlObject" + - $ref: "#/components/schemas/MessageContentTextObject" x-oaiExpandable: true assistant_id: description: If applicable, the ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) that authored this message. @@ -29135,8 +29135,8 @@ components: type: array items: oneOf: - - $ref: '#/components/schemas/AssistantToolsCode' - - $ref: '#/components/schemas/AssistantToolsFileSearchTypeOnly' + - $ref: "#/components/schemas/AssistantToolsCode" + - $ref: "#/components/schemas/AssistantToolsFileSearchTypeOnly" x-oaiExpandable: true description: A list of files attached to the message, and the tools they were added to. nullable: true @@ -29197,7 +29197,7 @@ components: object: description: The object type, which is always `thread.message.delta`. type: string - enum: ['thread.message.delta'] + enum: ["thread.message.delta"] delta: description: The delta containing the fields that have changed on the Message. type: object @@ -29205,15 +29205,15 @@ components: role: description: The entity that produced the message. One of `user` or `assistant`. type: string - enum: ['user', 'assistant'] + enum: ["user", "assistant"] content: description: The content of the message in array of text and/or images. type: array items: oneOf: - - $ref: '#/components/schemas/MessageDeltaContentImageFileObject' - - $ref: '#/components/schemas/MessageDeltaContentTextObject' - - $ref: '#/components/schemas/MessageDeltaContentImageUrlObject' + - $ref: "#/components/schemas/MessageDeltaContentImageFileObject" + - $ref: "#/components/schemas/MessageDeltaContentTextObject" + - $ref: "#/components/schemas/MessageDeltaContentImageUrlObject" x-oaiExpandable: true required: - id @@ -29246,7 +29246,7 @@ components: properties: role: type: string - enum: ['user', 'assistant'] + enum: ["user", "assistant"] description: | The role of the entity that is creating the message. Allowed values include: - `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages. @@ -29261,9 +29261,9 @@ components: title: Array of content parts items: oneOf: - - $ref: '#/components/schemas/MessageContentImageFileObject' - - $ref: '#/components/schemas/MessageContentImageUrlObject' - - $ref: '#/components/schemas/MessageRequestContentTextObject' + - $ref: "#/components/schemas/MessageContentImageFileObject" + - $ref: "#/components/schemas/MessageContentImageUrlObject" + - $ref: "#/components/schemas/MessageRequestContentTextObject" x-oaiExpandable: true minItems: 1 x-oaiExpandable: true @@ -29280,8 +29280,8 @@ components: type: array items: oneOf: - - $ref: '#/components/schemas/AssistantToolsCode' - - $ref: '#/components/schemas/AssistantToolsFileSearchTypeOnly' + - $ref: "#/components/schemas/AssistantToolsCode" + - $ref: "#/components/schemas/AssistantToolsFileSearchTypeOnly" x-oaiExpandable: true description: A list of files attached to the message, and the tools they should be added to. required: @@ -29323,17 +29323,17 @@ components: properties: object: type: string - example: 'list' + example: "list" data: type: array items: - $ref: '#/components/schemas/MessageObject' + $ref: "#/components/schemas/MessageObject" first_id: type: string - example: 'msg_abc123' + example: "msg_abc123" last_id: type: string - example: 'msg_abc123' + example: "msg_abc123" has_more: type: boolean example: false @@ -29352,7 +29352,7 @@ components: type: description: Always `image_file`. type: string - enum: ['image_file'] + enum: ["image_file"] image_file: type: object properties: @@ -29362,8 +29362,8 @@ components: detail: type: string description: Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`. - enum: ['auto', 'low', 'high'] - default: 'auto' + enum: ["auto", "low", "high"] + default: "auto" required: - file_id required: @@ -29381,7 +29381,7 @@ components: type: description: Always `image_file`. type: string - enum: ['image_file'] + enum: ["image_file"] image_file: type: object properties: @@ -29391,8 +29391,8 @@ components: detail: type: string description: Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`. - enum: ['auto', 'low', 'high'] - default: 'auto' + enum: ["auto", "low", "high"] + default: "auto" required: - index - type @@ -29404,20 +29404,20 @@ components: properties: type: type: string - enum: ['image_url'] + enum: ["image_url"] description: The type of the content part. image_url: type: object properties: url: type: string - description: 'The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.' + description: "The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp." format: uri detail: type: string description: Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. Default value is `auto` - enum: ['auto', 'low', 'high'] - default: 'auto' + enum: ["auto", "low", "high"] + default: "auto" required: - url required: @@ -29435,18 +29435,18 @@ components: type: description: Always `image_url`. type: string - enum: ['image_url'] + enum: ["image_url"] image_url: type: object properties: url: - description: 'The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.' + description: "The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp." type: string detail: type: string description: Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. - enum: ['auto', 'low', 'high'] - default: 'auto' + enum: ["auto", "low", "high"] + default: "auto" required: - index - type @@ -29459,7 +29459,7 @@ components: type: description: Always `text`. type: string - enum: ['text'] + enum: ["text"] text: type: object properties: @@ -29470,8 +29470,8 @@ components: type: array items: oneOf: - - $ref: '#/components/schemas/MessageContentTextAnnotationsFileCitationObject' - - $ref: '#/components/schemas/MessageContentTextAnnotationsFilePathObject' + - $ref: "#/components/schemas/MessageContentTextAnnotationsFileCitationObject" + - $ref: "#/components/schemas/MessageContentTextAnnotationsFilePathObject" x-oaiExpandable: true required: - value @@ -29488,7 +29488,7 @@ components: type: description: Always `text`. type: string - enum: ['text'] + enum: ["text"] text: type: string description: Text content to be sent to the model @@ -29504,7 +29504,7 @@ components: type: description: Always `file_citation`. type: string - enum: ['file_citation'] + enum: ["file_citation"] text: description: The text in the message content that needs to be replaced. type: string @@ -29541,7 +29541,7 @@ components: type: description: Always `file_path`. type: string - enum: ['file_path'] + enum: ["file_path"] text: description: The text in the message content that needs to be replaced. type: string @@ -29577,7 +29577,7 @@ components: type: description: Always `text`. type: string - enum: ['text'] + enum: ["text"] text: type: object properties: @@ -29588,8 +29588,8 @@ components: type: array items: oneOf: - - $ref: '#/components/schemas/MessageDeltaContentTextAnnotationsFileCitationObject' - - $ref: '#/components/schemas/MessageDeltaContentTextAnnotationsFilePathObject' + - $ref: "#/components/schemas/MessageDeltaContentTextAnnotationsFileCitationObject" + - $ref: "#/components/schemas/MessageDeltaContentTextAnnotationsFilePathObject" x-oaiExpandable: true required: - index @@ -29606,7 +29606,7 @@ components: type: description: Always `file_citation`. type: string - enum: ['file_citation'] + enum: ["file_citation"] text: description: The text in the message content that needs to be replaced. type: string @@ -29640,7 +29640,7 @@ components: type: description: Always `file_path`. type: string - enum: ['file_path'] + enum: ["file_path"] text: description: The text in the message content that needs to be replaced. type: string @@ -29672,7 +29672,7 @@ components: object: description: The object type, which is always `thread.run.step`. type: string - enum: ['thread.run.step'] + enum: ["thread.run.step"] created_at: description: The Unix timestamp (in seconds) for when the run step was created. type: integer @@ -29688,17 +29688,17 @@ components: type: description: The type of run step, which can be either `message_creation` or `tool_calls`. type: string - enum: ['message_creation', 'tool_calls'] + enum: ["message_creation", "tool_calls"] status: description: The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`. type: string - enum: ['in_progress', 'cancelled', 'failed', 'completed', 'expired'] + enum: ["in_progress", "cancelled", "failed", "completed", "expired"] step_details: type: object description: The details of the run step. oneOf: - - $ref: '#/components/schemas/RunStepDetailsMessageCreationObject' - - $ref: '#/components/schemas/RunStepDetailsToolCallsObject' + - $ref: "#/components/schemas/RunStepDetailsMessageCreationObject" + - $ref: "#/components/schemas/RunStepDetailsToolCallsObject" x-oaiExpandable: true last_error: type: object @@ -29708,7 +29708,7 @@ components: code: type: string description: One of `server_error` or `rate_limit_exceeded`. - enum: ['server_error', 'rate_limit_exceeded'] + enum: ["server_error", "rate_limit_exceeded"] message: type: string description: A human-readable description of the error. @@ -29737,7 +29737,7 @@ components: x-oaiTypeLabel: map nullable: true usage: - $ref: '#/components/schemas/RunStepCompletionUsage' + $ref: "#/components/schemas/RunStepCompletionUsage" required: - id - object @@ -29772,7 +29772,7 @@ components: object: description: The object type, which is always `thread.run.step.delta`. type: string - enum: ['thread.run.step.delta'] + enum: ["thread.run.step.delta"] delta: description: The delta containing the fields that have changed on the run step. type: object @@ -29781,8 +29781,8 @@ components: type: object description: The details of the run step. oneOf: - - $ref: '#/components/schemas/RunStepDeltaStepDetailsMessageCreationObject' - - $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCallsObject' + - $ref: "#/components/schemas/RunStepDeltaStepDetailsMessageCreationObject" + - $ref: "#/components/schemas/RunStepDeltaStepDetailsToolCallsObject" x-oaiExpandable: true required: - id @@ -29814,17 +29814,17 @@ components: properties: object: type: string - example: 'list' + example: "list" data: type: array items: - $ref: '#/components/schemas/RunStepObject' + $ref: "#/components/schemas/RunStepObject" first_id: type: string - example: 'step_abc123' + example: "step_abc123" last_id: type: string - example: 'step_abc456' + example: "step_abc456" has_more: type: boolean example: false @@ -29843,7 +29843,7 @@ components: type: description: Always `message_creation`. type: string - enum: ['message_creation'] + enum: ["message_creation"] message_creation: type: object properties: @@ -29864,7 +29864,7 @@ components: type: description: Always `message_creation`. type: string - enum: ['message_creation'] + enum: ["message_creation"] message_creation: type: object properties: @@ -29882,16 +29882,16 @@ components: type: description: Always `tool_calls`. type: string - enum: ['tool_calls'] + enum: ["tool_calls"] tool_calls: type: array description: | An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`. items: oneOf: - - $ref: '#/components/schemas/RunStepDetailsToolCallsCodeObject' - - $ref: '#/components/schemas/RunStepDetailsToolCallsFileSearchObject' - - $ref: '#/components/schemas/RunStepDetailsToolCallsFunctionObject' + - $ref: "#/components/schemas/RunStepDetailsToolCallsCodeObject" + - $ref: "#/components/schemas/RunStepDetailsToolCallsFileSearchObject" + - $ref: "#/components/schemas/RunStepDetailsToolCallsFunctionObject" x-oaiExpandable: true required: - type @@ -29905,16 +29905,16 @@ components: type: description: Always `tool_calls`. type: string - enum: ['tool_calls'] + enum: ["tool_calls"] tool_calls: type: array description: | An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`. items: oneOf: - - $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCallsCodeObject' - - $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCallsFileSearchObject' - - $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCallsFunctionObject' + - $ref: "#/components/schemas/RunStepDeltaStepDetailsToolCallsCodeObject" + - $ref: "#/components/schemas/RunStepDeltaStepDetailsToolCallsFileSearchObject" + - $ref: "#/components/schemas/RunStepDeltaStepDetailsToolCallsFunctionObject" x-oaiExpandable: true required: - type @@ -29930,7 +29930,7 @@ components: type: type: string description: The type of tool call. This is always going to be `code_interpreter` for this type of tool call. - enum: ['code_interpreter'] + enum: ["code_interpreter"] code_interpreter: type: object description: The Code Interpreter tool call definition. @@ -29947,8 +29947,8 @@ components: items: type: object oneOf: - - $ref: '#/components/schemas/RunStepDetailsToolCallsCodeOutputLogsObject' - - $ref: '#/components/schemas/RunStepDetailsToolCallsCodeOutputImageObject' + - $ref: "#/components/schemas/RunStepDetailsToolCallsCodeOutputLogsObject" + - $ref: "#/components/schemas/RunStepDetailsToolCallsCodeOutputImageObject" x-oaiExpandable: true required: - id @@ -29969,7 +29969,7 @@ components: type: type: string description: The type of tool call. This is always going to be `code_interpreter` for this type of tool call. - enum: ['code_interpreter'] + enum: ["code_interpreter"] code_interpreter: type: object description: The Code Interpreter tool call definition. @@ -29983,8 +29983,8 @@ components: items: type: object oneOf: - - $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject' - - $ref: '#/components/schemas/RunStepDeltaStepDetailsToolCallsCodeOutputImageObject' + - $ref: "#/components/schemas/RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject" + - $ref: "#/components/schemas/RunStepDeltaStepDetailsToolCallsCodeOutputImageObject" x-oaiExpandable: true required: - index @@ -29998,7 +29998,7 @@ components: type: description: Always `logs`. type: string - enum: ['logs'] + enum: ["logs"] logs: type: string description: The text output from the Code Interpreter tool call. @@ -30017,7 +30017,7 @@ components: type: description: Always `logs`. type: string - enum: ['logs'] + enum: ["logs"] logs: type: string description: The text output from the Code Interpreter tool call. @@ -30032,7 +30032,7 @@ components: type: description: Always `image`. type: string - enum: ['image'] + enum: ["image"] image: type: object properties: @@ -30055,7 +30055,7 @@ components: type: description: Always `image`. type: string - enum: ['image'] + enum: ["image"] image: type: object properties: @@ -30076,7 +30076,7 @@ components: type: type: string description: The type of tool call. This is always going to be `file_search` for this type of tool call. - enum: ['file_search'] + enum: ["file_search"] file_search: type: object description: For now, this is always going to be an empty object. @@ -30099,7 +30099,7 @@ components: type: type: string description: The type of tool call. This is always going to be `file_search` for this type of tool call. - enum: ['file_search'] + enum: ["file_search"] file_search: type: object description: For now, this is always going to be an empty object. @@ -30119,7 +30119,7 @@ components: type: type: string description: The type of tool call. This is always going to be `function` for this type of tool call. - enum: ['function'] + enum: ["function"] function: type: object description: The definition of the function that was called. @@ -30156,7 +30156,7 @@ components: type: type: string description: The type of tool call. This is always going to be `function` for this type of tool call. - enum: ['function'] + enum: ["function"] function: type: object description: The definition of the function that was called. @@ -30181,9 +30181,9 @@ components: description: The expiration policy for a vector store. properties: anchor: - description: 'Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.' + description: "Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`." type: string - enum: ['last_active_at'] + enum: ["last_active_at"] days: description: The number of days after the anchor time that the vector store will expire. type: integer @@ -30204,7 +30204,7 @@ components: object: description: The object type, which is always `vector_store`. type: string - enum: ['vector_store'] + enum: ["vector_store"] created_at: description: The Unix timestamp (in seconds) for when the vector store was created. type: integer @@ -30241,9 +30241,9 @@ components: status: description: The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use. type: string - enum: ['expired', 'in_progress', 'completed'] + enum: ["expired", "in_progress", "completed"] expires_after: - $ref: '#/components/schemas/VectorStoreExpirationAfter' + $ref: "#/components/schemas/VectorStoreExpirationAfter" expires_at: description: The Unix timestamp (in seconds) for when the vector store will expire. type: integer @@ -30317,8 +30317,8 @@ components: filters: description: A filter to apply based on file attributes. oneOf: - - $ref: '#/components/schemas/ComparisonFilter' - - $ref: '#/components/schemas/CompoundFilter' + - $ref: "#/components/schemas/ComparisonFilter" + - $ref: "#/components/schemas/CompoundFilter" x-oaiExpandable: true ranking_options: description: Ranking options for search. @@ -30369,12 +30369,12 @@ components: minimum: 0 maximum: 1 attributes: - $ref: '#/components/schemas/VectorStoreFileAttributes' + $ref: "#/components/schemas/VectorStoreFileAttributes" content: type: array description: Content chunks from the file. items: - $ref: '#/components/schemas/VectorStoreSearchResultContentObject' + $ref: "#/components/schemas/VectorStoreSearchResultContentObject" required: - file_id - filename @@ -30401,7 +30401,7 @@ components: type: array description: The list of search result items. items: - $ref: '#/components/schemas/VectorStoreSearchResultItem' + $ref: "#/components/schemas/VectorStoreSearchResultItem" has_more: type: boolean description: Indicates if there are more results to fetch. @@ -30508,7 +30508,7 @@ components: - `web_search_preview_2025_03_11` user_location: allOf: - - $ref: '#/components/schemas/WebSearchLocation' + - $ref: "#/components/schemas/WebSearchLocation" - type: object properties: type: @@ -30522,7 +30522,7 @@ components: - type nullable: true search_context_size: - $ref: '#/components/schemas/WebSearchContextSize' + $ref: "#/components/schemas/WebSearchContextSize" required: - type WebSearchToolCall: @@ -30570,13 +30570,13 @@ components: description: The name of the vector store. type: string expires_after: - $ref: '#/components/schemas/VectorStoreExpirationAfter' + $ref: "#/components/schemas/VectorStoreExpirationAfter" chunking_strategy: type: object description: The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty. oneOf: - - $ref: '#/components/schemas/AutoChunkingStrategyRequestParam' - - $ref: '#/components/schemas/StaticChunkingStrategyRequestParam' + - $ref: "#/components/schemas/AutoChunkingStrategyRequestParam" + - $ref: "#/components/schemas/StaticChunkingStrategyRequestParam" x-oaiExpandable: true metadata: description: *metadata_description @@ -30614,7 +30614,7 @@ components: type: string nullable: true expires_after: - $ref: '#/components/schemas/VectorStoreExpirationAfter' + $ref: "#/components/schemas/VectorStoreExpirationAfter" nullable: true metadata: description: *metadata_description @@ -30660,17 +30660,17 @@ components: properties: object: type: string - example: 'list' + example: "list" data: type: array items: - $ref: '#/components/schemas/VectorStoreObject' + $ref: "#/components/schemas/VectorStoreObject" first_id: type: string - example: 'vs_abc123' + example: "vs_abc123" last_id: type: string - example: 'vs_abc456' + example: "vs_abc456" has_more: type: boolean example: false @@ -30707,7 +30707,7 @@ components: object: description: The object type, which is always `vector_store.file`. type: string - enum: ['vector_store.file'] + enum: ["vector_store.file"] usage_bytes: description: The total vector store usage in bytes. Note that this may be different from the original file size. type: integer @@ -30720,7 +30720,7 @@ components: status: description: The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use. type: string - enum: ['in_progress', 'completed', 'cancelled', 'failed'] + enum: ["in_progress", "completed", "cancelled", "failed"] last_error: type: object description: The last error associated with this vector store file. Will be `null` if there are no errors. @@ -30731,10 +30731,10 @@ components: description: One of `server_error` or `rate_limit_exceeded`. enum: [ - 'internal_error', - 'file_not_found', - 'parsing_error', - 'unhandled_mime_type', + "internal_error", + "file_not_found", + "parsing_error", + "unhandled_mime_type", ] message: type: string @@ -30746,8 +30746,8 @@ components: type: object description: The strategy used to chunk the file. oneOf: - - $ref: '#/components/schemas/StaticChunkingStrategyResponseParam' - - $ref: '#/components/schemas/OtherChunkingStrategyResponseParam' + - $ref: "#/components/schemas/StaticChunkingStrategyResponseParam" + - $ref: "#/components/schemas/OtherChunkingStrategyResponseParam" x-oaiExpandable: true required: - id @@ -30787,7 +30787,7 @@ components: type: type: string description: Always `other`. - enum: ['other'] + enum: ["other"] required: - type @@ -30799,9 +30799,9 @@ components: type: type: string description: Always `static`. - enum: ['static'] + enum: ["static"] static: - $ref: '#/components/schemas/StaticChunkingStrategy' + $ref: "#/components/schemas/StaticChunkingStrategy" required: - type - static @@ -30834,7 +30834,7 @@ components: type: type: string description: Always `auto`. - enum: ['auto'] + enum: ["auto"] required: - type @@ -30846,9 +30846,9 @@ components: type: type: string description: Always `static`. - enum: ['static'] + enum: ["static"] static: - $ref: '#/components/schemas/StaticChunkingStrategy' + $ref: "#/components/schemas/StaticChunkingStrategy" required: - type - static @@ -30857,8 +30857,8 @@ components: type: object description: The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. oneOf: - - $ref: '#/components/schemas/AutoChunkingStrategyRequestParam' - - $ref: '#/components/schemas/StaticChunkingStrategyRequestParam' + - $ref: "#/components/schemas/AutoChunkingStrategyRequestParam" + - $ref: "#/components/schemas/StaticChunkingStrategyRequestParam" x-oaiExpandable: true CreateVectorStoreFileRequest: @@ -30869,7 +30869,7 @@ components: description: A [File](https://platform.openai.com/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files. type: string chunking_strategy: - $ref: '#/components/schemas/ChunkingStrategyRequestParam' + $ref: "#/components/schemas/ChunkingStrategyRequestParam" required: - file_id @@ -30877,17 +30877,17 @@ components: properties: object: type: string - example: 'list' + example: "list" data: type: array items: - $ref: '#/components/schemas/VectorStoreFileObject' + $ref: "#/components/schemas/VectorStoreFileObject" first_id: type: string - example: 'file-abc123' + example: "file-abc123" last_id: type: string - example: 'file-abc456' + example: "file-abc456" has_more: type: boolean example: false @@ -30948,7 +30948,7 @@ components: object: description: The object type, which is always `vector_store.file_batch`. type: string - enum: ['vector_store.files_batch'] + enum: ["vector_store.files_batch"] created_at: description: The Unix timestamp (in seconds) for when the vector store files batch was created. type: integer @@ -30958,7 +30958,7 @@ components: status: description: The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`. type: string - enum: ['in_progress', 'completed', 'cancelled', 'failed'] + enum: ["in_progress", "completed", "cancelled", "failed"] file_counts: type: object properties: @@ -31021,7 +31021,7 @@ components: items: type: string chunking_strategy: - $ref: '#/components/schemas/ChunkingStrategyRequestParam' + $ref: "#/components/schemas/ChunkingStrategyRequestParam" required: - file_ids @@ -31047,12 +31047,12 @@ components: in your code. See the [Assistants API quickstart](https://platform.openai.com/docs/assistants/overview) to learn how to integrate the Assistants API with streaming. oneOf: - - $ref: '#/components/schemas/ThreadStreamEvent' - - $ref: '#/components/schemas/RunStreamEvent' - - $ref: '#/components/schemas/RunStepStreamEvent' - - $ref: '#/components/schemas/MessageStreamEvent' - - $ref: '#/components/schemas/ErrorEvent' - - $ref: '#/components/schemas/DoneEvent' + - $ref: "#/components/schemas/ThreadStreamEvent" + - $ref: "#/components/schemas/RunStreamEvent" + - $ref: "#/components/schemas/RunStepStreamEvent" + - $ref: "#/components/schemas/MessageStreamEvent" + - $ref: "#/components/schemas/ErrorEvent" + - $ref: "#/components/schemas/DoneEvent" x-code-samples: name: Assistant stream events beta: true @@ -31063,21 +31063,21 @@ components: properties: event: type: string - enum: ['thread.created'] + enum: ["thread.created"] data: - $ref: '#/components/schemas/ThreadObject' + $ref: "#/components/schemas/ThreadObject" required: - event - data description: Occurs when a new [thread](https://platform.openai.com/docs/api-reference/threads/object) is created. x-code-samples: - dataDescription: '`data` is a [thread](https://platform.openai.com/docs/api-reference/threads/object)' + dataDescription: "`data` is a [thread](https://platform.openai.com/docs/api-reference/threads/object)" Tool: oneOf: - - $ref: '#/components/schemas/FileSearchTool' - - $ref: '#/components/schemas/FunctionTool' - - $ref: '#/components/schemas/ComputerTool' - - $ref: '#/components/schemas/WebSearchTool' + - $ref: "#/components/schemas/FileSearchTool" + - $ref: "#/components/schemas/FunctionTool" + - $ref: "#/components/schemas/ComputerTool" + - $ref: "#/components/schemas/WebSearchTool" x-oaiExpandable: true ToolChoiceFunction: type: object @@ -31151,132 +31151,132 @@ components: properties: event: type: string - enum: ['thread.run.created'] + enum: ["thread.run.created"] data: - $ref: '#/components/schemas/RunObject' + $ref: "#/components/schemas/RunObject" required: - event - data description: Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is created. x-code-samples: - dataDescription: '`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)' + dataDescription: "`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)" - type: object properties: event: type: string - enum: ['thread.run.queued'] + enum: ["thread.run.queued"] data: - $ref: '#/components/schemas/RunObject' + $ref: "#/components/schemas/RunObject" required: - event - data description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `queued` status. x-code-samples: - dataDescription: '`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)' + dataDescription: "`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)" - type: object properties: event: type: string - enum: ['thread.run.in_progress'] + enum: ["thread.run.in_progress"] data: - $ref: '#/components/schemas/RunObject' + $ref: "#/components/schemas/RunObject" required: - event - data description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to an `in_progress` status. x-code-samples: - dataDescription: '`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)' + dataDescription: "`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)" - type: object properties: event: type: string - enum: ['thread.run.requires_action'] + enum: ["thread.run.requires_action"] data: - $ref: '#/components/schemas/RunObject' + $ref: "#/components/schemas/RunObject" required: - event - data description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `requires_action` status. x-code-samples: - dataDescription: '`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)' + dataDescription: "`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)" - type: object properties: event: type: string - enum: ['thread.run.completed'] + enum: ["thread.run.completed"] data: - $ref: '#/components/schemas/RunObject' + $ref: "#/components/schemas/RunObject" required: - event - data description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is completed. x-code-samples: - dataDescription: '`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)' + dataDescription: "`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)" - type: object properties: event: type: string - enum: ['thread.run.incomplete'] + enum: ["thread.run.incomplete"] data: - $ref: '#/components/schemas/RunObject' + $ref: "#/components/schemas/RunObject" required: - event - data description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with status `incomplete`. x-code-samples: - dataDescription: '`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)' + dataDescription: "`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)" - type: object properties: event: type: string - enum: ['thread.run.failed'] + enum: ["thread.run.failed"] data: - $ref: '#/components/schemas/RunObject' + $ref: "#/components/schemas/RunObject" required: - event - data description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) fails. x-code-samples: - dataDescription: '`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)' + dataDescription: "`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)" - type: object properties: event: type: string - enum: ['thread.run.cancelling'] + enum: ["thread.run.cancelling"] data: - $ref: '#/components/schemas/RunObject' + $ref: "#/components/schemas/RunObject" required: - event - data description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `cancelling` status. x-code-samples: - dataDescription: '`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)' + dataDescription: "`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)" - type: object properties: event: type: string - enum: ['thread.run.cancelled'] + enum: ["thread.run.cancelled"] data: - $ref: '#/components/schemas/RunObject' + $ref: "#/components/schemas/RunObject" required: - event - data description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is cancelled. x-code-samples: - dataDescription: '`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)' + dataDescription: "`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)" - type: object properties: event: type: string - enum: ['thread.run.expired'] + enum: ["thread.run.expired"] data: - $ref: '#/components/schemas/RunObject' + $ref: "#/components/schemas/RunObject" required: - event - data description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) expires. x-code-samples: - dataDescription: '`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)' + dataDescription: "`data` is a [run](https://platform.openai.com/docs/api-reference/runs/object)" RunStepStreamEvent: oneOf: @@ -31284,93 +31284,93 @@ components: properties: event: type: string - enum: ['thread.run.step.created'] + enum: ["thread.run.step.created"] data: - $ref: '#/components/schemas/RunStepObject' + $ref: "#/components/schemas/RunStepObject" required: - event - data description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/runs/step-object) is created. x-code-samples: - dataDescription: '`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)' + dataDescription: "`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)" - type: object properties: event: type: string - enum: ['thread.run.step.in_progress'] + enum: ["thread.run.step.in_progress"] data: - $ref: '#/components/schemas/RunStepObject' + $ref: "#/components/schemas/RunStepObject" required: - event - data description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/runs/step-object) moves to an `in_progress` state. x-code-samples: - dataDescription: '`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)' + dataDescription: "`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)" - type: object properties: event: type: string - enum: ['thread.run.step.delta'] + enum: ["thread.run.step.delta"] data: - $ref: '#/components/schemas/RunStepDeltaObject' + $ref: "#/components/schemas/RunStepDeltaObject" required: - event - data description: Occurs when parts of a [run step](https://platform.openai.com/docs/api-reference/runs/step-object) are being streamed. x-code-samples: - dataDescription: '`data` is a [run step delta](https://platform.openai.com/docs/api-reference/assistants-streaming/run-step-delta-object)' + dataDescription: "`data` is a [run step delta](https://platform.openai.com/docs/api-reference/assistants-streaming/run-step-delta-object)" - type: object properties: event: type: string - enum: ['thread.run.step.completed'] + enum: ["thread.run.step.completed"] data: - $ref: '#/components/schemas/RunStepObject' + $ref: "#/components/schemas/RunStepObject" required: - event - data description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/runs/step-object) is completed. x-code-samples: - dataDescription: '`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)' + dataDescription: "`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)" - type: object properties: event: type: string - enum: ['thread.run.step.failed'] + enum: ["thread.run.step.failed"] data: - $ref: '#/components/schemas/RunStepObject' + $ref: "#/components/schemas/RunStepObject" required: - event - data description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/runs/step-object) fails. x-code-samples: - dataDescription: '`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)' + dataDescription: "`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)" - type: object properties: event: type: string - enum: ['thread.run.step.cancelled'] + enum: ["thread.run.step.cancelled"] data: - $ref: '#/components/schemas/RunStepObject' + $ref: "#/components/schemas/RunStepObject" required: - event - data description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/runs/step-object) is cancelled. x-code-samples: - dataDescription: '`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)' + dataDescription: "`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)" - type: object properties: event: type: string - enum: ['thread.run.step.expired'] + enum: ["thread.run.step.expired"] data: - $ref: '#/components/schemas/RunStepObject' + $ref: "#/components/schemas/RunStepObject" required: - event - data description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/runs/step-object) expires. x-code-samples: - dataDescription: '`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)' + dataDescription: "`data` is a [run step](https://platform.openai.com/docs/api-reference/runs/step-object)" MessageStreamEvent: oneOf: @@ -31378,82 +31378,82 @@ components: properties: event: type: string - enum: ['thread.message.created'] + enum: ["thread.message.created"] data: - $ref: '#/components/schemas/MessageObject' + $ref: "#/components/schemas/MessageObject" required: - event - data description: Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is created. x-code-samples: - dataDescription: '`data` is a [message](https://platform.openai.com/docs/api-reference/messages/object)' + dataDescription: "`data` is a [message](https://platform.openai.com/docs/api-reference/messages/object)" - type: object properties: event: type: string - enum: ['thread.message.in_progress'] + enum: ["thread.message.in_progress"] data: - $ref: '#/components/schemas/MessageObject' + $ref: "#/components/schemas/MessageObject" required: - event - data description: Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) moves to an `in_progress` state. x-code-samples: - dataDescription: '`data` is a [message](https://platform.openai.com/docs/api-reference/messages/object)' + dataDescription: "`data` is a [message](https://platform.openai.com/docs/api-reference/messages/object)" - type: object properties: event: type: string - enum: ['thread.message.delta'] + enum: ["thread.message.delta"] data: - $ref: '#/components/schemas/MessageDeltaObject' + $ref: "#/components/schemas/MessageDeltaObject" required: - event - data description: Occurs when parts of a [Message](https://platform.openai.com/docs/api-reference/messages/object) are being streamed. x-code-samples: - dataDescription: '`data` is a [message delta](https://platform.openai.com/docs/api-reference/assistants-streaming/message-delta-object)' + dataDescription: "`data` is a [message delta](https://platform.openai.com/docs/api-reference/assistants-streaming/message-delta-object)" - type: object properties: event: type: string - enum: ['thread.message.completed'] + enum: ["thread.message.completed"] data: - $ref: '#/components/schemas/MessageObject' + $ref: "#/components/schemas/MessageObject" required: - event - data description: Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is completed. x-code-samples: - dataDescription: '`data` is a [message](https://platform.openai.com/docs/api-reference/messages/object)' + dataDescription: "`data` is a [message](https://platform.openai.com/docs/api-reference/messages/object)" - type: object properties: event: type: string - enum: ['thread.message.incomplete'] + enum: ["thread.message.incomplete"] data: - $ref: '#/components/schemas/MessageObject' + $ref: "#/components/schemas/MessageObject" required: - event - data description: Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) ends before it is completed. x-code-samples: - dataDescription: '`data` is a [message](https://platform.openai.com/docs/api-reference/messages/object)' + dataDescription: "`data` is a [message](https://platform.openai.com/docs/api-reference/messages/object)" ErrorEvent: type: object properties: event: type: string - enum: ['error'] + enum: ["error"] data: - $ref: '#/components/schemas/Error' + $ref: "#/components/schemas/Error" required: - event - data description: Occurs when an [error](https://platform.openai.com/docs/guides/error-codes/api-errors) occurs. This can happen due to an internal server error or a timeout. x-code-samples: - dataDescription: '`data` is an [error](https://platform.openai.com/docs/guides/error-codes/api-errors)' + dataDescription: "`data` is an [error](https://platform.openai.com/docs/guides/error-codes/api-errors)" FileCitation: type: object title: File citation @@ -31509,16 +31509,16 @@ components: properties: event: type: string - enum: ['done'] + enum: ["done"] data: type: string - enum: ['[DONE]'] + enum: ["[DONE]"] required: - event - data description: Occurs when a stream ends. x-code-samples: - dataDescription: '`data` is `[DONE]`' + dataDescription: "`data` is `[DONE]`" Batch: type: object @@ -31649,7 +31649,7 @@ components: description: A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch. method: type: string - enum: ['POST'] + enum: ["POST"] description: The HTTP method to be used for the request. Currently only `POST` is supported. url: type: string @@ -31704,13 +31704,13 @@ components: data: type: array items: - $ref: '#/components/schemas/Batch' + $ref: "#/components/schemas/Batch" first_id: type: string - example: 'batch_abc123' + example: "batch_abc123" last_id: type: string - example: 'batch_abc456' + example: "batch_abc456" has_more: type: boolean object: @@ -31789,42 +31789,35 @@ components: properties: type: type: string - enum: ['requests', 'tokens'] + enum: ["requests", "tokens"] unit: type: string - enum: ['rpd', 'rph', 'rpm'] + enum: ["rpd", "rph", "rpm"] value: type: integer UsageLimits: type: object - required: - - credit_limit - description: Usage limit configuration. credit_limit is required when this object is present. periodic_reset and periodic_reset_days are mutually exclusive. properties: + credit_limit: + type: integer + description: Credit Limit. Used for tracking usage + minimum: 1 + default: null type: type: string - description: Whether the credit_limit is measured in tokens or cost (USD). - enum: ['cost', 'tokens'] - example: 'cost' - credit_limit: - type: number - format: float - description: 'Maximum allowed usage. Interpreted as USD when type is "cost", or token count when type is "tokens".' - minimum: 0 - example: 10 + description: Type of credit limit + enum: ["cost", "tokens"] alert_threshold: - type: number - format: float - description: Send alert emails when usage reaches this value. Must be less than or equal to credit_limit. - minimum: 0 - nullable: true - example: 8 + type: integer + description: Alert Threshold. Used for alerting when usage reaches more than this + minimum: 1 + default: null periodic_reset: type: string - description: Reset the usage counter on a fixed calendar schedule. Mutually exclusive with periodic_reset_days. - enum: ['monthly', 'weekly'] + description: Reset the usage periodically. + enum: ["monthly", "weekly"] nullable: true - example: 'monthly' + example: "monthly" periodic_reset_days: type: integer description: Reset the usage counter every N days (1-365). Mutually exclusive with periodic_reset. @@ -31837,9 +31830,8 @@ components: format: date-time description: ISO 8601 datetime for the next scheduled usage reset. Auto-computed from periodic_reset or periodic_reset_days if not provided. nullable: true - example: '2026-05-01T00:00:00Z' + example: "2026-05-01T00:00:00Z" example: - type: cost credit_limit: 10 periodic_reset: monthly alert_threshold: 8 @@ -31853,24 +31845,24 @@ components: name: type: string description: Human-readable name for the integration - example: 'Production OpenAI' + example: "Production OpenAI" slug: type: string - pattern: '^[a-zA-Z0-9_-]+$' + pattern: "^[a-zA-Z0-9_-]+$" description: URL-friendly identifier (auto-generated if not provided) - example: 'production-openai' + example: "production-openai" ai_provider_id: type: string description: ID of the base AI provider - example: 'openai' + example: "openai" key: type: string description: API key for the provider (if required) - example: 'sk-...' + example: "sk-..." description: type: string description: Optional description of the integration - example: 'Production OpenAI integration for customer-facing applications' + example: "Production OpenAI integration for customer-facing applications" workspace_id: type: string description: Workspace ID (for workspace-scoped integrations) @@ -31879,25 +31871,25 @@ components: type: object description: Provider-specific configuration object oneOf: - - $ref: '#/components/schemas/OpenAIConfiguration' + - $ref: "#/components/schemas/OpenAIConfiguration" title: OpenAI - - $ref: '#/components/schemas/AzureOpenAIConfiguration' + - $ref: "#/components/schemas/AzureOpenAIConfiguration" title: Azure OpenAI - - $ref: '#/components/schemas/BedrockConfiguration' + - $ref: "#/components/schemas/BedrockConfiguration" title: AWS Bedrock - - $ref: '#/components/schemas/VertexAIConfiguration' + - $ref: "#/components/schemas/VertexAIConfiguration" title: Vertex AI - - $ref: '#/components/schemas/AzureAIConfiguration' + - $ref: "#/components/schemas/AzureAIConfiguration" title: Azure AI - - $ref: '#/components/schemas/WorkersAIConfiguration' + - $ref: "#/components/schemas/WorkersAIConfiguration" title: Workers AI - - $ref: '#/components/schemas/SageMakerConfiguration' + - $ref: "#/components/schemas/SageMakerConfiguration" title: AWS Sagemaker - - $ref: '#/components/schemas/HuggingFaceConfiguration' + - $ref: "#/components/schemas/HuggingFaceConfiguration" title: Hugginface - - $ref: '#/components/schemas/CortexConfiguration' + - $ref: "#/components/schemas/CortexConfiguration" title: Cortex - - $ref: '#/components/schemas/CustomHostConfiguration' + - $ref: "#/components/schemas/CustomHostConfiguration" title: Custom Base URL create_default_provider: type: boolean @@ -31905,13 +31897,13 @@ components: description: Whether to automatically create a default provider when creating a workspace-scoped integration. Defaults to true. default_provider_slug: type: string - pattern: '^[a-zA-Z0-9_-]+$' + pattern: "^[a-zA-Z0-9_-]+$" maxLength: 255 description: Custom slug for the auto-created default provider. Only applicable for workspace-scoped integrations. If the slug already exists in the workspace, the request will fail with a validation error. secret_mappings: type: array items: - $ref: '#/components/schemas/SecretMapping' + $ref: "#/components/schemas/SecretMapping" description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "configurations." (e.g. "configurations.aws_secret_access_key", "configurations.azure_entra_client_secret"). Each target_field must be unique. When "key" is mapped, the key body field can be omitted. UpdateIntegrationRequest: @@ -31920,48 +31912,48 @@ components: name: type: string description: Human-readable name for the integration - example: 'Production OpenAI' + example: "Production OpenAI" key: type: string description: API key for the provider (if required) - example: 'sk-...' + example: "sk-..." description: type: string description: Optional description of the integration - example: 'Production OpenAI integration for customer-facing applications' + example: "Production OpenAI integration for customer-facing applications" configurations: type: object description: Provider-specific configuration object oneOf: - - $ref: '#/components/schemas/OpenAIConfiguration' + - $ref: "#/components/schemas/OpenAIConfiguration" title: OpenAI - - $ref: '#/components/schemas/AzureOpenAIConfiguration' + - $ref: "#/components/schemas/AzureOpenAIConfiguration" title: Azure OpenAI - - $ref: '#/components/schemas/BedrockConfiguration' + - $ref: "#/components/schemas/BedrockConfiguration" title: AWS Bedrock - - $ref: '#/components/schemas/VertexAIConfiguration' + - $ref: "#/components/schemas/VertexAIConfiguration" title: Vertex AI - - $ref: '#/components/schemas/AzureAIConfiguration' + - $ref: "#/components/schemas/AzureAIConfiguration" title: Azure AI - - $ref: '#/components/schemas/WorkersAIConfiguration' + - $ref: "#/components/schemas/WorkersAIConfiguration" title: Workers AI - - $ref: '#/components/schemas/SageMakerConfiguration' + - $ref: "#/components/schemas/SageMakerConfiguration" title: AWS Sagemaker - - $ref: '#/components/schemas/HuggingFaceConfiguration' + - $ref: "#/components/schemas/HuggingFaceConfiguration" title: Hugginface - - $ref: '#/components/schemas/CortexConfiguration' + - $ref: "#/components/schemas/CortexConfiguration" title: Cortex - - $ref: '#/components/schemas/CustomHostConfiguration' + - $ref: "#/components/schemas/CustomHostConfiguration" title: Custom Base URL secret_mappings: type: array items: - $ref: '#/components/schemas/SecretMapping' + $ref: "#/components/schemas/SecretMapping" description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "configurations." (e.g. "configurations.aws_secret_access_key", "configurations.azure_entra_client_secret"). Each target_field must be unique. IntegrationDetailResponse: allOf: - - $ref: '#/components/schemas/IntegrationList' + - $ref: "#/components/schemas/IntegrationList" - type: object properties: masked_key: @@ -31977,30 +31969,30 @@ components: - Sensitive fields get a `masked_` prefix (e.g., `client_secret` → `masked_client_secret`) - Non-sensitive fields (IDs, URLs, regions, etc.) remain unchanged oneOf: - - $ref: '#/components/schemas/OpenAIConfiguration' + - $ref: "#/components/schemas/OpenAIConfiguration" title: OpenAI - - $ref: '#/components/schemas/AzureOpenAIConfiguration' + - $ref: "#/components/schemas/AzureOpenAIConfiguration" title: Azure OpenAI - - $ref: '#/components/schemas/BedrockConfiguration' + - $ref: "#/components/schemas/BedrockConfiguration" title: AWS Bedrock - - $ref: '#/components/schemas/VertexAIConfiguration' + - $ref: "#/components/schemas/VertexAIConfiguration" title: Vertex AI - - $ref: '#/components/schemas/AzureAIConfiguration' + - $ref: "#/components/schemas/AzureAIConfiguration" title: Azure AI - - $ref: '#/components/schemas/WorkersAIConfiguration' + - $ref: "#/components/schemas/WorkersAIConfiguration" title: Workers AI - - $ref: '#/components/schemas/SageMakerConfiguration' + - $ref: "#/components/schemas/SageMakerConfiguration" title: AWS Sagemaker - - $ref: '#/components/schemas/HuggingFaceConfiguration' + - $ref: "#/components/schemas/HuggingFaceConfiguration" title: Hugginface - - $ref: '#/components/schemas/CortexConfiguration' + - $ref: "#/components/schemas/CortexConfiguration" title: Cortex - - $ref: '#/components/schemas/CustomHostConfiguration' + - $ref: "#/components/schemas/CustomHostConfiguration" title: Custom Base URL global_workspace_access_settings: type: object nullable: true - $ref: '#/components/schemas/GlobalWorkspaceAccess' + $ref: "#/components/schemas/GlobalWorkspaceAccess" description: Global workspace access configuration allow_all_models: type: boolean @@ -32011,7 +32003,7 @@ components: secret_mappings: type: array items: - $ref: '#/components/schemas/SecretMapping' + $ref: "#/components/schemas/SecretMapping" description: Secret reference mappings for this integration. Valid target_field values are "key" or "configurations.". GlobalWorkspaceAccess: @@ -32027,13 +32019,13 @@ components: nullable: true maxItems: 1 items: - $ref: '#/components/schemas/UsageLimits' + $ref: "#/components/schemas/UsageLimits" rate_limits: type: array nullable: true maxItems: 1 items: - $ref: '#/components/schemas/RateLimits' + $ref: "#/components/schemas/RateLimits" OpenAIConfiguration: type: object @@ -32063,7 +32055,7 @@ components: type: array minItems: 1 items: - $ref: '#/components/schemas/AzureDeploymentConfig' + $ref: "#/components/schemas/AzureDeploymentConfig" # Entra-specific fields azure_entra_tenant_id: type: string @@ -32135,7 +32127,7 @@ components: SageMakerConfiguration: allOf: - - $ref: '#/components/schemas/BedrockConfiguration' + - $ref: "#/components/schemas/BedrockConfiguration" - type: object properties: amzn_sagemaker_custom_attributes: @@ -32272,11 +32264,11 @@ components: The field on the entity to populate from the secret reference. Must be unique within the array. - **Integrations**: `key` or `configurations.` (e.g. `configurations.aws_secret_access_key`) - **Virtual Keys**: `key` or `model_config.` (e.g. `model_config.awsSecretAccessKey`) - example: 'key' + example: "key" secret_reference_id: type: string description: UUID or slug of the secret reference. Must belong to the same organisation and be accessible by the workspace. - example: 'my-aws-secret' + example: "my-aws-secret" secret_key: type: string nullable: true @@ -32300,7 +32292,7 @@ components: maxLength: 255 slug: type: string - pattern: '^[a-zA-Z0-9_-]+$' + pattern: "^[a-zA-Z0-9_-]+$" maxLength: 255 description: Auto-generated from name if omitted description: @@ -32312,15 +32304,15 @@ components: enum: [aws_sm, azure_kv, hashicorp_vault] auth_config: oneOf: - - $ref: '#/components/schemas/AwsAccessKeyAuthConfig' - - $ref: '#/components/schemas/AwsAssumedRoleAuthConfig' - - $ref: '#/components/schemas/AwsServiceRoleAuthConfig' - - $ref: '#/components/schemas/AzureEntraAuthConfig' - - $ref: '#/components/schemas/AzureManagedAuthConfig' - - $ref: '#/components/schemas/AzureDefaultAuthConfig' - - $ref: '#/components/schemas/HashicorpTokenAuthConfig' - - $ref: '#/components/schemas/HashicorpAppRoleAuthConfig' - - $ref: '#/components/schemas/HashicorpKubernetesAuthConfig' + - $ref: "#/components/schemas/AwsAccessKeyAuthConfig" + - $ref: "#/components/schemas/AwsAssumedRoleAuthConfig" + - $ref: "#/components/schemas/AwsServiceRoleAuthConfig" + - $ref: "#/components/schemas/AzureEntraAuthConfig" + - $ref: "#/components/schemas/AzureManagedAuthConfig" + - $ref: "#/components/schemas/AzureDefaultAuthConfig" + - $ref: "#/components/schemas/HashicorpTokenAuthConfig" + - $ref: "#/components/schemas/HashicorpAppRoleAuthConfig" + - $ref: "#/components/schemas/HashicorpKubernetesAuthConfig" discriminator: propertyName: aws_auth_type secret_path: @@ -32651,7 +32643,7 @@ components: models: type: array items: - $ref: '#/components/schemas/IntegrationModel' + $ref: "#/components/schemas/IntegrationModel" IntegrationModel: type: object @@ -32678,7 +32670,7 @@ components: nullable: true description: Base model slug for fine-tuned models pricing_config: - $ref: '#/components/schemas/PricingConfig' + $ref: "#/components/schemas/PricingConfig" PricingConfig: type: object @@ -32688,15 +32680,15 @@ components: enum: [static] description: Pricing type pay_as_you_go: - $ref: '#/components/schemas/PayAsYouGoPricing' + $ref: "#/components/schemas/PayAsYouGoPricing" PayAsYouGoPricing: type: object properties: request_token: - $ref: '#/components/schemas/TokenPricing' + $ref: "#/components/schemas/TokenPricing" response_token: - $ref: '#/components/schemas/TokenPricing' + $ref: "#/components/schemas/TokenPricing" ModelConfigurations: type: object properties: @@ -32720,7 +32712,7 @@ components: models: type: array items: - $ref: '#/components/schemas/ModelUpdateRequest' + $ref: "#/components/schemas/ModelUpdateRequest" allow_all_models: type: boolean description: Whether to allow all models by default @@ -32750,9 +32742,9 @@ components: nullable: true description: Base model slug for fine-tuned models configurations: - $ref: '#/components/schemas/ModelConfigurations' + $ref: "#/components/schemas/ModelConfigurations" pricing_config: - $ref: '#/components/schemas/PricingConfig' + $ref: "#/components/schemas/PricingConfig" IntegrationWorkspacesResponse: type: object @@ -32763,7 +32755,7 @@ components: workspaces: type: array items: - $ref: '#/components/schemas/IntegrationWorkspace' + $ref: "#/components/schemas/IntegrationWorkspace" IntegrationWorkspace: type: object @@ -32771,7 +32763,7 @@ components: id: type: string description: Workspace ID - example: 'ws-my-team-1234' + example: "ws-my-team-1234" enabled: type: boolean description: Whether the workspace has access @@ -32779,12 +32771,12 @@ components: type: array nullable: true items: - $ref: '#/components/schemas/UsageLimits' + $ref: "#/components/schemas/UsageLimits" rate_limits: type: array nullable: true items: - $ref: '#/components/schemas/RateLimits' + $ref: "#/components/schemas/RateLimits" BulkUpdateWorkspacesRequest: type: object @@ -32792,9 +32784,9 @@ components: workspaces: type: array items: - $ref: '#/components/schemas/WorkspaceUpdateRequest' + $ref: "#/components/schemas/WorkspaceUpdateRequest" global_workspace_access: - $ref: '#/components/schemas/GlobalWorkspaceAccess' + $ref: "#/components/schemas/GlobalWorkspaceAccess" override_existing_workspace_access: type: boolean description: Whether to override existing workspace access settings @@ -32824,13 +32816,13 @@ components: nullable: true maxItems: 1 items: - $ref: '#/components/schemas/UsageLimits' + $ref: "#/components/schemas/UsageLimits" rate_limits: type: array nullable: true maxItems: 1 items: - $ref: '#/components/schemas/RateLimits' + $ref: "#/components/schemas/RateLimits" reset_usage: type: boolean description: Whether to reset current usage. If the current status is exhausted, this will change it back to active. @@ -32846,18 +32838,18 @@ components: properties: name: type: string - example: 'Open AI Workspace' + example: "Open AI Workspace" integration_id: type: string note: type: string nullable: true - example: 'randomness' + example: "randomness" status: type: string enum: [active, exhausted, expired] usage_limits: - $ref: '#/components/schemas/UsageLimits' + $ref: "#/components/schemas/UsageLimits" reset_usage: type: number nullable: true @@ -32870,7 +32862,7 @@ components: rate_limits: type: array items: - $ref: '#/components/schemas/RateLimits' + $ref: "#/components/schemas/RateLimits" nullable: true expires_at: type: string @@ -32884,16 +32876,16 @@ components: properties: name: type: string - example: 'Open AI Workspace' + example: "Open AI Workspace" note: type: string nullable: true - example: 'randomness' + example: "randomness" status: type: string enum: [active, exhausted] usage_limits: - $ref: '#/components/schemas/UsageLimits' + $ref: "#/components/schemas/UsageLimits" reset_usage: type: number nullable: true @@ -32908,7 +32900,7 @@ components: rate_limits: type: array items: - $ref: '#/components/schemas/RateLimits' + $ref: "#/components/schemas/RateLimits" nullable: true expires_at: type: string @@ -32916,7 +32908,7 @@ components: secret_mappings: type: array items: - $ref: '#/components/schemas/SecretMapping' + $ref: "#/components/schemas/SecretMapping" description: Secret reference mappings for this virtual key. Valid target_field values are "key" or "model_config.". object: type: string @@ -32970,7 +32962,7 @@ components: data: type: array items: - $ref: '#/components/schemas/Invite' + $ref: "#/components/schemas/Invite" User: type: object @@ -33019,7 +33011,7 @@ components: data: type: array items: - $ref: '#/components/schemas/User' + $ref: "#/components/schemas/User" WorkspaceMember: type: object @@ -33056,11 +33048,11 @@ components: created_at: type: string format: date-time - example: '2026-03-09T07:55:25.000Z' + example: "2026-03-09T07:55:25.000Z" last_updated_at: type: string format: date-time - example: '2026-03-09T07:55:25.000Z' + example: "2026-03-09T07:55:25.000Z" status: type: string example: active @@ -33115,7 +33107,7 @@ components: data: type: array items: - $ref: '#/components/schemas/WorkspaceMember' + $ref: "#/components/schemas/WorkspaceMember" Workspace: type: object @@ -33161,11 +33153,11 @@ components: usage_limits: type: array items: - $ref: '#/components/schemas/UsageLimits' + $ref: "#/components/schemas/UsageLimits" rate_limits: type: array items: - $ref: '#/components/schemas/RateLimits' + $ref: "#/components/schemas/RateLimits" WorkspaceList: type: object @@ -33180,7 +33172,7 @@ components: data: type: array items: - $ref: '#/components/schemas/Workspace' + $ref: "#/components/schemas/Workspace" WorkspaceWithUsers: type: object @@ -33235,15 +33227,15 @@ components: type: array items: type: object - $ref: '#/components/schemas/WorkspaceMember' + $ref: "#/components/schemas/WorkspaceMember" usage_limits: type: array items: - $ref: '#/components/schemas/UsageLimits' + $ref: "#/components/schemas/UsageLimits" rate_limits: type: array items: - $ref: '#/components/schemas/RateLimits' + $ref: "#/components/schemas/RateLimits" Collection: type: object @@ -33292,11 +33284,11 @@ components: CollectionWithDetails: allOf: - - $ref: '#/components/schemas/Collection' + - $ref: "#/components/schemas/Collection" - type: object properties: collection_details: - $ref: '#/components/schemas/CollectionDetails' + $ref: "#/components/schemas/CollectionDetails" ChildCollection: type: object @@ -33310,17 +33302,17 @@ components: type: string format: date-time collection_details: - $ref: '#/components/schemas/CollectionDetails' + $ref: "#/components/schemas/CollectionDetails" CollectionWithChildCollections: allOf: - - $ref: '#/components/schemas/Collection' + - $ref: "#/components/schemas/Collection" - type: object properties: child_collections: type: array items: - $ref: '#/components/schemas/ChildCollection' + $ref: "#/components/schemas/ChildCollection" Label: type: object @@ -33415,7 +33407,7 @@ components: data: type: array items: - $ref: '#/components/schemas/Label' + $ref: "#/components/schemas/Label" PromptSummary: type: object @@ -33443,7 +33435,7 @@ components: format: date-time object: type: string - enum: ['prompt'] + enum: ["prompt"] Prompt: type: object @@ -33469,7 +33461,7 @@ components: format: uuid prompt_version_status: type: string - enum: ['active', 'archived'] + enum: ["active", "archived"] prompt_version_description: type: string prompt_version_label_id: @@ -33525,10 +33517,10 @@ components: format: date-time status: type: string - enum: ['active', 'archived'] + enum: ["active", "archived"] object: type: string - enum: ['prompt'] + enum: ["prompt"] PromptPartialSummary: type: object @@ -33551,10 +33543,10 @@ components: format: date-time status: type: string - enum: ['active', 'archived'] + enum: ["active", "archived"] object: type: string - enum: ['partial'] + enum: ["partial"] PromptPartial: type: object @@ -33586,7 +33578,7 @@ components: format: date-time status: type: string - enum: ['active'] + enum: ["active"] PromptPartialVersion: type: object @@ -33610,10 +33602,10 @@ components: format: date-time prompt_version_status: type: string - enum: ['active', 'archived'] + enum: ["active", "archived"] object: type: string - enum: ['partial'] + enum: ["partial"] CustomLog: type: object @@ -33675,7 +33667,7 @@ components: data: type: array items: - $ref: '#/components/schemas/ExportItem' + $ref: "#/components/schemas/ExportItem" ExportItem: type: object properties: @@ -33686,9 +33678,9 @@ components: type: string format: uuid filters: - $ref: '#/components/schemas/GenerationsFilterSchema' + $ref: "#/components/schemas/GenerationsFilterSchema" requested_data: - $ref: '#/components/schemas/LogExportsRequestedData' + $ref: "#/components/schemas/LogExportsRequestedData" status: type: string enum: @@ -33801,7 +33793,7 @@ components: additionalProperties: true ai_org_model: type: string - example: 'openai__gpt-3.5-turbo, anthropic__claude-2.1' + example: "openai__gpt-3.5-turbo, anthropic__claude-2.1" weighted_feedback_min: type: number weighted_feedback_max: @@ -33818,7 +33810,7 @@ components: type: string page_size: type: number - description: 'max: 50000, default: 50000' + description: "max: 50000, default: 50000" example: 50000 current_page: type: number @@ -33838,41 +33830,41 @@ components: format: uuid description: Unique identifier for the log entry nullable: true - example: '550e8400-e29b-41d4-a716-446655440000' + example: "550e8400-e29b-41d4-a716-446655440000" request: - $ref: '#/components/schemas/LogRequest' + $ref: "#/components/schemas/LogRequest" response: - $ref: '#/components/schemas/LogResponse' + $ref: "#/components/schemas/LogResponse" organisation_id: type: string description: Organization identifier nullable: true - example: 'org-123' + example: "org-123" created_at: type: string format: date-time description: Timestamp when the log was created nullable: true - example: '2024-01-15T10:30:00.000Z' + example: "2024-01-15T10:30:00.000Z" metrics: - $ref: '#/components/schemas/AnalyticsMetrics' + $ref: "#/components/schemas/AnalyticsMetrics" description: Analytics metrics object containing detailed metrics about the request finalUntransformedRequest: - $ref: '#/components/schemas/RequestResponseObject' + $ref: "#/components/schemas/RequestResponseObject" description: The original request before any transformations (only present when debug logging is enabled) originalResponse: - $ref: '#/components/schemas/RequestResponseObject' + $ref: "#/components/schemas/RequestResponseObject" description: The original response from the provider (only present when debug logging is enabled or request failed) transformedRequest: - $ref: '#/components/schemas/RequestResponseObject' + $ref: "#/components/schemas/RequestResponseObject" description: The request after transformations (only present when debug logging is enabled) LogRequest: @@ -33886,13 +33878,13 @@ components: type: string format: uri description: Sanitized request URL - example: 'https://api.openai.com/v1/chat/completions' + example: "https://api.openai.com/v1/chat/completions" method: type: string description: HTTP method enum: [GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD] - example: 'POST' + example: "POST" headers: type: object @@ -33900,8 +33892,8 @@ components: type: string description: Request headers (only present when debug logging is enabled) example: - 'Content-Type': 'application/json' - 'Authorization': 'Bearer hashed_value' + "Content-Type": "application/json" + "Authorization": "Bearer hashed_value" body: type: object @@ -33914,9 +33906,9 @@ components: type: string description: Portkey-specific headers example: - 'x-portkey-trace-id': 'trace-123' - 'x-portkey-span-id': 'span-456' - 'x-portkey-metadata': '{"key":"value"}' + "x-portkey-trace-id": "trace-123" + "x-portkey-span-id": "span-456" + "x-portkey-metadata": '{"key":"value"}' LogResponse: type: object @@ -33937,15 +33929,15 @@ components: type: string description: Response headers (only present when debug logging is enabled or request failed) example: - 'Content-Type': 'application/json' + "Content-Type": "application/json" body: type: object additionalProperties: true description: Response body (only present when debug logging is enabled or request failed). May be redacted for certain embedding models. example: - id: 'chatcmpl-123' - object: 'chat.completion' + id: "chatcmpl-123" + object: "chat.completion" created: 1677652288 responseTime: @@ -33957,7 +33949,7 @@ components: lastUsedOptionJsonPath: type: string description: JSON path to the last used option in the config - example: '$.config.options[0]' + example: "$.config.options[0]" RequestResponseObject: type: object @@ -33987,38 +33979,38 @@ components: type: string format: uuid description: Unique identifier for the log entry - example: '550e8400-e29b-41d4-a716-446655440000' + example: "550e8400-e29b-41d4-a716-446655440000" organisation_id: type: string description: Organization identifier - example: 'org-123' + example: "org-123" organisation_name: type: string description: Organization name - example: 'Acme Corp' + example: "Acme Corp" prompt_id: type: string description: Prompt identifier - example: 'prompt-789' + example: "prompt-789" prompt_version_id: type: string description: Prompt version identifier - example: 'prompt-v1' + example: "prompt-v1" config_id: type: string description: Configuration identifier - example: 'config-123' + example: "config-123" created_at: type: string format: date-time description: Timestamp when the log was created - example: '2024-01-15T10:30:00.000' + example: "2024-01-15T10:30:00.000" is_success: type: boolean @@ -34028,12 +34020,12 @@ components: ai_org: type: string description: AI provider organization (e.g., openai, anthropic) - example: 'openai' + example: "openai" ai_model: type: string description: AI model used - example: 'gpt-4o' + example: "gpt-4o" req_units: type: number @@ -34062,19 +34054,19 @@ components: cost_currency: type: string description: Currency code for the cost - default: 'USD' - example: 'USD' + default: "USD" + example: "USD" request_url: type: string format: uri description: Sanitized request URL - example: 'https://api.openai.com/v1/chat/completions' + example: "https://api.openai.com/v1/chat/completions" request_method: type: string description: HTTP method - example: 'POST' + example: "POST" response_status_code: type: integer @@ -34097,13 +34089,13 @@ components: type: string nullable: true description: Cache status (e.g., HIT, MISS, DISABLED, SEMANTIC HIT) - example: 'MISS' + example: "MISS" cache_type: type: string nullable: true description: Type of cache used - example: 'semantic' + example: "semantic" stream_mode: type: integer @@ -34119,62 +34111,62 @@ components: trace_id: type: string description: Distributed tracing trace ID - example: 'trace-123' + example: "trace-123" span_id: type: string description: Distributed tracing span ID - example: 'span-456' + example: "span-456" span_name: type: string description: Name of the span - example: 'llm' + example: "llm" parent_span_id: type: string description: Parent span ID in distributed tracing - example: 'span-789' + example: "span-789" mode: type: string description: Request mode (e.g., single, loadbalance, fallback) - example: 'single' + example: "single" virtual_key: type: string description: Virtual key identifier - example: 'vk-123' + example: "vk-123" source: type: string description: Source of the request (e.g., rubeus, proxy) - example: 'rubeus' + example: "rubeus" runtime: type: string description: Runtime environment - example: 'node' + example: "node" runtime_version: type: string description: Runtime version - example: '18.0.0' + example: "18.0.0" sdk_version: type: string description: SDK version - example: '1.0.0' + example: "1.0.0" config: type: string description: Configuration slug or ID - example: 'pc-config-123' + example: "pc-config-123" internal_trace_id: type: string description: Internal trace ID for gateway tracking - example: 'internal-trace-123' + example: "internal-trace-123" last_used_option_index: type: integer @@ -34184,23 +34176,23 @@ components: config_version_id: type: string description: Configuration version identifier - example: 'config-v1' + example: "config-v1" prompt_slug: type: string description: Prompt slug - example: 'my-prompt' + example: "my-prompt" workspace_slug: type: string nullable: true description: Workspace slug - example: 'my-workspace' + example: "my-workspace" log_store_file_path_format: type: string description: Path format version for log storage - example: 'v1' + example: "v1" metadata.key: type: array @@ -34208,7 +34200,7 @@ components: type: string nullable: true description: Array of metadata keys - example: ['key1', 'key2'] + example: ["key1", "key2"] metadata.value: type: array @@ -34216,12 +34208,12 @@ components: type: string nullable: true description: Array of metadata values - example: ['value1', 'value2'] + example: ["value1", "value2"] api_key_id: type: string description: API key identifier - example: 'api-key-123' + example: "api-key-123" request_parsing_time: type: integer @@ -34359,47 +34351,47 @@ components: id: type: string format: uuid - example: 'f47ac10b-58cc-4372-a567-0e02b2c3d479' + example: "f47ac10b-58cc-4372-a567-0e02b2c3d479" key: type: string - example: 'Xk*******S4' + example: "Xk*******S4" name: type: string - example: 'Development API Key' + example: "Development API Key" description: type: string - example: 'API key for development environment' + example: "API key for development environment" type: type: string - enum: ['organisation-service', 'workspace-service', 'workspace-user'] - example: 'organisation-service' + enum: ["organisation-service", "workspace-service", "workspace-user"] + example: "organisation-service" organisation_id: type: string format: uuid - example: 'a1b2c3d4-e5f6-4a5b-8c7d-9e0f1a2b3c4d' + example: "a1b2c3d4-e5f6-4a5b-8c7d-9e0f1a2b3c4d" workspace_id: type: string - example: 'ws-myworkspace' + example: "ws-myworkspace" user_id: type: string format: uuid - example: 'c3d4e5f6-a7b8-6c7d-0e1f-2a3b4c5d6e7f' + example: "c3d4e5f6-a7b8-6c7d-0e1f-2a3b4c5d6e7f" status: type: string - enum: ['active', 'exhausted'] - example: 'active' + enum: ["active", "exhausted"] + example: "active" created_at: type: string format: date-time - example: '2023-09-15T10:30:00Z' + example: "2023-09-15T10:30:00Z" last_updated_at: type: string format: date-time - example: '2023-09-15T10:30:00Z' + example: "2023-09-15T10:30:00Z" creation_mode: type: string - enum: ['ui', 'api', 'auto'] - example: 'ui' + enum: ["ui", "api", "auto"] + example: "ui" rate_limits: type: array items: @@ -34407,15 +34399,15 @@ components: properties: type: type: string - example: 'requests' + example: "requests" unit: type: string - example: 'rpm' + example: "rpm" value: type: integer example: 100 usage_limits: - $ref: '#/components/schemas/UsageLimits' + $ref: "#/components/schemas/UsageLimits" reset_usage: type: number example: 0 @@ -34423,7 +34415,7 @@ components: type: array items: type: string - example: ['completions.write'] + example: ["completions.write"] defaults: type: object properties: @@ -34431,8 +34423,8 @@ components: type: object additionalProperties: true example: - environment: 'development' - team: 'backend' + environment: "development" + team: "backend" config_id: type: string example: config-abc @@ -34441,14 +34433,14 @@ components: items: type: string format: email - example: 'foo@bar.com' + example: "foo@bar.com" expires_at: type: string format: date-time object: type: string - enum: ['api-key'] - example: 'api-key' + enum: ["api-key"] + example: "api-key" ApiKeyObjectList: type: object @@ -34463,7 +34455,7 @@ components: data: type: array items: - $ref: '#/components/schemas/ApiKeyObject' + $ref: "#/components/schemas/ApiKeyObject" CreateApiKeyObject: type: object @@ -34473,59 +34465,23 @@ components: properties: name: type: string - maxLength: 100 - example: 'Development API Key' + example: "Development API Key" description: type: string - maxLength: 200 - example: 'API key for development environment' + example: "API key for development environment" organisation_id: type: string format: uuid description: Organisation ID. Optional when calling via an org-level API key (picked from auth context). - example: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890' + example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" workspace_id: type: string - description: Workspace ID or slug (e.g. ws-myworkspace). Required for workspace-scoped keys. - example: 'ws-myworkspace' + example: "ws-myworkspace" user_id: type: string format: uuid description: "**Required** when sub-type path parameter is 'user'. Not required when sub-type is 'service'." - example: 'c3d4e5f6-a7b8-6c7d-0e1f-2a3b4c5d6e7f' - scopes: - type: array - minItems: 1 - items: - type: string - example: ['completions.write'] - defaults: - type: object - nullable: true - properties: - config_id: - type: string - format: uuid - nullable: true - description: UUID of the config to pin to this key. Every request using this key will automatically apply this config. - example: 'f1e2d3c4-b5a6-7890-fedc-ba9876543210' - allow_config_override: - type: boolean - nullable: true - default: true - description: When false, the pinned config_id cannot be overridden at request time. - example: false - metadata: - type: object - nullable: true - additionalProperties: - type: string - description: Default metadata attached to every request made with this key. Values must be strings. - example: - environment: 'development' - team: 'backend' - usage_limits: - $ref: '#/components/schemas/UsageLimits' + example: "c3d4e5f6-a7b8-6c7d-0e1f-2a3b4c5d6e7f" rate_limits: type: array nullable: true @@ -34538,31 +34494,53 @@ components: properties: type: type: string - enum: ['requests', 'tokens'] - example: 'requests' + enum: ["requests", "tokens"] + example: "requests" unit: type: string - enum: ['rpd', 'rph', 'rpm', 'rps', 'rpw'] - description: 'Rate limit unit: requests/tokens per day, hour, minute, second, or week.' - example: 'rpm' + enum: ["rpd", "rph", "rpm", "rps", "rpw"] + description: "Rate limit unit: requests/tokens per day, hour, minute, second, or week." + example: "rpm" value: type: integer minimum: 0 example: 100 - expires_at: - type: string - format: date-time - nullable: true - description: ISO 8601 datetime at which this key expires. Must not exceed the org/workspace maximum TTL if configured. - example: '2026-12-31T23:59:59Z' + usage_limits: + $ref: "#/components/schemas/UsageLimits" + scopes: + type: array + items: + type: string + example: ["completions.write"] + defaults: + type: object + properties: + metadata: + type: object + additionalProperties: true + example: + environment: "development" + team: "backend" + config_id: + type: string + example: config-abc + allow_config_override: + type: boolean + default: true + description: When false, the pinned config_id cannot be overridden at request time. + example: false alert_emails: type: array - nullable: true items: type: string format: email - description: Email addresses to notify when usage limits are approaching the alert_threshold. - example: ['admin@example.com'] + example: "foo@bar.com" + expires_at: + type: string + format: date-time + nullable: true + description: ISO 8601 datetime at which this key expires. Must not exceed the org/workspace maximum TTL if configured. + example: "2026-12-31T23:59:59Z" rotation_policy: type: object nullable: true @@ -34570,16 +34548,16 @@ components: properties: rotation_period: type: string - enum: ['weekly', 'monthly'] + enum: ["weekly", "monthly"] nullable: true description: How often to automatically rotate the key. - example: 'monthly' + example: "monthly" next_rotation_at: type: string format: date-time nullable: true description: Explicit datetime for the next rotation. Mutually exclusive with rotation_period. - example: '2026-06-01T00:00:00Z' + example: "2026-06-01T00:00:00Z" key_transition_period_ms: type: integer minimum: 1800000 @@ -34588,49 +34566,13 @@ components: UpdateApiKeyObject: type: object - description: All fields are optional. Only include the fields you want to change. properties: name: type: string - maxLength: 100 - example: 'Development API Key' + example: "Development API Key" description: type: string - maxLength: 200 - example: 'API key for development environment' - scopes: - type: array - minItems: 1 - items: - type: string - description: Replaces the entire scope list on the key. - example: ['completions.write'] - defaults: - type: object - nullable: true - properties: - config_id: - type: string - format: uuid - nullable: true - description: "UUID of the config to pin. Set to null to remove the pinned config (also resets allow_config_override to true)." - example: 'f1e2d3c4-b5a6-7890-fedc-ba9876543210' - allow_config_override: - type: boolean - nullable: true - description: When false, the pinned config_id cannot be overridden at request time. - example: false - metadata: - type: object - nullable: true - additionalProperties: - type: string - description: Default metadata attached to every request made with this key. Values must be strings. - example: - environment: 'development' - team: 'backend' - usage_limits: - $ref: '#/components/schemas/UsageLimits' + example: "API key for development environment" rate_limits: type: array nullable: true @@ -34643,35 +34585,57 @@ components: properties: type: type: string - enum: ['requests', 'tokens'] - example: 'requests' + enum: ["requests", "tokens"] + example: "requests" unit: type: string - enum: ['rpd', 'rph', 'rpm', 'rps', 'rpw'] - description: 'Rate limit unit: requests/tokens per day, hour, minute, second, or week.' - example: 'rpm' + enum: ["rpd", "rph", "rpm", "rps", "rpw"] + description: "Rate limit unit: requests/tokens per day, hour, minute, second, or week." + example: "rpm" value: type: integer minimum: 0 example: 100 - expires_at: - type: string - format: date-time - nullable: true - description: ISO 8601 datetime at which this key expires. - example: '2026-12-31T23:59:59Z' + usage_limits: + $ref: "#/components/schemas/UsageLimits" reset_usage: type: boolean - description: When true, resets the accumulated usage counter. If the key status is exhausted, this will restore it to active. + description: Whether to reset current usage. If the current status is exhausted, this will change it back to active. example: true + scopes: + type: array + items: + type: string + example: ["completions.write"] + defaults: + type: object + properties: + metadata: + type: object + additionalProperties: true + example: + environment: "development" + team: "backend" + config_id: + type: string + example: config-abc + allow_config_override: + type: boolean + default: true + description: When false, the pinned config_id cannot be overridden at request time. + example: false alert_emails: type: array - nullable: true items: type: string format: email - description: Email addresses to notify when usage limits are approaching the alert_threshold. - example: ['admin@example.com'] + example: "foo@bar.com" + expires_at: + type: string + format: date-time + nullable: true + description: ISO 8601 datetime at which this key expires. + example: "2026-12-31T23:59:59Z" rotation_policy: type: object nullable: true @@ -34679,16 +34643,16 @@ components: properties: rotation_period: type: string - enum: ['weekly', 'monthly'] + enum: ["weekly", "monthly"] nullable: true description: How often to automatically rotate the key. - example: 'monthly' + example: "monthly" next_rotation_at: type: string format: date-time nullable: true description: Explicit datetime for the next rotation. Mutually exclusive with rotation_period. - example: '2026-06-01T00:00:00Z' + example: "2026-06-01T00:00:00Z" key_transition_period_ms: type: integer minimum: 1800000 @@ -34710,16 +34674,16 @@ components: id: type: string format: uuid - example: '550e8400-e29b-41d4-a716-446655440000' + example: "550e8400-e29b-41d4-a716-446655440000" key: type: string description: Newly rotated API key value. - example: 'pk_live_new_rotated_key_value' + example: "pk_live_new_rotated_key_value" key_transition_expires_at: type: string format: date-time description: Timestamp when the previous key version stops being accepted. - example: '2026-01-15T10:30:00.000Z' + example: "2026-01-15T10:30:00.000Z" PromptRenderResponse: type: object @@ -34733,9 +34697,9 @@ components: data: oneOf: - title: Chat Completions - $ref: '#/components/schemas/CreateChatCompletionRequest' + $ref: "#/components/schemas/CreateChatCompletionRequest" - title: Completions - $ref: '#/components/schemas/CreateCompletionRequest' + $ref: "#/components/schemas/CreateCompletionRequest" CreateGuardrailRequest: type: object @@ -34747,7 +34711,7 @@ components: name: type: string description: Name of the guardrail - example: 'Content Safety Check' + example: "Content Safety Check" workspace_id: type: string format: uuid @@ -34760,10 +34724,10 @@ components: type: array description: Array of guardrail checks to apply items: - $ref: '#/components/schemas/GuardrailCheck' + $ref: "#/components/schemas/GuardrailCheck" minItems: 1 actions: - $ref: '#/components/schemas/GuardrailActions' + $ref: "#/components/schemas/GuardrailActions" UpdateGuardrailRequest: type: object @@ -34775,10 +34739,10 @@ components: type: array description: Updated array of guardrail checks items: - $ref: '#/components/schemas/GuardrailCheck' + $ref: "#/components/schemas/GuardrailCheck" minItems: 1 actions: - $ref: '#/components/schemas/GuardrailActions' + $ref: "#/components/schemas/GuardrailActions" GuardrailActions: type: object @@ -34811,7 +34775,7 @@ components: metadata: type: string description: Additional metadata for the feedback - default: '' + default: "" required: - value - weight @@ -34837,7 +34801,7 @@ components: metadata: type: string description: Additional metadata for the feedback - default: '' + default: "" required: - value - weight @@ -34860,88 +34824,88 @@ components: description: Identifier of the guardrail check type enum: # BASIC category guardrails - - 'default.jwt' - - 'default.modelWhitelist' - - 'default.isAllLowerCase' - - 'default.regexMatch' - - 'default.sentenceCount' - - 'default.wordCount' - - 'default.characterCount' - - 'default.jsonSchema' - - 'default.jsonKeys' - - 'default.contains' - - 'default.validUrls' - - 'default.containsCode' - - 'default.webhook' - - 'default.endsWith' - - 'default.alluppercase' - - 'default.requiredMetadataKeys' - - 'default.allowedRequestTypes' + - "default.jwt" + - "default.modelWhitelist" + - "default.isAllLowerCase" + - "default.regexMatch" + - "default.sentenceCount" + - "default.wordCount" + - "default.characterCount" + - "default.jsonSchema" + - "default.jsonKeys" + - "default.contains" + - "default.validUrls" + - "default.containsCode" + - "default.webhook" + - "default.endsWith" + - "default.alluppercase" + - "default.requiredMetadataKeys" + - "default.allowedRequestTypes" # PRO category guardrails - - 'portkey.moderateContent' - - 'portkey.language' - - 'portkey.pii' - - 'portkey.gibberish' + - "portkey.moderateContent" + - "portkey.language" + - "portkey.pii" + - "portkey.gibberish" # PARTNER category guardrails - - 'sydelabs.sydeguard' - - 'aporia.validateProject' - - 'pillar.scanPrompt' - - 'pillar.scanResponse' - - 'patronus.phi' - - 'patronus.pii' - - 'patronus.isConcise' - - 'patronus.isHelpful' - - 'patronus.isPolite' - - 'patronus.noApologies' - - 'patronus.noGenderBias' - - 'patronus.noRacialBias' - - 'patronus.retrievalAnswerRelevance' - - 'patronus.toxicity' - - 'patronus.custom' - - 'mistral.moderateContent' - - 'bedrock.guard' - - 'promptfoo.guard' - - 'promptfoo.pii' - - 'promptfoo.harm' - - 'acuvity.scan' - - 'lasso.classify' - - 'azure.contentSafety' - - 'azure.pii' - - 'panw-prisma-airs.intercept' + - "sydelabs.sydeguard" + - "aporia.validateProject" + - "pillar.scanPrompt" + - "pillar.scanResponse" + - "patronus.phi" + - "patronus.pii" + - "patronus.isConcise" + - "patronus.isHelpful" + - "patronus.isPolite" + - "patronus.noApologies" + - "patronus.noGenderBias" + - "patronus.noRacialBias" + - "patronus.retrievalAnswerRelevance" + - "patronus.toxicity" + - "patronus.custom" + - "mistral.moderateContent" + - "bedrock.guard" + - "promptfoo.guard" + - "promptfoo.pii" + - "promptfoo.harm" + - "acuvity.scan" + - "lasso.classify" + - "azure.contentSafety" + - "azure.pii" + - "panw-prisma-airs.intercept" parameters: oneOf: - - $ref: '#/components/schemas/JWTParameters' - - $ref: '#/components/schemas/ModelWhitelistParameters' - - $ref: '#/components/schemas/RegexMatchParameters' - - $ref: '#/components/schemas/SentenceCountParameters' - - $ref: '#/components/schemas/WordCountParameters' - - $ref: '#/components/schemas/CharacterCountParameters' - - $ref: '#/components/schemas/JSONSchemaParameters' - - $ref: '#/components/schemas/JSONKeysParameters' - - $ref: '#/components/schemas/ContainsParameters' - - $ref: '#/components/schemas/ValidUrlsParameters' - - $ref: '#/components/schemas/ContainsCodeParameters' - - $ref: '#/components/schemas/WebhookParameters' - - $ref: '#/components/schemas/EndsWithParameters' - - $ref: '#/components/schemas/UppercaseParameters' - - $ref: '#/components/schemas/RequiredMetadataKeysParameters' - - $ref: '#/components/schemas/AllowedRequestTypesParameters' - - $ref: '#/components/schemas/SydeGuardParameters' - - $ref: '#/components/schemas/AporiaParameters' - - $ref: '#/components/schemas/PillarScanParameters' - - $ref: '#/components/schemas/PatronusParameters' - - $ref: '#/components/schemas/PatronusCustomParameters' - - $ref: '#/components/schemas/PortkeyModerationParameters' - - $ref: '#/components/schemas/PortkeyLanguageParameters' - - $ref: '#/components/schemas/PortkeyPIIParameters' - - $ref: '#/components/schemas/MistralModerationParameters' - - $ref: '#/components/schemas/BedrockGuardParameters' - - $ref: '#/components/schemas/PromptfooParameters' - - $ref: '#/components/schemas/AcuvityScanParameters' - - $ref: '#/components/schemas/AzureContentSafetyParameters' - - $ref: '#/components/schemas/AzurePIIParameters' - - $ref: '#/components/schemas/PANWPrismaParameters' - - $ref: '#/components/schemas/BasicParameters' + - $ref: "#/components/schemas/JWTParameters" + - $ref: "#/components/schemas/ModelWhitelistParameters" + - $ref: "#/components/schemas/RegexMatchParameters" + - $ref: "#/components/schemas/SentenceCountParameters" + - $ref: "#/components/schemas/WordCountParameters" + - $ref: "#/components/schemas/CharacterCountParameters" + - $ref: "#/components/schemas/JSONSchemaParameters" + - $ref: "#/components/schemas/JSONKeysParameters" + - $ref: "#/components/schemas/ContainsParameters" + - $ref: "#/components/schemas/ValidUrlsParameters" + - $ref: "#/components/schemas/ContainsCodeParameters" + - $ref: "#/components/schemas/WebhookParameters" + - $ref: "#/components/schemas/EndsWithParameters" + - $ref: "#/components/schemas/UppercaseParameters" + - $ref: "#/components/schemas/RequiredMetadataKeysParameters" + - $ref: "#/components/schemas/AllowedRequestTypesParameters" + - $ref: "#/components/schemas/SydeGuardParameters" + - $ref: "#/components/schemas/AporiaParameters" + - $ref: "#/components/schemas/PillarScanParameters" + - $ref: "#/components/schemas/PatronusParameters" + - $ref: "#/components/schemas/PatronusCustomParameters" + - $ref: "#/components/schemas/PortkeyModerationParameters" + - $ref: "#/components/schemas/PortkeyLanguageParameters" + - $ref: "#/components/schemas/PortkeyPIIParameters" + - $ref: "#/components/schemas/MistralModerationParameters" + - $ref: "#/components/schemas/BedrockGuardParameters" + - $ref: "#/components/schemas/PromptfooParameters" + - $ref: "#/components/schemas/AcuvityScanParameters" + - $ref: "#/components/schemas/AzureContentSafetyParameters" + - $ref: "#/components/schemas/AzurePIIParameters" + - $ref: "#/components/schemas/PANWPrismaParameters" + - $ref: "#/components/schemas/BasicParameters" description: Configuration parameters specific to the check type name: type: string @@ -34994,7 +34958,7 @@ components: type: array description: Array of guardrail summaries items: - $ref: '#/components/schemas/GuardrailSummary' + $ref: "#/components/schemas/GuardrailSummary" total: type: integer description: Total number of guardrails available @@ -35030,7 +34994,7 @@ components: description: Workspace UUID (null for organisation-level guardrails) status: type: string - enum: ['active', 'archived'] + enum: ["active", "archived"] description: Current status of the guardrail created_at: type: string @@ -35052,16 +35016,16 @@ components: GuardrailDetails: allOf: - - $ref: '#/components/schemas/GuardrailSummary' + - $ref: "#/components/schemas/GuardrailSummary" - type: object properties: checks: type: array description: Array of configured guardrail checks items: - $ref: '#/components/schemas/GuardrailCheck' + $ref: "#/components/schemas/GuardrailCheck" actions: - $ref: '#/components/schemas/GuardrailActions' + $ref: "#/components/schemas/GuardrailActions" # Detailed parameter schemas for specific guardrail types JWTParameters: @@ -35089,13 +35053,13 @@ components: maxTokenAge: type: string description: Max token age - default: '1d' + default: "1d" algorithms: type: array items: type: string description: Algorithms to check for the JWT token - default: ['RS256'] + default: ["RS256"] RegexMatchParameters: title: Regex Match Parameters @@ -35203,9 +35167,9 @@ components: description: Keys to check for in JSON operator: type: string - enum: ['any', 'all', 'none'] + enum: ["any", "all", "none"] description: Operator to use for key checking - default: 'any' + default: "any" ContainsParameters: title: Contains Parameters @@ -35221,9 +35185,9 @@ components: description: Words or phrases to check for operator: type: string - enum: ['any', 'all', 'none'] + enum: ["any", "all", "none"] description: Operator to use for word checking - default: 'any' + default: "any" ValidUrlsParameters: title: Valid URLs Parameters @@ -35247,31 +35211,31 @@ components: format: type: string enum: - - 'SQL' - - 'Python' - - 'TypeScript' - - 'JavaScript' - - 'Java' - - 'C#' - - 'C++' - - 'C' - - 'Ruby' - - 'PHP' - - 'Swift' - - 'Kotlin' - - 'Go' - - 'Rust' - - 'Scala' - - 'R' - - 'Perl' - - 'Shell' - - 'HTML' - - 'CSS' - - 'XML' - - 'JSON' - - 'YAML' - - 'Markdown' - - 'Dockerfile' + - "SQL" + - "Python" + - "TypeScript" + - "JavaScript" + - "Java" + - "C#" + - "C++" + - "C" + - "Ruby" + - "PHP" + - "Swift" + - "Kotlin" + - "Go" + - "Rust" + - "Scala" + - "R" + - "Perl" + - "Shell" + - "HTML" + - "CSS" + - "XML" + - "JSON" + - "YAML" + - "Markdown" + - "Dockerfile" description: Code format to check for not: type: boolean @@ -35338,9 +35302,9 @@ components: description: Metadata keys to check for operator: type: string - enum: ['all', 'any', 'none'] + enum: ["all", "any", "none"] description: Operator to use for key checking - default: 'all' + default: "all" AllowedRequestTypesParameters: title: Allowed Request Types Parameters @@ -35475,11 +35439,11 @@ components: items: type: string enum: - - 'prompt_injection' - - 'pii' - - 'secrets' - - 'toxic_language' - - 'invisible_characters' + - "prompt_injection" + - "pii" + - "secrets" + - "toxic_language" + - "invisible_characters" description: Scanners to use for content analysis timeout: type: number @@ -35524,17 +35488,17 @@ components: items: type: string enum: - - 'hate' - - 'hate/threatening' - - 'harassment' - - 'harassment/threatening' - - 'self-harm' - - 'self-harm/intent' - - 'self-harm/instructions' - - 'sexual' - - 'sexual/minors' - - 'violence' - - 'violence/graphic' + - "hate" + - "hate/threatening" + - "harassment" + - "harassment/threatening" + - "self-harm" + - "self-harm/intent" + - "self-harm/instructions" + - "sexual" + - "sexual/minors" + - "violence" + - "violence/graphic" description: Categories that should NOT be allowed timeout: type: number @@ -35548,55 +35512,55 @@ components: language: type: string enum: - - 'eng_Latn' - - 'zho_Hans' - - 'spa_Latn' - - 'ara_Arab' - - 'por_Latn' - - 'ind_Latn' - - 'fra_Latn' - - 'jpn_Jpan' - - 'rus_Cyrl' - - 'deu_Latn' - - 'kor_Hang' - - 'tur_Latn' - - 'ita_Latn' - - 'pes_Arab' - - 'pol_Latn' - - 'vie_Latn' - - 'nld_Latn' - - 'hin_Deva' - - 'tha_Thai' - - 'heb_Hebr' - - 'ben_Beng' - - 'swe_Latn' - - 'ces_Latn' - - 'ron_Latn' - - 'ell_Grek' - - 'ukr_Cyrl' - - 'dan_Latn' - - 'fin_Latn' - - 'nor_Latn' - - 'hun_Latn' - - 'cat_Latn' - - 'bul_Cyrl' - - 'msa_Latn' - - 'hrv_Latn' - - 'arb_Latn' - - 'slk_Latn' - - 'lit_Latn' - - 'lav_Latn' - - 'srp_Cyrl' - - 'slv_Latn' - - 'est_Latn' - - 'urd_Arab' - - 'fil_Latn' - - 'aze_Latn' - - 'tam_Taml' - - 'tel_Telu' - - 'mar_Deva' - - 'kan_Knda' - - 'fas_Arab' + - "eng_Latn" + - "zho_Hans" + - "spa_Latn" + - "ara_Arab" + - "por_Latn" + - "ind_Latn" + - "fra_Latn" + - "jpn_Jpan" + - "rus_Cyrl" + - "deu_Latn" + - "kor_Hang" + - "tur_Latn" + - "ita_Latn" + - "pes_Arab" + - "pol_Latn" + - "vie_Latn" + - "nld_Latn" + - "hin_Deva" + - "tha_Thai" + - "heb_Hebr" + - "ben_Beng" + - "swe_Latn" + - "ces_Latn" + - "ron_Latn" + - "ell_Grek" + - "ukr_Cyrl" + - "dan_Latn" + - "fin_Latn" + - "nor_Latn" + - "hun_Latn" + - "cat_Latn" + - "bul_Cyrl" + - "msa_Latn" + - "hrv_Latn" + - "arb_Latn" + - "slk_Latn" + - "lit_Latn" + - "lav_Latn" + - "srp_Cyrl" + - "slv_Latn" + - "est_Latn" + - "urd_Arab" + - "fil_Latn" + - "aze_Latn" + - "tam_Taml" + - "tel_Telu" + - "mar_Deva" + - "kan_Knda" + - "fas_Arab" description: Language that should be allowed in content not: type: boolean @@ -35622,13 +35586,13 @@ components: items: type: string enum: - - 'EMAIL_ADDRESS' - - 'PHONE_NUMBER' - - 'LOCATION_ADDRESS' - - 'NAME' - - 'IP_ADDRESS' - - 'CREDIT_CARD' - - 'SSN' + - "EMAIL_ADDRESS" + - "PHONE_NUMBER" + - "LOCATION_ADDRESS" + - "NAME" + - "IP_ADDRESS" + - "CREDIT_CARD" + - "SSN" description: Types of PII that should NOT be allowed timeout: type: number @@ -35646,15 +35610,15 @@ components: items: type: string enum: - - 'sexual' - - 'hate_and_discrimination' - - 'violence_and_threats' - - 'dangerous_and_criminal_content' - - 'selfharm' - - 'health' - - 'financial' - - 'law' - - 'pii' + - "sexual" + - "hate_and_discrimination" + - "violence_and_threats" + - "dangerous_and_criminal_content" + - "selfharm" + - "health" + - "financial" + - "law" + - "pii" description: Categories that should NOT be allowed timeout: type: number @@ -35773,15 +35737,15 @@ components: language_values: type: string enum: - - 'english' - - 'chinese' - - 'spanish' - - 'french' - - 'german' - - 'japanese' - - 'gibberish' + - "english" + - "chinese" + - "spanish" + - "french" + - "german" + - "japanese" + - "gibberish" description: Language to check - default: 'english' + default: "english" pii: type: boolean description: Enable PII detection @@ -35795,21 +35759,21 @@ components: items: type: string enum: - - 'email_address' - - 'ssn' - - 'person' - - 'aba_routing_number' - - 'address' - - 'bank_account' - - 'bitcoin_wallet' - - 'credit_card' - - 'driver_license' - - 'itin_number' - - 'location' - - 'medical_license' - - 'money_amount' - - 'passport_number' - - 'phone_number' + - "email_address" + - "ssn" + - "person" + - "aba_routing_number" + - "address" + - "bank_account" + - "bitcoin_wallet" + - "credit_card" + - "driver_license" + - "itin_number" + - "location" + - "medical_license" + - "money_amount" + - "passport_number" + - "phone_number" description: PII categories to detect secrets: type: boolean @@ -35824,13 +35788,13 @@ components: items: type: string enum: - - 'credentials' - - 'aws_secret_key' - - 'github' - - 'openai' - - 'stripe' - - 'jwt' - - 'private_key' + - "credentials" + - "aws_secret_key" + - "github" + - "openai" + - "stripe" + - "jwt" + - "private_key" description: Secret categories to detect timeout: type: number @@ -35850,7 +35814,7 @@ components: apiVersion: type: string description: API version for the Content Safety API - default: '2024-09-01' + default: "2024-09-01" severity: type: number description: Severity threshold for the Content Safety API @@ -35859,7 +35823,7 @@ components: type: array items: type: string - enum: ['Hate', 'SelfHarm', 'Sexual', 'Violence'] + enum: ["Hate", "SelfHarm", "Sexual", "Violence"] description: Categories to check against timeout: type: number @@ -35872,17 +35836,17 @@ components: properties: domain: type: string - enum: ['none', 'phi'] + enum: ["none", "phi"] description: Domain to check against - default: 'none' + default: "none" apiVersion: type: string description: API version for the Content Safety API - default: '2024-11-01' + default: "2024-11-01" modelVersion: type: string description: Version of the PII detection model to use - default: 'latest' + default: "latest" redact: type: boolean description: Whether to redact detected PII @@ -35933,7 +35897,7 @@ components: type: string description: Role ARN for the bedrock batch job allOf: - - $ref: '#/components/schemas/OpenAIBatchJob' + - $ref: "#/components/schemas/OpenAIBatchJob" description: Gateway supported body params for bedrock fine-tuning. title: Bedrock Params BedrockBatchParams: @@ -36005,7 +35969,7 @@ components: description: Role ARN for the bedrock batch job portkey_options: allOf: - - $ref: '#/components/schemas/PortkeyBatchOptions' + - $ref: "#/components/schemas/PortkeyBatchOptions" description: Portkey Gateway Provider specific headers to be passed to the provider, if portkey is used as a provider provider_options: anyOf: @@ -36043,7 +36007,7 @@ components: - model description: Provider specific options to be passed to the provider, optional can be passed directly as well. allOf: - - $ref: '#/components/schemas/OpenAIBatchJob' + - $ref: "#/components/schemas/OpenAIBatchJob" description: Gateway supported body params for portkey managed batching. title: Portkey Params @@ -36086,7 +36050,7 @@ components: type: string description: Model to start batch job with allOf: - - $ref: '#/components/schemas/OpenAIBatchJob' + - $ref: "#/components/schemas/OpenAIBatchJob" description: Gateway supported body params for Vertext fine-tuning. title: Vertex Params VertexBatchParams: @@ -36144,13 +36108,13 @@ components: type: array minItems: 1 items: - $ref: '#/components/schemas/Condition' + $ref: "#/components/schemas/Condition" description: Array of conditions that define which requests the policy applies to group_by: type: array minItems: 1 items: - $ref: '#/components/schemas/GroupBy' + $ref: "#/components/schemas/GroupBy" description: Array of group by fields that define how usage is aggregated type: type: string @@ -36221,13 +36185,13 @@ components: type: array minItems: 1 items: - $ref: '#/components/schemas/Condition' + $ref: "#/components/schemas/Condition" description: Array of conditions that define which requests the policy applies to group_by: type: array minItems: 1 items: - $ref: '#/components/schemas/GroupBy' + $ref: "#/components/schemas/GroupBy" description: Array of group by fields that define how usage is aggregated type: type: string @@ -36289,12 +36253,12 @@ components: conditions: type: array items: - $ref: '#/components/schemas/Condition' + $ref: "#/components/schemas/Condition" description: Array of conditions group_by: type: array items: - $ref: '#/components/schemas/GroupBy' + $ref: "#/components/schemas/GroupBy" description: Array of group by fields type: type: string @@ -36335,7 +36299,7 @@ components: value_key_usage_map: type: object additionalProperties: - $ref: '#/components/schemas/ValueKeyUsage' + $ref: "#/components/schemas/ValueKeyUsage" description: Map of value keys to usage information (only included when include_usage=true) ValueKeyUsage: @@ -36379,12 +36343,12 @@ components: conditions: type: array items: - $ref: '#/components/schemas/Condition' + $ref: "#/components/schemas/Condition" description: Array of conditions group_by: type: array items: - $ref: '#/components/schemas/GroupBy' + $ref: "#/components/schemas/GroupBy" description: Array of group by fields type: type: string @@ -36439,14 +36403,14 @@ components: data: type: array items: - $ref: '#/components/schemas/UsageLimitsPolicy' + $ref: "#/components/schemas/UsageLimitsPolicy" total: type: integer description: Total number of policies UsageLimitsPolicyResponse: allOf: - - $ref: '#/components/schemas/UsageLimitsPolicy' + - $ref: "#/components/schemas/UsageLimitsPolicy" - type: object properties: object: @@ -36475,7 +36439,7 @@ components: data: type: array items: - $ref: '#/components/schemas/UsageLimitsPolicyEntity' + $ref: "#/components/schemas/UsageLimitsPolicyEntity" total: type: integer description: Total number of entities @@ -36489,14 +36453,14 @@ components: data: type: array items: - $ref: '#/components/schemas/RateLimitsPolicy' + $ref: "#/components/schemas/RateLimitsPolicy" total: type: integer description: Total number of policies RateLimitsPolicyResponse: allOf: - - $ref: '#/components/schemas/RateLimitsPolicy' + - $ref: "#/components/schemas/RateLimitsPolicy" - type: object properties: object: @@ -36522,7 +36486,7 @@ components: description: Workspace ID (optional; to create at workspace level) slug: type: string - pattern: '^[a-zA-Z0-9_-]+$' + pattern: "^[a-zA-Z0-9_-]+$" description: Optional slug; must be unique within organisation name: type: string @@ -36691,7 +36655,7 @@ components: data: type: array items: - $ref: '#/components/schemas/McpIntegrationListItem' + $ref: "#/components/schemas/McpIntegrationListItem" total: type: integer has_more: @@ -36767,7 +36731,7 @@ components: data: type: array items: - $ref: '#/components/schemas/McpIntegrationWorkspaceItem' + $ref: "#/components/schemas/McpIntegrationWorkspaceItem" global_workspace_access: type: object nullable: true @@ -36780,7 +36744,7 @@ components: workspaces: type: array items: - $ref: '#/components/schemas/McpIntegrationWorkspaceItem' + $ref: "#/components/schemas/McpIntegrationWorkspaceItem" global_workspace_access: type: object nullable: true @@ -36909,9 +36873,9 @@ components: data: type: array items: - $ref: '#/components/schemas/McpIntegrationCapabilityItem' + $ref: "#/components/schemas/McpIntegrationCapabilityItem" counts: - $ref: '#/components/schemas/McpIntegrationCapabilitiesCounts' + $ref: "#/components/schemas/McpIntegrationCapabilitiesCounts" total: type: integer has_more: @@ -37002,7 +36966,7 @@ components: description: MCP Integration ID (UUID) or slug slug: type: string - pattern: '^[a-zA-Z0-9_-]+$' + pattern: "^[a-zA-Z0-9_-]+$" minLength: 3 maxLength: 50 description: Optional slug; must be unique within organisation @@ -37116,7 +37080,7 @@ components: data: type: array items: - $ref: '#/components/schemas/McpServerListItem' + $ref: "#/components/schemas/McpServerListItem" total: type: integer @@ -37249,9 +37213,9 @@ components: data: type: array items: - $ref: '#/components/schemas/McpServerCapabilityItem' + $ref: "#/components/schemas/McpServerCapabilityItem" counts: - $ref: '#/components/schemas/McpServerCapabilitiesCounts' + $ref: "#/components/schemas/McpServerCapabilitiesCounts" total: type: integer has_more: @@ -37318,7 +37282,7 @@ components: data: type: array items: - $ref: '#/components/schemas/McpServerUserAccessItem' + $ref: "#/components/schemas/McpServerUserAccessItem" default_user_access: type: string enum: @@ -37380,7 +37344,7 @@ components: data: type: array items: - $ref: '#/components/schemas/McpServerConnectionItem' + $ref: "#/components/schemas/McpServerConnectionItem" total: type: integer has_more: From daaa7e4ed4bd374cce4e1f6bf9cb1070fe165425 Mon Sep 17 00:00:00 2001 From: Krishna Chandra Date: Wed, 22 Apr 2026 01:55:17 +0530 Subject: [PATCH 4/8] fix: swagger-cli validation fix --- openapi.yaml | 122 ++++++++++++++++++++++++++------------------------- 1 file changed, 62 insertions(+), 60 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 95d515fa..aefd54e3 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -5505,7 +5505,7 @@ paths: } main(); - response: &list_assistants_example | + x-example-response: &list_assistants_example | { "object": "list", "data": [ @@ -5644,7 +5644,7 @@ paths: } main(); - response: &create_assistants_example | + x-example-response: &create_assistants_example | { "id": "asst_abc123", "object": "assistant", @@ -5735,7 +5735,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "asst_abc123", "object": "assistant", @@ -5849,7 +5849,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "asst_123", "object": "assistant", @@ -5941,7 +5941,7 @@ paths: console.log(response); } main(); - response: | + x-example-response: | { "id": "asst_abc123", "object": "assistant.deleted", @@ -6190,7 +6190,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "thread_abc123", "object": "thread", @@ -6271,7 +6271,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "thread_abc123", "object": "thread", @@ -6374,7 +6374,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "thread_abc123", "object": "thread", @@ -6453,7 +6453,7 @@ paths: console.log(response); } main(); - response: | + x-example-response: | { "id": "thread_abc123", "object": "thread.deleted", @@ -6562,7 +6562,7 @@ paths: } main(); - response: | + x-example-response: | { "object": "list", "data": [ @@ -6696,7 +6696,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "msg_abc123", "object": "thread.message", @@ -6800,7 +6800,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "msg_abc123", "object": "thread.message", @@ -6918,7 +6918,7 @@ paths: }, } }' - response: | + x-example-response: | { "id": "msg_abc123", "object": "thread.message", @@ -7020,7 +7020,7 @@ paths: console.log(deletedMessage); } - response: | + x-example-response: | { "id": "msg_abc123", "object": "thread.message.deleted", @@ -7119,7 +7119,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "run_abc123", "object": "thread.run", @@ -7253,7 +7253,7 @@ paths: } main(); - response: | + x-example-response: | { "object": "list", "data": [ @@ -7440,7 +7440,7 @@ paths: } main(); - response: &run_object_example | + x-example-response: &run_object_example | { "id": "run_abc123", "object": "thread.run", @@ -7559,7 +7559,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "run_abc123", "object": "thread.run", @@ -7697,7 +7697,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "run_abc123", "object": "thread.run", @@ -7860,7 +7860,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "run_123", "object": "thread.run", @@ -7997,7 +7997,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "run_abc123", "object": "thread.run", @@ -8138,7 +8138,7 @@ paths: } main(); - response: | + x-example-response: | { "object": "list", "data": [ @@ -8264,7 +8264,7 @@ paths: } main(); - response: &run_step_object_example | + x-example-response: &run_step_object_example | { "id": "step_abc123", "object": "thread.run.step", @@ -8378,7 +8378,7 @@ paths: } main(); - response: | + x-example-response: | { "object": "list", "data": [ @@ -8488,7 +8488,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "vs_abc123", "object": "vector_store", @@ -8576,7 +8576,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "vs_abc123", "object": "vector_store", @@ -8666,7 +8666,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "vs_abc123", "object": "vector_store", @@ -8754,7 +8754,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "vs_abc123", "object": "vector_store.deleted", @@ -8863,7 +8863,7 @@ paths: } main(); - response: | + x-example-response: | { "object": "list", "data": [ @@ -8970,7 +8970,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "file-abc123", "object": "vector_store.file", @@ -9063,7 +9063,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "file-abc123", "object": "vector_store.file", @@ -9152,7 +9152,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "file-abc123", "object": "vector_store.file.deleted", @@ -9246,7 +9246,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "vsfb_abc123", "object": "vector_store.file_batch", @@ -9344,7 +9344,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "vsfb_abc123", "object": "vector_store.file_batch", @@ -9441,7 +9441,7 @@ paths: } main(); - response: | + x-example-response: | { "id": "vsfb_abc123", "object": "vector_store.file_batch", @@ -9567,7 +9567,7 @@ paths: } main(); - response: | + x-example-response: | { "object": "list", "data": [ @@ -20742,7 +20742,7 @@ paths: operands: - value: cache_read_tokens - value: rates.cache_read_input_token - response: + x-example-response: operation: multiply operands: - value: output_tokens @@ -20773,7 +20773,7 @@ paths: operands: - value: input_tokens - value: rates.request_token - response: + x-example-response: operation: multiply operands: - value: output_tokens @@ -21650,7 +21650,6 @@ components: Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document. default: "<|endoftext|>" - nullable: true oneOf: - type: string default: "" @@ -21673,6 +21672,7 @@ components: items: type: integer example: "[[1212, 318, 257, 1332, 13]]" + - enum: [null] best_of: type: integer default: 1 @@ -21768,7 +21768,6 @@ components: description: &completions_stop_description > Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. default: null - nullable: true oneOf: - type: string default: <|endoftext|> @@ -21780,6 +21779,7 @@ components: items: type: string example: '["\n"]' + - enum: [null] stream: description: > Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-UShttps://platform.openai.com/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) @@ -23212,10 +23212,10 @@ components: - type: string - type: string enum: ["dall-e-2", "dall-e-3"] + - enum: [null] x-oaiTypeLabel: string default: "dall-e-2" example: "dall-e-3" - nullable: true description: The model to use for image generation. n: &images_n type: integer @@ -23709,10 +23709,10 @@ components: - type: string - type: string enum: ["dall-e-2"] + - enum: [null] x-oaiTypeLabel: string default: "dall-e-2" example: "dall-e-2" - nullable: true description: The model to use for image generation. Only `dall-e-2` is supported at this time. n: type: integer @@ -23747,10 +23747,10 @@ components: - type: string - type: string enum: ["dall-e-2"] + - enum: [null] x-oaiTypeLabel: string default: "dall-e-2" example: "dall-e-2" - nullable: true description: The model to use for image generation. Only `dall-e-2` is supported at this time. n: *images_n response_format: *images_response_format @@ -23780,7 +23780,6 @@ components: Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`. The default is `text-moderation-latest` which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use `text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy of `text-moderation-stable` may be slightly lower than for `text-moderation-latest`. - nullable: false default: "text-moderation-latest" example: "text-moderation-stable" anyOf: @@ -28369,8 +28368,8 @@ components: "gpt-3.5-turbo-0125", "gpt-3.5-turbo-16k-0613", ] + - enum: [null] x-oaiTypeLabel: string - nullable: true instructions: description: Overrides the [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. type: string @@ -28704,8 +28703,8 @@ components: "gpt-3.5-turbo-0125", "gpt-3.5-turbo-16k-0613", ] + - enum: [null] x-oaiTypeLabel: string - nullable: true instructions: description: Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. type: string @@ -30507,20 +30506,21 @@ components: - `web_search_preview` - `web_search_preview_2025_03_11` user_location: - allOf: - - $ref: "#/components/schemas/WebSearchLocation" - - type: object - properties: - type: - type: string - description: | - The type of location approximation. Always `approximate`. - enum: - - approximate - x-stainless-const: true - required: - - type - nullable: true + anyOf: + - allOf: + - $ref: "#/components/schemas/WebSearchLocation" + - type: object + properties: + type: + type: string + description: | + The type of location approximation. Always `approximate`. + enum: + - approximate + x-stainless-const: true + required: + - type + - enum: [null] search_context_size: $ref: "#/components/schemas/WebSearchContextSize" required: @@ -35946,6 +35946,8 @@ components: description: Inference endpoint metadata: description: metadata related for the batch job + type: object + additionalProperties: true nullable: true description: Gateway supported body params for OpenAI, Azure OpenAI and VertexAI. title: OpenAI Params From 12f6203e83d29cae573e8f4fe0ed521da2e1437f Mon Sep 17 00:00:00 2001 From: Krishna Chandra Date: Wed, 22 Apr 2026 15:47:59 +0530 Subject: [PATCH 5/8] fix: revert format errors --- openapi.yaml | 1324 +++++++++++++++++++++++++------------------------- 1 file changed, 659 insertions(+), 665 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index aefd54e3..d5c341df 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -139,6 +139,7 @@ tags: - name: Secret-References description: Create, List, Retrieve, Update, and Delete secret references to external secret managers. + paths: # Note: When adding an endpoint, make sure you also add it in the `groups` section, in the end of this file, # under the appropriate group @@ -605,7 +606,7 @@ paths: required: - name responses: - "200": + '200': description: Collection created successfully content: application/json: @@ -619,17 +620,17 @@ paths: slug: type: string description: Slug of the created collection - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Workspace or parent collection not found - "500": + '500': description: Server error - + get: summary: List collections description: Lists all collections in the specified workspace @@ -665,7 +666,7 @@ paths: type: string description: Search query to filter collections by name responses: - "200": + '200': description: List of collections content: application/json: @@ -678,18 +679,18 @@ paths: data: type: array items: - $ref: "#/components/schemas/CollectionWithDetails" - "400": + $ref: '#/components/schemas/CollectionWithDetails' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Workspace not found - "500": + '500': description: Server error - + /collections/{collectionId}: servers: *ControlPlaneServers parameters: @@ -699,7 +700,7 @@ paths: schema: type: string description: ID or slug of the collection - + get: summary: Get collection details description: Retrieves details of a specific collection @@ -708,21 +709,21 @@ paths: security: - Portkey-Key: [] responses: - "200": + '200': description: Collection details content: application/json: schema: - $ref: "#/components/schemas/CollectionWithChildCollections" - "401": + $ref: '#/components/schemas/CollectionWithChildCollections' + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Collection not found - "500": + '500': description: Server error - + put: summary: Update collection description: Updates a collection's details @@ -743,7 +744,7 @@ paths: required: - name responses: - "200": + '200': description: OK headers: Content-Type: @@ -755,17 +756,17 @@ paths: schema: type: object example: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Collection not found - "500": + '500': description: Server error - + delete: summary: Delete collection description: Deletes a collection @@ -774,7 +775,7 @@ paths: tags: - Collections responses: - "200": + '200': description: OK headers: Content-Type: @@ -786,13 +787,13 @@ paths: schema: type: object example: {} - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Collection not found or trying to delete default collection - "500": + '500': description: Server error /labels: @@ -810,25 +811,25 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateLabelRequest" + $ref: '#/components/schemas/CreateLabelRequest' responses: - "200": + '200': description: Label created successfully content: application/json: schema: - $ref: "#/components/schemas/CreateLabelResponse" - "400": + $ref: '#/components/schemas/CreateLabelResponse' + '400': description: Invalid request content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "401": + $ref: '#/components/schemas/ErrorResponse' + '401': description: Unauthorized - "403": + '403': description: Forbidden - "500": + '500': description: Server error get: @@ -869,23 +870,23 @@ paths: minimum: 1 description: Number of items per page responses: - "200": + '200': description: List of labels content: application/json: schema: - $ref: "#/components/schemas/ListLabelsResponse" - "400": + $ref: '#/components/schemas/ListLabelsResponse' + '400': description: Invalid request content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "401": + $ref: '#/components/schemas/ErrorResponse' + '401': description: Unauthorized - "403": + '403': description: Forbidden - "500": + '500': description: Server error /labels/{labelId}: @@ -918,25 +919,25 @@ paths: type: string description: ID or slug of the workspace responses: - "200": + '200': description: Label details content: application/json: schema: - $ref: "#/components/schemas/Label" - "400": + $ref: '#/components/schemas/Label' + '400': description: Invalid request content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "401": + $ref: '#/components/schemas/ErrorResponse' + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Label not found - "500": + '500': description: Server error put: @@ -960,9 +961,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/UpdateLabelRequest" + $ref: '#/components/schemas/UpdateLabelRequest' responses: - "200": + '200': description: OK headers: Content-Type: @@ -974,19 +975,19 @@ paths: schema: type: object example: {} - "400": + '400': description: Invalid request content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "401": + $ref: '#/components/schemas/ErrorResponse' + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Label not found - "500": + '500': description: Server error delete: @@ -1006,7 +1007,7 @@ paths: format: uuid description: ID of the label to delete responses: - "200": + '200': description: OK headers: Content-Type: @@ -1018,19 +1019,19 @@ paths: schema: type: object example: {} - "400": + '400': description: Invalid request content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "401": + $ref: '#/components/schemas/ErrorResponse' + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Label not found - "500": + '500': description: Server err /prompts: @@ -1092,7 +1093,7 @@ paths: type: object description: Metadata for the prompt responses: - "200": + '200': description: Prompt created successfully content: application/json: @@ -1109,16 +1110,16 @@ paths: format: uuid object: type: string - enum: ["prompt"] - "400": + enum: ['prompt'] + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "500": + '500': description: Server error - + get: summary: List prompts operationId: listPrompts @@ -1148,7 +1149,7 @@ paths: schema: type: string responses: - "200": + '200': description: List of prompts content: application/json: @@ -1158,18 +1159,18 @@ paths: data: type: array items: - $ref: "#/components/schemas/PromptSummary" + $ref: '#/components/schemas/PromptSummary' total: type: integer - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "500": + '500': description: Server error - + /prompts/{promptId}: servers: *ControlPlaneServers get: @@ -1186,23 +1187,23 @@ paths: schema: type: string responses: - "200": + '200': description: Prompt details content: application/json: schema: - $ref: "#/components/schemas/Prompt" - "400": + $ref: '#/components/schemas/Prompt' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt not found - "500": + '500': description: Server error - + put: summary: Update a prompt description: | @@ -1273,7 +1274,7 @@ paths: type: object description: Additional metadata for the prompt version. When `patch` is `true`, this field is optional and will be inherited from the current latest version if omitted. responses: - "200": + '200': description: Prompt updated successfully content: application/json: @@ -1288,17 +1289,17 @@ paths: prompt_version_id: type: string format: uuid - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt not found - "500": + '500': description: Server error - + delete: summary: Delete a prompt operationId: deletePrompt @@ -1313,24 +1314,24 @@ paths: schema: type: string responses: - "200": + '200': description: Prompt deleted successfully content: application/json: schema: type: object properties: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt not found - "500": + '500': description: Server error - + /prompts/{promptId}/versions: servers: *ControlPlaneServers get: @@ -1347,25 +1348,25 @@ paths: schema: type: string responses: - "200": + '200': description: List of prompt versions content: application/json: schema: type: array items: - $ref: "#/components/schemas/PromptVersionSummary" - "400": + $ref: '#/components/schemas/PromptVersionSummary' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt not found - "500": + '500': description: Server error - + /prompts/{promptId}/versions/{versionId}: servers: *ControlPlaneServers get: @@ -1388,23 +1389,23 @@ paths: type: string format: uuid responses: - "200": + '200': description: Prompt version details content: application/json: schema: - $ref: "#/components/schemas/Prompt" - "400": + $ref: '#/components/schemas/Prompt' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt version not found - "500": + '500': description: Server error - + put: summary: Update a specific version of a prompt description: | @@ -1440,24 +1441,24 @@ paths: format: uuid description: The label to assign to this version. responses: - "200": + '200': description: Prompt version updated successfully content: application/json: schema: type: object properties: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt version not found - "500": + '500': description: Server error - + /prompts/{promptId}/makeDefault: servers: *ControlPlaneServers put: @@ -1486,24 +1487,24 @@ paths: type: number description: Version Number to set as default responses: - "200": + '200': description: Default version set successfully content: application/json: schema: type: object properties: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt or version not found - "500": + '500': description: Server error - + /prompts/partials: servers: *ControlPlaneServers post: @@ -1534,7 +1535,7 @@ paths: version_description: type: string responses: - "200": + '200': description: Prompt partial created successfully content: application/json: @@ -1549,15 +1550,15 @@ paths: version_id: type: string format: uuid - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "500": + '500': description: Server error - + get: summary: List prompt partials operationId: listPromptPartials @@ -1571,25 +1572,25 @@ paths: schema: type: string responses: - "200": + '200': description: List of prompt partials content: application/json: schema: type: array items: - $ref: "#/components/schemas/PromptPartialSummary" - "400": + $ref: '#/components/schemas/PromptPartialSummary' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Not found - "500": + '500': description: Server error - + /prompts/partials/{promptPartialId}: servers: *ControlPlaneServers get: @@ -1606,23 +1607,23 @@ paths: schema: type: string responses: - "200": + '200': description: Prompt partial details content: application/json: schema: - $ref: "#/components/schemas/PromptPartial" - "400": + $ref: '#/components/schemas/PromptPartial' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt partial not found - "500": + '500': description: Server error - + put: summary: Update a prompt partial operationId: updatePromptPartial @@ -1652,7 +1653,7 @@ paths: status: type: string responses: - "200": + '200': description: Prompt partial updated successfully content: application/json: @@ -1662,17 +1663,17 @@ paths: prompt_partial_version_id: type: string format: uuid - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt partial not found - "500": + '500': description: Server error - + delete: summary: Delete a prompt partial operationId: deletePromptPartial @@ -1687,24 +1688,24 @@ paths: schema: type: string responses: - "200": + '200': description: Prompt partial deleted successfully content: application/json: schema: type: object properties: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt partial not found - "500": + '500': description: Server error - + /prompts/partials/{promptPartialId}/versions: servers: *ControlPlaneServers get: @@ -1721,25 +1722,25 @@ paths: schema: type: string responses: - "200": + '200': description: List of prompt partial versions content: application/json: schema: type: array items: - $ref: "#/components/schemas/PromptPartialVersion" - "400": + $ref: '#/components/schemas/PromptPartialVersion' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt partial not found - "500": + '500': description: Server error - + /prompts/partials/{promptPartialId}/makeDefault: servers: *ControlPlaneServers put: @@ -1768,22 +1769,22 @@ paths: type: number description: Version Number to set as default responses: - "200": + '200': description: Default version set successfully content: application/json: schema: type: object properties: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Prompt partial or version not found - "500": + '500': description: Server error /prompts/{promptId}/completions: @@ -1959,7 +1960,7 @@ paths: console.log(completion); /prompts/{promptId}/render: - servers: *DataPlaneServers + servers: *DataPlaneServers post: operationId: createPromptRender tags: @@ -2126,7 +2127,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateGuardrailRequest" + $ref: '#/components/schemas/CreateGuardrailRequest' examples: # BASIC CATEGORY EXAMPLES jwt_authentication: @@ -2155,13 +2156,7 @@ paths: checks: - id: "default.modelWhitelist" parameters: - models: - [ - "gpt-4", - "gpt-3.5-turbo", - "claude-3-sonnet", - "claude-3-haiku", - ] + models: ["gpt-4", "gpt-3.5-turbo", "claude-3-sonnet", "claude-3-haiku"] actions: onFail: "block" message: "Model not in approved whitelist" @@ -2328,14 +2323,13 @@ paths: checks: - id: "portkey.moderateContent" parameters: - categories: - [ - "hate/threatening", - "harassment/threatening", - "self-harm/intent", - "sexual/minors", - "violence/graphic", - ] + categories: [ + "hate/threatening", + "harassment/threatening", + "self-harm/intent", + "sexual/minors", + "violence/graphic" + ] timeout: 5000 actions: onFail: "block" @@ -2365,14 +2359,13 @@ paths: - id: "portkey.pii" parameters: redact: true - categories: - [ - "EMAIL_ADDRESS", - "PHONE_NUMBER", - "SSN", - "CREDIT_CARD", - "NAME", - ] + categories: [ + "EMAIL_ADDRESS", + "PHONE_NUMBER", + "SSN", + "CREDIT_CARD", + "NAME" + ] timeout: 5000 actions: onFail: "block" @@ -2430,14 +2423,13 @@ paths: checks: - id: "pillar.scanPrompt" parameters: - scanners: - [ - "prompt_injection", - "pii", - "secrets", - "toxic_language", - "invisible_characters", - ] + scanners: [ + "prompt_injection", + "pii", + "secrets", + "toxic_language", + "invisible_characters" + ] timeout: 5000 - id: "pillar.scanResponse" parameters: @@ -2506,14 +2498,13 @@ paths: checks: - id: "mistral.moderateContent" parameters: - categories: - [ - "sexual", - "hate_and_discrimination", - "violence_and_threats", - "selfharm", - "pii", - ] + categories: [ + "sexual", + "hate_and_discrimination", + "violence_and_threats", + "selfharm", + "pii" + ] timeout: 5000 actions: onFail: "block" @@ -2579,8 +2570,7 @@ paths: pii_categories: ["email_address", "ssn", "credit_card"] secrets: true secrets_redact: true - secrets_categories: - ["aws_secret_key", "openai", "github"] + secrets_categories: ["aws_secret_key", "openai", "github"] timeout: 5000 actions: onFail: "block" @@ -2615,30 +2605,30 @@ paths: message: "Prisma AIRS blocked request" responses: - "200": + '200': description: Guardrail created successfully content: application/json: schema: - $ref: "#/components/schemas/CreateGuardrailResponse" - "400": + $ref: '#/components/schemas/CreateGuardrailResponse' + '400': description: Bad request - validation failed content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "403": + $ref: '#/components/schemas/ErrorResponse' + '403': description: Forbidden - insufficient permissions or guardrail not allowed content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "500": + $ref: '#/components/schemas/ErrorResponse' + '500': description: Internal server error content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" + $ref: '#/components/schemas/ErrorResponse' get: summary: List guardrails @@ -2675,24 +2665,24 @@ paths: minimum: 0 default: 0 responses: - "200": + '200': description: List of guardrails retrieved successfully content: application/json: schema: - $ref: "#/components/schemas/ListGuardrailsResponse" - "400": + $ref: '#/components/schemas/ListGuardrailsResponse' + '400': description: Bad request - invalid parameters content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "403": + $ref: '#/components/schemas/ErrorResponse' + '403': description: Forbidden - insufficient permissions content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" + $ref: '#/components/schemas/ErrorResponse' /guardrails/{guardrailId}: get: @@ -2716,24 +2706,24 @@ paths: summary: Using slug value: "guard_abc123" responses: - "200": + '200': description: Guardrail details retrieved successfully content: application/json: schema: - $ref: "#/components/schemas/GuardrailDetails" - "403": + $ref: '#/components/schemas/GuardrailDetails' + '403': description: Forbidden - guardrail not found or insufficient permissions content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "500": + $ref: '#/components/schemas/ErrorResponse' + '500': description: Internal server error content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" + $ref: '#/components/schemas/ErrorResponse' put: summary: Update a guardrail @@ -2753,26 +2743,26 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/UpdateGuardrailRequest" + $ref: '#/components/schemas/UpdateGuardrailRequest' responses: - "200": + '200': description: Guardrail updated successfully content: application/json: schema: - $ref: "#/components/schemas/UpdateGuardrailResponse" - "400": + $ref: '#/components/schemas/UpdateGuardrailResponse' + '400': description: Bad request - validation failed content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "403": + $ref: '#/components/schemas/ErrorResponse' + '403': description: Forbidden - guardrail not found or insufficient permissions content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" + $ref: '#/components/schemas/ErrorResponse' delete: summary: Delete a guardrail @@ -2788,20 +2778,20 @@ paths: schema: type: string responses: - "200": + '200': description: Guardrail deleted successfully - "403": + '403': description: Forbidden - guardrail not found or insufficient permissions content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - "500": + $ref: '#/components/schemas/ErrorResponse' + '500': description: Internal server error content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" + $ref: '#/components/schemas/ErrorResponse' /images/generations: servers: *DataPlaneServers @@ -5062,12 +5052,12 @@ paths: enum: [asc, desc] default: asc responses: - "200": + '200': description: OK content: application/json: schema: - $ref: "#/components/schemas/ListModelsResponse" + $ref: '#/components/schemas/ListModelsResponse' example: object: "list" total: 500 @@ -5154,7 +5144,8 @@ paths: }); console.log(list); } - main(); + main(); + /models/{model}: get: @@ -9868,6 +9859,7 @@ paths: type: string format: binary + security: - Portkey-Key: [] Virtual-Key: [] @@ -10491,7 +10483,8 @@ paths: type: object examples: example-1: - value: {} + value: + {} x-code-samples: - lang: python label: Default @@ -10929,27 +10922,26 @@ paths: { "object": "list", "total": 1, - "data": - [ - { - "id": "daab995b-8d3b-42c5-a490-47217fbf4e0e", - "name": "PII Redaction Guardrail", - "workspace_id": "8610029e-692a-4df6-9052-3fa3eff69911", - "slug": "pc-pii-re-7f1051", - "organisation_id": "472d2804-d054-4226-b4ae-9d4e2e61e69e", - "is_default": 0, - "status": "active", - "owner_id": "c4c7996d-be62-429d-b787-5d48fe94da86", - "updated_by": "c4c7996d-be62-429d-b787-5d48fe94da86", - "created_at": "2025-10-17T19:11:47.000Z", - "last_updated_at": "2025-10-17T19:11:47.000Z", - "config": '{"input_guardrails":["pg-patron-1d0224"]}', - "format": "json", - "type": "ORG_CONFIG", - "version_id": "8c1a4fbf-26d9-49df-82ca-ab772ba397d2", - "object": "config", - }, - ], + "data": [ + { + "id": "daab995b-8d3b-42c5-a490-47217fbf4e0e", + "name": "PII Redaction Guardrail", + "workspace_id": "8610029e-692a-4df6-9052-3fa3eff69911", + "slug": "pc-pii-re-7f1051", + "organisation_id": "472d2804-d054-4226-b4ae-9d4e2e61e69e", + "is_default": 0, + "status": "active", + "owner_id": "c4c7996d-be62-429d-b787-5d48fe94da86", + "updated_by": "c4c7996d-be62-429d-b787-5d48fe94da86", + "created_at": "2025-10-17T19:11:47.000Z", + "last_updated_at": "2025-10-17T19:11:47.000Z", + "config": "{\"input_guardrails\":[\"pg-patron-1d0224\"]}", + "format": "json", + "type": "ORG_CONFIG", + "version_id": "8c1a4fbf-26d9-49df-82ca-ab772ba397d2", + "object": "config" + } + ] } x-code-samples: - lang: curl @@ -11197,7 +11189,7 @@ paths: enum: [workspace, organisation, all] default: all description: For type=workspace, the API will only return Workpace-Scoped integrations. For type=organisation, the API will only return Global (organisation level) integrations. For type=all, both types of integrations will be returned. - + responses: "200": description: Successful response @@ -11289,7 +11281,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateIntegrationRequest" + $ref: '#/components/schemas/CreateIntegrationRequest' responses: "200": description: Successful response @@ -11501,7 +11493,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/UpdateIntegrationRequest" + $ref: '#/components/schemas/UpdateIntegrationRequest' responses: "200": description: Successful response @@ -11699,12 +11691,12 @@ paths: schema: type: string responses: - "200": + '200': description: List of integration models content: application/json: schema: - $ref: "#/components/schemas/IntegrationModelsResponse" + $ref: '#/components/schemas/IntegrationModelsResponse' put: summary: Bulk update integration models @@ -11724,14 +11716,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/BulkUpdateModelsRequest" + $ref: '#/components/schemas/BulkUpdateModelsRequest' responses: - "200": + '200': description: Models updated successfully content: application/json: schema: - type: object + type: object delete: summary: Bulk delete integration custom models @@ -11752,12 +11744,12 @@ paths: type: string example: "gpt-4,gpt-3.5-turbo" responses: - "200": + '200': description: Models deleted successfully content: application/json: schema: - type: object + type: object /integrations/{slug}/workspaces: get: @@ -11772,12 +11764,12 @@ paths: schema: type: string responses: - "200": + '200': description: List of workspace access configurations content: application/json: schema: - $ref: "#/components/schemas/IntegrationWorkspacesResponse" + $ref: '#/components/schemas/IntegrationWorkspacesResponse' put: summary: Bulk update workspace access @@ -11797,9 +11789,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/BulkUpdateWorkspacesRequest" + $ref: '#/components/schemas/BulkUpdateWorkspacesRequest' responses: - "200": + '200': description: Workspace access updated successfully content: application/json: @@ -11828,7 +11820,7 @@ paths: schema: type: string description: Not required when using workspace API keys. Required when using organisation admin keys - + responses: "200": description: Successful response @@ -12070,7 +12062,7 @@ paths: "integrationId": "", "workspaceId": "" }' - + /providers/{slug}: servers: *ControlPlaneServers get: @@ -12210,7 +12202,7 @@ paths: nullable: true reset_usage: type: boolean - + responses: "200": description: Successful response @@ -12414,7 +12406,7 @@ paths: workspace_id: "" }) console.log(result); - + /virtual-keys: servers: *ControlPlaneServers get: @@ -12434,7 +12426,7 @@ paths: type: integer required: true description: Page size, default to 50 - + responses: "200": description: Successful response @@ -12627,7 +12619,7 @@ paths: secret_mappings: type: array items: - $ref: "#/components/schemas/SecretMapping" + $ref: '#/components/schemas/SecretMapping' description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "model_config." (e.g. "model_config.awsSecretAccessKey"). Each target_field must be unique. When "key" is mapped, the key field becomes optional. examples: generic: @@ -12966,7 +12958,7 @@ paths: secret_mappings: type: array items: - $ref: "#/components/schemas/SecretMapping" + $ref: '#/components/schemas/SecretMapping' description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "model_config." (e.g. "model_config.awsSecretAccessKey"). Each target_field must be unique. responses: "200": @@ -15259,11 +15251,11 @@ paths: type: string input_guardrails: type: array - items: + items: type: string output_guardrails: type: array - items: + items: type: string usage_limits: type: array @@ -15273,7 +15265,7 @@ paths: type: array items: $ref: "#/components/schemas/RateLimits" - + example: name: My Workspace description: My Description @@ -17227,7 +17219,7 @@ paths: } main() - + /audit-logs: servers: *ControlPlaneServers get: @@ -18484,7 +18476,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateUsageLimitsPolicyRequest" + $ref: '#/components/schemas/CreateUsageLimitsPolicyRequest' examples: monthlyCostLimit: summary: Monthly Cost Limit per API Key @@ -18512,21 +18504,21 @@ paths: credit_limit: 1000000 periodic_reset: weekly responses: - "200": + '200': description: Policy created successfully content: application/json: schema: - $ref: "#/components/schemas/CreatePolicyResponse" - "400": + $ref: '#/components/schemas/CreatePolicyResponse' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy not found - "500": + '500': description: Server error get: @@ -18538,7 +18530,7 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/WorkspaceIdQuery" + - $ref: '#/components/parameters/WorkspaceIdQuery' - name: status in: query description: Filter by status @@ -18554,24 +18546,24 @@ paths: schema: type: string enum: [cost, tokens] - - $ref: "#/components/parameters/PageSize" - - $ref: "#/components/parameters/CurrentPage" + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/CurrentPage' responses: - "200": + '200': description: List of usage limits policies content: application/json: schema: - $ref: "#/components/schemas/UsageLimitsPolicyListResponse" - "400": + $ref: '#/components/schemas/UsageLimitsPolicyListResponse' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy not found - "500": + '500': description: Server error /policies/usage-limits/{policyUsageLimitsId}: @@ -18584,7 +18576,7 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/PolicyUsageLimitsId" + - $ref: '#/components/parameters/PolicyUsageLimitsId' - name: status in: query description: Filter by status @@ -18601,21 +18593,21 @@ paths: type: boolean default: false responses: - "200": + '200': description: Usage limits policy details content: application/json: schema: - $ref: "#/components/schemas/UsageLimitsPolicyResponse" - "400": + $ref: '#/components/schemas/UsageLimitsPolicyResponse' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy not found - "500": + '500': description: Server error put: @@ -18627,19 +18619,19 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/PolicyUsageLimitsId" + - $ref: '#/components/parameters/PolicyUsageLimitsId' requestBody: required: true content: application/json: schema: - $ref: "#/components/schemas/UpdateUsageLimitsPolicyRequest" + $ref: '#/components/schemas/UpdateUsageLimitsPolicyRequest' example: credit_limit: 2000.0 alert_threshold: 1500.0 reset_usage_for_value: api-key-123 responses: - "200": + '200': description: OK headers: Content-Type: @@ -18651,15 +18643,15 @@ paths: schema: type: object example: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy not found - "500": + '500': description: Server error delete: @@ -18671,9 +18663,9 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/PolicyUsageLimitsId" + - $ref: '#/components/parameters/PolicyUsageLimitsId' responses: - "200": + '200': description: OK headers: Content-Type: @@ -18685,15 +18677,15 @@ paths: schema: type: object example: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy not found - "500": + '500': description: Server error /policies/usage-limits/{policyUsageLimitsId}/entities: @@ -18706,7 +18698,7 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/PolicyUsageLimitsId" + - $ref: '#/components/parameters/PolicyUsageLimitsId' - name: status in: query description: Filter by entity usage status @@ -18728,23 +18720,23 @@ paths: type: integer minimum: 1 maximum: 100 - - $ref: "#/components/parameters/CurrentPage" + - $ref: '#/components/parameters/CurrentPage' responses: - "200": + '200': description: List of entities for the policy content: application/json: schema: - $ref: "#/components/schemas/UsageLimitsPolicyEntityListResponse" - "400": + $ref: '#/components/schemas/UsageLimitsPolicyEntityListResponse' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy not found - "500": + '500': description: Server error /policies/usage-limits/{policyUsageLimitsId}/entities/{entityId}/reset: @@ -18757,25 +18749,25 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/PolicyUsageLimitsId" - - $ref: "#/components/parameters/UsageLimitsPolicyEntityId" + - $ref: '#/components/parameters/PolicyUsageLimitsId' + - $ref: '#/components/parameters/UsageLimitsPolicyEntityId' responses: - "200": + '200': description: Entity usage reset successfully content: application/json: schema: type: object example: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy or entity not found - "500": + '500': description: Server error /policies/rate-limits: @@ -18792,7 +18784,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateRateLimitsPolicyRequest" + $ref: '#/components/schemas/CreateRateLimitsPolicyRequest' examples: requestsPerMinute: summary: 100 Requests per Minute per API Key @@ -18819,19 +18811,19 @@ paths: unit: rph value: 10000 responses: - "200": + '200': description: Policy created successfully content: application/json: schema: - $ref: "#/components/schemas/CreatePolicyResponse" - "400": + $ref: '#/components/schemas/CreatePolicyResponse' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "500": + '500': description: Server error get: @@ -18843,7 +18835,7 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/WorkspaceIdQuery" + - $ref: '#/components/parameters/WorkspaceIdQuery' - name: status in: query description: Filter by status @@ -18866,24 +18858,24 @@ paths: schema: type: string enum: [rpm, rph, rpd] - - $ref: "#/components/parameters/PageSize" - - $ref: "#/components/parameters/CurrentPage" + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/CurrentPage' responses: - "200": + '200': description: List of rate limits policies content: application/json: schema: - $ref: "#/components/schemas/RateLimitsPolicyListResponse" - "400": + $ref: '#/components/schemas/RateLimitsPolicyListResponse' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy not found - "500": + '500': description: Server error /policies/rate-limits/{rateLimitsPolicyId}: @@ -18896,7 +18888,7 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/RateLimitsPolicyId" + - $ref: '#/components/parameters/RateLimitsPolicyId' - name: status in: query description: Filter by status @@ -18906,21 +18898,21 @@ paths: enum: [active, archived] default: active responses: - "200": + '200': description: Rate limits policy details content: application/json: schema: - $ref: "#/components/schemas/RateLimitsPolicyResponse" - "400": + $ref: '#/components/schemas/RateLimitsPolicyResponse' + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy not found - "500": + '500': description: Server error put: @@ -18932,18 +18924,18 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/RateLimitsPolicyId" + - $ref: '#/components/parameters/RateLimitsPolicyId' requestBody: required: true content: application/json: schema: - $ref: "#/components/schemas/UpdateRateLimitsPolicyRequest" + $ref: '#/components/schemas/UpdateRateLimitsPolicyRequest' example: value: 200 unit: rph responses: - "200": + '200': description: OK headers: Content-Type: @@ -18955,15 +18947,15 @@ paths: schema: type: object example: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy not found - "500": + '500': description: Server error delete: @@ -18975,9 +18967,9 @@ paths: security: - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/RateLimitsPolicyId" + - $ref: '#/components/parameters/RateLimitsPolicyId' responses: - "200": + '200': description: OK headers: Content-Type: @@ -18989,15 +18981,15 @@ paths: schema: type: object example: {} - "400": + '400': description: Bad request - "401": + '401': description: Unauthorized - "403": + '403': description: Forbidden - "404": + '404': description: Policy not found - "500": + '500': description: Server error /analytics/graphs/requests: @@ -20667,17 +20659,17 @@ paths: security: [] description: | Returns pricing configuration for a specific model. - + **Note:** Prices are in USD cents per token. - + ## Supported Providers - + openai, anthropic, google, azure-openai, bedrock, mistral-ai, cohere, together-ai, groq, deepseek, fireworks-ai, perplexity-ai, anyscale, deepinfra, cerebras, x-ai, and 25+ more. - + ## Example Response Fields - + | Field | Description | Unit | |-------|-------------|------| | `request_token.price` | Input token cost | cents/token | @@ -20685,7 +20677,7 @@ paths: | `cache_write_input_token.price` | Cache write cost | cents/token | | `cache_read_input_token.price` | Cache read cost | cents/token | | `additional_units.*` | Provider-specific features | cents/unit | - + operationId: getModelPricing tags: - Model Pricing @@ -20695,7 +20687,7 @@ paths: required: true description: | Provider identifier. Use lowercase with hyphens. - + Examples: `openai`, `anthropic`, `google`, `azure-openai`, `bedrock`, `x-ai` schema: type: string @@ -20705,18 +20697,18 @@ paths: required: true description: | Model identifier. Use the exact model name as specified by the provider. - + Examples: `gpt-5`, `gpt-5.2`, `claude-opus-4-5-20251101`, `gemini-3.0-pro` schema: type: string example: gpt-5 responses: - "200": + '200': description: Pricing configuration for the specified model content: application/json: schema: - $ref: "#/components/schemas/ModelPricingConfig" + $ref: '#/components/schemas/ModelPricingConfig' examples: openai-gpt4: summary: OpenAI GPT-4 @@ -20808,7 +20800,7 @@ paths: search: price: 3.5 currency: USD - "404": + '404': description: Model or provider not found content: application/json: @@ -21087,6 +21079,7 @@ paths: curl -X DELETE SELF_HOSTED_CONTROL_PLANE_URL/secret-references/SECRET_REFERENCE_ID \ -H "x-portkey-api-key: PORTKEY_API_KEY" + components: securitySchemes: Portkey-Key: @@ -21385,39 +21378,39 @@ components: description: Complete pricing configuration for a model properties: pay_as_you_go: - $ref: "#/components/schemas/ModelPayAsYouGo" + $ref: '#/components/schemas/ModelPayAsYouGo' calculate: - $ref: "#/components/schemas/ModelCalculateConfig" + $ref: '#/components/schemas/ModelCalculateConfig' currency: type: string enum: [USD] description: Currency code (always USD) finetune_config: - $ref: "#/components/schemas/ModelFinetuneConfig" + $ref: '#/components/schemas/ModelFinetuneConfig' ModelPayAsYouGo: type: object description: Token-based pricing (all prices in USD cents) properties: request_token: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' response_token: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' cache_write_input_token: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' cache_read_input_token: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' request_audio_token: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' response_audio_token: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' cache_read_audio_input_token: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' additional_units: type: object description: | Provider-specific additional pricing units. - + Common additional units: - `web_search`: Web search tool usage - `file_search`: File search tool usage @@ -21425,9 +21418,9 @@ components: - `image_token`: Image generation tokens - `video_duration_seconds_*`: Video generation (OpenAI Sora) additionalProperties: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' image: - $ref: "#/components/schemas/ModelImagePricing" + $ref: '#/components/schemas/ModelImagePricing' ModelTokenPrice: type: object @@ -21437,7 +21430,7 @@ components: type: number description: | Price in USD cents per token/unit. - + Example: `0.003` = 0.003 cents/token = $0.03 per 1K tokens ModelImagePricing: @@ -21446,7 +21439,7 @@ components: additionalProperties: type: object additionalProperties: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' example: standard: 1024x1024: @@ -21464,9 +21457,9 @@ components: description: Cost calculation formulas properties: request: - $ref: "#/components/schemas/ModelCalculateOperation" + $ref: '#/components/schemas/ModelCalculateOperation' response: - $ref: "#/components/schemas/ModelCalculateOperation" + $ref: '#/components/schemas/ModelCalculateOperation' ModelCalculateOperation: type: object @@ -21481,8 +21474,8 @@ components: description: Operands for the operation items: oneOf: - - $ref: "#/components/schemas/ModelCalculateOperation" - - $ref: "#/components/schemas/ModelValueReference" + - $ref: '#/components/schemas/ModelCalculateOperation' + - $ref: '#/components/schemas/ModelValueReference' ModelValueReference: type: object @@ -21491,7 +21484,7 @@ components: type: string description: | Reference to a value or rate. - + Examples: - `input_tokens`: Number of input tokens - `output_tokens`: Number of output tokens @@ -21503,9 +21496,9 @@ components: description: Fine-tuning pricing configuration properties: pay_per_token: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' pay_per_hour: - $ref: "#/components/schemas/ModelTokenPrice" + $ref: '#/components/schemas/ModelTokenPrice' Error: type: object @@ -21650,6 +21643,7 @@ components: Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document. default: "<|endoftext|>" + nullable: true oneOf: - type: string default: "" @@ -21672,7 +21666,6 @@ components: items: type: integer example: "[[1212, 318, 257, 1332, 13]]" - - enum: [null] best_of: type: integer default: 1 @@ -21768,6 +21761,7 @@ components: description: &completions_stop_description > Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. default: null + nullable: true oneOf: - type: string default: <|endoftext|> @@ -21779,7 +21773,6 @@ components: items: type: string example: '["\n"]' - - enum: [null] stream: description: > Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-UShttps://platform.openai.com/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) @@ -23212,10 +23205,10 @@ components: - type: string - type: string enum: ["dall-e-2", "dall-e-3"] - - enum: [null] x-oaiTypeLabel: string default: "dall-e-2" example: "dall-e-3" + nullable: true description: The model to use for image generation. n: &images_n type: integer @@ -23709,10 +23702,10 @@ components: - type: string - type: string enum: ["dall-e-2"] - - enum: [null] x-oaiTypeLabel: string default: "dall-e-2" example: "dall-e-2" + nullable: true description: The model to use for image generation. Only `dall-e-2` is supported at this time. n: type: integer @@ -23747,10 +23740,10 @@ components: - type: string - type: string enum: ["dall-e-2"] - - enum: [null] x-oaiTypeLabel: string default: "dall-e-2" example: "dall-e-2" + nullable: true description: The model to use for image generation. Only `dall-e-2` is supported at this time. n: *images_n response_format: *images_response_format @@ -23780,6 +23773,7 @@ components: Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`. The default is `text-moderation-latest` which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use `text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy of `text-moderation-stable` may be slightly lower than for `text-moderation-latest`. + nullable: false default: "text-moderation-latest" example: "text-moderation-stable" anyOf: @@ -28368,8 +28362,8 @@ components: "gpt-3.5-turbo-0125", "gpt-3.5-turbo-16k-0613", ] - - enum: [null] x-oaiTypeLabel: string + nullable: true instructions: description: Overrides the [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. type: string @@ -28703,8 +28697,8 @@ components: "gpt-3.5-turbo-0125", "gpt-3.5-turbo-16k-0613", ] - - enum: [null] x-oaiTypeLabel: string + nullable: true instructions: description: Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. type: string @@ -31848,7 +31842,7 @@ components: example: "Production OpenAI" slug: type: string - pattern: "^[a-zA-Z0-9_-]+$" + pattern: '^[a-zA-Z0-9_-]+$' description: URL-friendly identifier (auto-generated if not provided) example: "production-openai" ai_provider_id: @@ -31871,25 +31865,25 @@ components: type: object description: Provider-specific configuration object oneOf: - - $ref: "#/components/schemas/OpenAIConfiguration" + - $ref: '#/components/schemas/OpenAIConfiguration' title: OpenAI - - $ref: "#/components/schemas/AzureOpenAIConfiguration" + - $ref: '#/components/schemas/AzureOpenAIConfiguration' title: Azure OpenAI - - $ref: "#/components/schemas/BedrockConfiguration" + - $ref: '#/components/schemas/BedrockConfiguration' title: AWS Bedrock - - $ref: "#/components/schemas/VertexAIConfiguration" + - $ref: '#/components/schemas/VertexAIConfiguration' title: Vertex AI - - $ref: "#/components/schemas/AzureAIConfiguration" + - $ref: '#/components/schemas/AzureAIConfiguration' title: Azure AI - - $ref: "#/components/schemas/WorkersAIConfiguration" + - $ref: '#/components/schemas/WorkersAIConfiguration' title: Workers AI - - $ref: "#/components/schemas/SageMakerConfiguration" + - $ref: '#/components/schemas/SageMakerConfiguration' title: AWS Sagemaker - - $ref: "#/components/schemas/HuggingFaceConfiguration" + - $ref: '#/components/schemas/HuggingFaceConfiguration' title: Hugginface - - $ref: "#/components/schemas/CortexConfiguration" + - $ref: '#/components/schemas/CortexConfiguration' title: Cortex - - $ref: "#/components/schemas/CustomHostConfiguration" + - $ref: '#/components/schemas/CustomHostConfiguration' title: Custom Base URL create_default_provider: type: boolean @@ -31897,13 +31891,13 @@ components: description: Whether to automatically create a default provider when creating a workspace-scoped integration. Defaults to true. default_provider_slug: type: string - pattern: "^[a-zA-Z0-9_-]+$" + pattern: '^[a-zA-Z0-9_-]+$' maxLength: 255 description: Custom slug for the auto-created default provider. Only applicable for workspace-scoped integrations. If the slug already exists in the workspace, the request will fail with a validation error. secret_mappings: type: array items: - $ref: "#/components/schemas/SecretMapping" + $ref: '#/components/schemas/SecretMapping' description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "configurations." (e.g. "configurations.aws_secret_access_key", "configurations.azure_entra_client_secret"). Each target_field must be unique. When "key" is mapped, the key body field can be omitted. UpdateIntegrationRequest: @@ -31925,35 +31919,35 @@ components: type: object description: Provider-specific configuration object oneOf: - - $ref: "#/components/schemas/OpenAIConfiguration" + - $ref: '#/components/schemas/OpenAIConfiguration' title: OpenAI - - $ref: "#/components/schemas/AzureOpenAIConfiguration" + - $ref: '#/components/schemas/AzureOpenAIConfiguration' title: Azure OpenAI - - $ref: "#/components/schemas/BedrockConfiguration" + - $ref: '#/components/schemas/BedrockConfiguration' title: AWS Bedrock - - $ref: "#/components/schemas/VertexAIConfiguration" + - $ref: '#/components/schemas/VertexAIConfiguration' title: Vertex AI - - $ref: "#/components/schemas/AzureAIConfiguration" + - $ref: '#/components/schemas/AzureAIConfiguration' title: Azure AI - - $ref: "#/components/schemas/WorkersAIConfiguration" + - $ref: '#/components/schemas/WorkersAIConfiguration' title: Workers AI - - $ref: "#/components/schemas/SageMakerConfiguration" + - $ref: '#/components/schemas/SageMakerConfiguration' title: AWS Sagemaker - - $ref: "#/components/schemas/HuggingFaceConfiguration" + - $ref: '#/components/schemas/HuggingFaceConfiguration' title: Hugginface - - $ref: "#/components/schemas/CortexConfiguration" + - $ref: '#/components/schemas/CortexConfiguration' title: Cortex - - $ref: "#/components/schemas/CustomHostConfiguration" + - $ref: '#/components/schemas/CustomHostConfiguration' title: Custom Base URL secret_mappings: type: array items: - $ref: "#/components/schemas/SecretMapping" + $ref: '#/components/schemas/SecretMapping' description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "configurations." (e.g. "configurations.aws_secret_access_key", "configurations.azure_entra_client_secret"). Each target_field must be unique. IntegrationDetailResponse: allOf: - - $ref: "#/components/schemas/IntegrationList" + - $ref: '#/components/schemas/IntegrationList' - type: object properties: masked_key: @@ -31963,36 +31957,36 @@ components: type: object description: | Provider-specific configuration object - + **⚠️ Security Note - Response Masking:** When retrieving integration details, sensitive fields are automatically masked: - Sensitive fields get a `masked_` prefix (e.g., `client_secret` → `masked_client_secret`) - Non-sensitive fields (IDs, URLs, regions, etc.) remain unchanged oneOf: - - $ref: "#/components/schemas/OpenAIConfiguration" + - $ref: '#/components/schemas/OpenAIConfiguration' title: OpenAI - - $ref: "#/components/schemas/AzureOpenAIConfiguration" + - $ref: '#/components/schemas/AzureOpenAIConfiguration' title: Azure OpenAI - - $ref: "#/components/schemas/BedrockConfiguration" + - $ref: '#/components/schemas/BedrockConfiguration' title: AWS Bedrock - - $ref: "#/components/schemas/VertexAIConfiguration" + - $ref: '#/components/schemas/VertexAIConfiguration' title: Vertex AI - - $ref: "#/components/schemas/AzureAIConfiguration" + - $ref: '#/components/schemas/AzureAIConfiguration' title: Azure AI - - $ref: "#/components/schemas/WorkersAIConfiguration" + - $ref: '#/components/schemas/WorkersAIConfiguration' title: Workers AI - - $ref: "#/components/schemas/SageMakerConfiguration" + - $ref: '#/components/schemas/SageMakerConfiguration' title: AWS Sagemaker - - $ref: "#/components/schemas/HuggingFaceConfiguration" + - $ref: '#/components/schemas/HuggingFaceConfiguration' title: Hugginface - - $ref: "#/components/schemas/CortexConfiguration" + - $ref: '#/components/schemas/CortexConfiguration' title: Cortex - - $ref: "#/components/schemas/CustomHostConfiguration" + - $ref: '#/components/schemas/CustomHostConfiguration' title: Custom Base URL global_workspace_access_settings: type: object nullable: true - $ref: "#/components/schemas/GlobalWorkspaceAccess" + $ref: '#/components/schemas/GlobalWorkspaceAccess' description: Global workspace access configuration allow_all_models: type: boolean @@ -32003,9 +31997,9 @@ components: secret_mappings: type: array items: - $ref: "#/components/schemas/SecretMapping" + $ref: '#/components/schemas/SecretMapping' description: Secret reference mappings for this integration. Valid target_field values are "key" or "configurations.". - + GlobalWorkspaceAccess: type: object required: @@ -32019,13 +32013,13 @@ components: nullable: true maxItems: 1 items: - $ref: "#/components/schemas/UsageLimits" + $ref: '#/components/schemas/UsageLimits' rate_limits: type: array nullable: true maxItems: 1 items: - $ref: "#/components/schemas/RateLimits" + $ref: '#/components/schemas/RateLimits' OpenAIConfiguration: type: object @@ -32055,7 +32049,7 @@ components: type: array minItems: 1 items: - $ref: "#/components/schemas/AzureDeploymentConfig" + $ref: '#/components/schemas/AzureDeploymentConfig' # Entra-specific fields azure_entra_tenant_id: type: string @@ -32127,7 +32121,7 @@ components: SageMakerConfiguration: allOf: - - $ref: "#/components/schemas/BedrockConfiguration" + - $ref: '#/components/schemas/BedrockConfiguration' - type: object properties: amzn_sagemaker_custom_attributes: @@ -32292,7 +32286,7 @@ components: maxLength: 255 slug: type: string - pattern: "^[a-zA-Z0-9_-]+$" + pattern: '^[a-zA-Z0-9_-]+$' maxLength: 255 description: Auto-generated from name if omitted description: @@ -32633,7 +32627,7 @@ components: object: type: string enum: [integration] - + IntegrationModelsResponse: type: object properties: @@ -32643,7 +32637,7 @@ components: models: type: array items: - $ref: "#/components/schemas/IntegrationModel" + $ref: '#/components/schemas/IntegrationModel' IntegrationModel: type: object @@ -32670,7 +32664,7 @@ components: nullable: true description: Base model slug for fine-tuned models pricing_config: - $ref: "#/components/schemas/PricingConfig" + $ref: '#/components/schemas/PricingConfig' PricingConfig: type: object @@ -32680,21 +32674,21 @@ components: enum: [static] description: Pricing type pay_as_you_go: - $ref: "#/components/schemas/PayAsYouGoPricing" + $ref: '#/components/schemas/PayAsYouGoPricing' PayAsYouGoPricing: type: object properties: request_token: - $ref: "#/components/schemas/TokenPricing" + $ref: '#/components/schemas/TokenPricing' response_token: - $ref: "#/components/schemas/TokenPricing" + $ref: '#/components/schemas/TokenPricing' ModelConfigurations: - type: object - properties: - custom_host: - type: string - description: Custom Host URL for the model. + type: object + properties: + custom_host: + type: string + description: Custom Host URL for the model. TokenPricing: type: object @@ -32712,7 +32706,7 @@ components: models: type: array items: - $ref: "#/components/schemas/ModelUpdateRequest" + $ref: '#/components/schemas/ModelUpdateRequest' allow_all_models: type: boolean description: Whether to allow all models by default @@ -32744,7 +32738,7 @@ components: configurations: $ref: "#/components/schemas/ModelConfigurations" pricing_config: - $ref: "#/components/schemas/PricingConfig" + $ref: '#/components/schemas/PricingConfig' IntegrationWorkspacesResponse: type: object @@ -32755,7 +32749,7 @@ components: workspaces: type: array items: - $ref: "#/components/schemas/IntegrationWorkspace" + $ref: '#/components/schemas/IntegrationWorkspace' IntegrationWorkspace: type: object @@ -32771,12 +32765,12 @@ components: type: array nullable: true items: - $ref: "#/components/schemas/UsageLimits" + $ref: '#/components/schemas/UsageLimits' rate_limits: type: array nullable: true items: - $ref: "#/components/schemas/RateLimits" + $ref: '#/components/schemas/RateLimits' BulkUpdateWorkspacesRequest: type: object @@ -32784,9 +32778,9 @@ components: workspaces: type: array items: - $ref: "#/components/schemas/WorkspaceUpdateRequest" + $ref: '#/components/schemas/WorkspaceUpdateRequest' global_workspace_access: - $ref: "#/components/schemas/GlobalWorkspaceAccess" + $ref: '#/components/schemas/GlobalWorkspaceAccess' override_existing_workspace_access: type: boolean description: Whether to override existing workspace access settings @@ -32816,13 +32810,13 @@ components: nullable: true maxItems: 1 items: - $ref: "#/components/schemas/UsageLimits" + $ref: '#/components/schemas/UsageLimits' rate_limits: type: array nullable: true maxItems: 1 items: - $ref: "#/components/schemas/RateLimits" + $ref: '#/components/schemas/RateLimits' reset_usage: type: boolean description: Whether to reset current usage. If the current status is exhausted, this will change it back to active. @@ -32908,7 +32902,7 @@ components: secret_mappings: type: array items: - $ref: "#/components/schemas/SecretMapping" + $ref: '#/components/schemas/SecretMapping' description: Secret reference mappings for this virtual key. Valid target_field values are "key" or "model_config.". object: type: string @@ -33213,11 +33207,11 @@ components: example: 0 input_guardrails: type: array - items: + items: type: string output_guardrails: type: array - items: + items: type: string object: type: string @@ -33265,7 +33259,7 @@ components: last_updated_at: type: string format: date-time - + CollectionDetails: type: object properties: @@ -33281,15 +33275,15 @@ components: type: string format: date-time nullable: true - + CollectionWithDetails: allOf: - - $ref: "#/components/schemas/Collection" + - $ref: '#/components/schemas/Collection' - type: object properties: collection_details: - $ref: "#/components/schemas/CollectionDetails" - + $ref: '#/components/schemas/CollectionDetails' + ChildCollection: type: object properties: @@ -33302,17 +33296,17 @@ components: type: string format: date-time collection_details: - $ref: "#/components/schemas/CollectionDetails" - + $ref: '#/components/schemas/CollectionDetails' + CollectionWithChildCollections: allOf: - - $ref: "#/components/schemas/Collection" + - $ref: '#/components/schemas/Collection' - type: object properties: child_collections: type: array items: - $ref: "#/components/schemas/ChildCollection" + $ref: '#/components/schemas/ChildCollection' Label: type: object @@ -33407,7 +33401,7 @@ components: data: type: array items: - $ref: "#/components/schemas/Label" + $ref: '#/components/schemas/Label' PromptSummary: type: object @@ -33436,7 +33430,7 @@ components: object: type: string enum: ["prompt"] - + Prompt: type: object properties: @@ -33493,7 +33487,7 @@ components: last_updated_at: type: string format: date-time - + PromptVersionSummary: type: object properties: @@ -33521,7 +33515,7 @@ components: object: type: string enum: ["prompt"] - + PromptPartialSummary: type: object properties: @@ -33547,7 +33541,7 @@ components: object: type: string enum: ["partial"] - + PromptPartial: type: object properties: @@ -33579,7 +33573,7 @@ components: status: type: string enum: ["active"] - + PromptPartialVersion: type: object properties: @@ -33831,40 +33825,40 @@ components: description: Unique identifier for the log entry nullable: true example: "550e8400-e29b-41d4-a716-446655440000" - + request: - $ref: "#/components/schemas/LogRequest" - + $ref: '#/components/schemas/LogRequest' + response: - $ref: "#/components/schemas/LogResponse" - + $ref: '#/components/schemas/LogResponse' + organisation_id: type: string description: Organization identifier nullable: true example: "org-123" - + created_at: type: string format: date-time description: Timestamp when the log was created nullable: true example: "2024-01-15T10:30:00.000Z" - + metrics: - $ref: "#/components/schemas/AnalyticsMetrics" + $ref: '#/components/schemas/AnalyticsMetrics' description: Analytics metrics object containing detailed metrics about the request - + finalUntransformedRequest: - $ref: "#/components/schemas/RequestResponseObject" + $ref: '#/components/schemas/RequestResponseObject' description: The original request before any transformations (only present when debug logging is enabled) - + originalResponse: - $ref: "#/components/schemas/RequestResponseObject" + $ref: '#/components/schemas/RequestResponseObject' description: The original response from the provider (only present when debug logging is enabled or request failed) - + transformedRequest: - $ref: "#/components/schemas/RequestResponseObject" + $ref: '#/components/schemas/RequestResponseObject' description: The request after transformations (only present when debug logging is enabled) LogRequest: @@ -33879,13 +33873,13 @@ components: format: uri description: Sanitized request URL example: "https://api.openai.com/v1/chat/completions" - + method: type: string description: HTTP method enum: [GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD] example: "POST" - + headers: type: object additionalProperties: @@ -33894,12 +33888,12 @@ components: example: "Content-Type": "application/json" "Authorization": "Bearer hashed_value" - + body: type: object additionalProperties: true description: Request body (only present when debug logging is enabled) - + portkeyHeaders: type: object additionalProperties: @@ -33908,7 +33902,7 @@ components: example: "x-portkey-trace-id": "trace-123" "x-portkey-span-id": "span-456" - "x-portkey-metadata": '{"key":"value"}' + "x-portkey-metadata": "{\"key\":\"value\"}" LogResponse: type: object @@ -33922,7 +33916,7 @@ components: format: int32 description: HTTP response status code example: 200 - + headers: type: object additionalProperties: @@ -33930,7 +33924,7 @@ components: description: Response headers (only present when debug logging is enabled or request failed) example: "Content-Type": "application/json" - + body: type: object additionalProperties: true @@ -33939,13 +33933,13 @@ components: id: "chatcmpl-123" object: "chat.completion" created: 1677652288 - + responseTime: type: integer format: int64 description: Response time in milliseconds example: 1234 - + lastUsedOptionJsonPath: type: string description: JSON path to the last used option in the config @@ -33980,220 +33974,220 @@ components: format: uuid description: Unique identifier for the log entry example: "550e8400-e29b-41d4-a716-446655440000" - + organisation_id: type: string description: Organization identifier example: "org-123" - + organisation_name: type: string description: Organization name example: "Acme Corp" - + prompt_id: type: string description: Prompt identifier example: "prompt-789" - + prompt_version_id: type: string description: Prompt version identifier example: "prompt-v1" - + config_id: type: string description: Configuration identifier example: "config-123" - + created_at: type: string format: date-time description: Timestamp when the log was created example: "2024-01-15T10:30:00.000" - + is_success: type: boolean description: Whether the request was successful (status code 200-299) example: true - + ai_org: type: string description: AI provider organization (e.g., openai, anthropic) example: "openai" - + ai_model: type: string description: AI model used example: "gpt-4o" - + req_units: type: number format: float description: Request token units example: 100 - + res_units: type: number format: float description: Response token units example: 50 - + total_units: type: number format: float description: Total token units (req_units + res_units) example: 150 - + cost: type: number format: float description: Cost in the specified currency example: 0.002 - + cost_currency: type: string description: Currency code for the cost default: "USD" example: "USD" - + request_url: type: string format: uri description: Sanitized request URL example: "https://api.openai.com/v1/chat/completions" - + request_method: type: string description: HTTP method example: "POST" - + response_status_code: type: integer format: int32 description: HTTP response status code example: 200 - + response_time: type: integer format: int64 description: Response time in milliseconds example: 1234 - + is_proxy_call: type: boolean description: Whether this was a proxy call example: true - + cache_status: type: string nullable: true description: Cache status (e.g., HIT, MISS, DISABLED, SEMANTIC HIT) example: "MISS" - + cache_type: type: string nullable: true description: Type of cache used example: "semantic" - + stream_mode: type: integer nullable: true description: Whether streaming was enabled (1) or not (0) example: 1 - + retry_success_count: type: integer description: Number of successful retries example: 0 - + trace_id: type: string description: Distributed tracing trace ID example: "trace-123" - + span_id: type: string description: Distributed tracing span ID example: "span-456" - + span_name: type: string description: Name of the span example: "llm" - + parent_span_id: type: string description: Parent span ID in distributed tracing example: "span-789" - + mode: type: string description: Request mode (e.g., single, loadbalance, fallback) example: "single" - + virtual_key: type: string description: Virtual key identifier example: "vk-123" - + source: type: string description: Source of the request (e.g., rubeus, proxy) example: "rubeus" - + runtime: type: string description: Runtime environment example: "node" - + runtime_version: type: string description: Runtime version example: "18.0.0" - + sdk_version: type: string description: SDK version example: "1.0.0" - + config: type: string description: Configuration slug or ID example: "pc-config-123" - + internal_trace_id: type: string description: Internal trace ID for gateway tracking example: "internal-trace-123" - + last_used_option_index: type: integer description: Index of the last used option in the config example: 0 - + config_version_id: type: string description: Configuration version identifier example: "config-v1" - + prompt_slug: type: string description: Prompt slug example: "my-prompt" - + workspace_slug: type: string nullable: true description: Workspace slug example: "my-workspace" - + log_store_file_path_format: type: string description: Path format version for log storage example: "v1" - + metadata.key: type: array items: @@ -34201,7 +34195,7 @@ components: nullable: true description: Array of metadata keys example: ["key1", "key2"] - + metadata.value: type: array items: @@ -34209,42 +34203,42 @@ components: nullable: true description: Array of metadata values example: ["value1", "value2"] - + api_key_id: type: string description: API key identifier example: "api-key-123" - + request_parsing_time: type: integer format: int64 description: Time taken to parse the request in milliseconds example: 5 - + pre_processing_time: type: integer format: int64 description: Time taken for pre-processing in milliseconds example: 10 - + cache_processing_time: type: integer format: int64 description: Time taken for cache processing in milliseconds example: 2 - + response_parsing_time: type: integer format: int64 description: Time taken to parse the response in milliseconds example: 8 - + gateway_processing_time: type: integer format: int64 description: Total gateway processing time in milliseconds example: 50 - + upstream_response_time: type: integer format: int64 @@ -34724,10 +34718,10 @@ components: type: array description: Array of guardrail checks to apply items: - $ref: "#/components/schemas/GuardrailCheck" + $ref: '#/components/schemas/GuardrailCheck' minItems: 1 actions: - $ref: "#/components/schemas/GuardrailActions" + $ref: '#/components/schemas/GuardrailActions' UpdateGuardrailRequest: type: object @@ -34739,10 +34733,10 @@ components: type: array description: Updated array of guardrail checks items: - $ref: "#/components/schemas/GuardrailCheck" + $ref: '#/components/schemas/GuardrailCheck' minItems: 1 actions: - $ref: "#/components/schemas/GuardrailActions" + $ref: '#/components/schemas/GuardrailActions' GuardrailActions: type: object @@ -34874,38 +34868,38 @@ components: - "panw-prisma-airs.intercept" parameters: oneOf: - - $ref: "#/components/schemas/JWTParameters" - - $ref: "#/components/schemas/ModelWhitelistParameters" - - $ref: "#/components/schemas/RegexMatchParameters" - - $ref: "#/components/schemas/SentenceCountParameters" - - $ref: "#/components/schemas/WordCountParameters" - - $ref: "#/components/schemas/CharacterCountParameters" - - $ref: "#/components/schemas/JSONSchemaParameters" - - $ref: "#/components/schemas/JSONKeysParameters" - - $ref: "#/components/schemas/ContainsParameters" - - $ref: "#/components/schemas/ValidUrlsParameters" - - $ref: "#/components/schemas/ContainsCodeParameters" - - $ref: "#/components/schemas/WebhookParameters" - - $ref: "#/components/schemas/EndsWithParameters" - - $ref: "#/components/schemas/UppercaseParameters" - - $ref: "#/components/schemas/RequiredMetadataKeysParameters" - - $ref: "#/components/schemas/AllowedRequestTypesParameters" - - $ref: "#/components/schemas/SydeGuardParameters" - - $ref: "#/components/schemas/AporiaParameters" - - $ref: "#/components/schemas/PillarScanParameters" - - $ref: "#/components/schemas/PatronusParameters" - - $ref: "#/components/schemas/PatronusCustomParameters" - - $ref: "#/components/schemas/PortkeyModerationParameters" - - $ref: "#/components/schemas/PortkeyLanguageParameters" - - $ref: "#/components/schemas/PortkeyPIIParameters" - - $ref: "#/components/schemas/MistralModerationParameters" - - $ref: "#/components/schemas/BedrockGuardParameters" - - $ref: "#/components/schemas/PromptfooParameters" - - $ref: "#/components/schemas/AcuvityScanParameters" - - $ref: "#/components/schemas/AzureContentSafetyParameters" - - $ref: "#/components/schemas/AzurePIIParameters" - - $ref: "#/components/schemas/PANWPrismaParameters" - - $ref: "#/components/schemas/BasicParameters" + - $ref: '#/components/schemas/JWTParameters' + - $ref: '#/components/schemas/ModelWhitelistParameters' + - $ref: '#/components/schemas/RegexMatchParameters' + - $ref: '#/components/schemas/SentenceCountParameters' + - $ref: '#/components/schemas/WordCountParameters' + - $ref: '#/components/schemas/CharacterCountParameters' + - $ref: '#/components/schemas/JSONSchemaParameters' + - $ref: '#/components/schemas/JSONKeysParameters' + - $ref: '#/components/schemas/ContainsParameters' + - $ref: '#/components/schemas/ValidUrlsParameters' + - $ref: '#/components/schemas/ContainsCodeParameters' + - $ref: '#/components/schemas/WebhookParameters' + - $ref: '#/components/schemas/EndsWithParameters' + - $ref: '#/components/schemas/UppercaseParameters' + - $ref: '#/components/schemas/RequiredMetadataKeysParameters' + - $ref: '#/components/schemas/AllowedRequestTypesParameters' + - $ref: '#/components/schemas/SydeGuardParameters' + - $ref: '#/components/schemas/AporiaParameters' + - $ref: '#/components/schemas/PillarScanParameters' + - $ref: '#/components/schemas/PatronusParameters' + - $ref: '#/components/schemas/PatronusCustomParameters' + - $ref: '#/components/schemas/PortkeyModerationParameters' + - $ref: '#/components/schemas/PortkeyLanguageParameters' + - $ref: '#/components/schemas/PortkeyPIIParameters' + - $ref: '#/components/schemas/MistralModerationParameters' + - $ref: '#/components/schemas/BedrockGuardParameters' + - $ref: '#/components/schemas/PromptfooParameters' + - $ref: '#/components/schemas/AcuvityScanParameters' + - $ref: '#/components/schemas/AzureContentSafetyParameters' + - $ref: '#/components/schemas/AzurePIIParameters' + - $ref: '#/components/schemas/PANWPrismaParameters' + - $ref: '#/components/schemas/BasicParameters' description: Configuration parameters specific to the check type name: type: string @@ -34958,7 +34952,7 @@ components: type: array description: Array of guardrail summaries items: - $ref: "#/components/schemas/GuardrailSummary" + $ref: '#/components/schemas/GuardrailSummary' total: type: integer description: Total number of guardrails available @@ -35016,18 +35010,18 @@ components: GuardrailDetails: allOf: - - $ref: "#/components/schemas/GuardrailSummary" + - $ref: '#/components/schemas/GuardrailSummary' - type: object properties: checks: type: array description: Array of configured guardrail checks items: - $ref: "#/components/schemas/GuardrailCheck" + $ref: '#/components/schemas/GuardrailCheck' actions: - $ref: "#/components/schemas/GuardrailActions" + $ref: '#/components/schemas/GuardrailActions' - # Detailed parameter schemas for specific guardrail types +# Detailed parameter schemas for specific guardrail types JWTParameters: title: JWT Parameters type: object @@ -35877,7 +35871,7 @@ components: type: object description: Basic parameters with no specific requirements additionalProperties: true - + BedrockBatchJob: type: object required: @@ -36110,13 +36104,13 @@ components: type: array minItems: 1 items: - $ref: "#/components/schemas/Condition" + $ref: '#/components/schemas/Condition' description: Array of conditions that define which requests the policy applies to group_by: type: array minItems: 1 items: - $ref: "#/components/schemas/GroupBy" + $ref: '#/components/schemas/GroupBy' description: Array of group by fields that define how usage is aggregated type: type: string @@ -36187,13 +36181,13 @@ components: type: array minItems: 1 items: - $ref: "#/components/schemas/Condition" + $ref: '#/components/schemas/Condition' description: Array of conditions that define which requests the policy applies to group_by: type: array minItems: 1 items: - $ref: "#/components/schemas/GroupBy" + $ref: '#/components/schemas/GroupBy' description: Array of group by fields that define how usage is aggregated type: type: string @@ -36255,12 +36249,12 @@ components: conditions: type: array items: - $ref: "#/components/schemas/Condition" + $ref: '#/components/schemas/Condition' description: Array of conditions group_by: type: array items: - $ref: "#/components/schemas/GroupBy" + $ref: '#/components/schemas/GroupBy' description: Array of group by fields type: type: string @@ -36301,7 +36295,7 @@ components: value_key_usage_map: type: object additionalProperties: - $ref: "#/components/schemas/ValueKeyUsage" + $ref: '#/components/schemas/ValueKeyUsage' description: Map of value keys to usage information (only included when include_usage=true) ValueKeyUsage: @@ -36345,12 +36339,12 @@ components: conditions: type: array items: - $ref: "#/components/schemas/Condition" + $ref: '#/components/schemas/Condition' description: Array of conditions group_by: type: array items: - $ref: "#/components/schemas/GroupBy" + $ref: '#/components/schemas/GroupBy' description: Array of group by fields type: type: string @@ -36405,14 +36399,14 @@ components: data: type: array items: - $ref: "#/components/schemas/UsageLimitsPolicy" + $ref: '#/components/schemas/UsageLimitsPolicy' total: type: integer description: Total number of policies UsageLimitsPolicyResponse: allOf: - - $ref: "#/components/schemas/UsageLimitsPolicy" + - $ref: '#/components/schemas/UsageLimitsPolicy' - type: object properties: object: @@ -36441,7 +36435,7 @@ components: data: type: array items: - $ref: "#/components/schemas/UsageLimitsPolicyEntity" + $ref: '#/components/schemas/UsageLimitsPolicyEntity' total: type: integer description: Total number of entities @@ -36455,14 +36449,14 @@ components: data: type: array items: - $ref: "#/components/schemas/RateLimitsPolicy" + $ref: '#/components/schemas/RateLimitsPolicy' total: type: integer description: Total number of policies RateLimitsPolicyResponse: allOf: - - $ref: "#/components/schemas/RateLimitsPolicy" + - $ref: '#/components/schemas/RateLimitsPolicy' - type: object properties: object: @@ -36488,7 +36482,7 @@ components: description: Workspace ID (optional; to create at workspace level) slug: type: string - pattern: "^[a-zA-Z0-9_-]+$" + pattern: '^[a-zA-Z0-9_-]+$' description: Optional slug; must be unique within organisation name: type: string @@ -36647,7 +36641,7 @@ components: description: type: string nullable: true - workspaces_count: + workspaces_count: type: number nullable: true @@ -36968,7 +36962,7 @@ components: description: MCP Integration ID (UUID) or slug slug: type: string - pattern: "^[a-zA-Z0-9_-]+$" + pattern: '^[a-zA-Z0-9_-]+$' minLength: 3 maxLength: 50 description: Optional slug; must be unique within organisation From 2e1c668855d090f263f3773c058fc9c83623e75f Mon Sep 17 00:00:00 2001 From: Krishna Chandra Date: Wed, 22 Apr 2026 15:55:22 +0530 Subject: [PATCH 6/8] fix: revert formatting changes --- openapi.yaml | 76 ++++++++++++++++++++++++++-------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index d5c341df..89f0dad0 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -5496,7 +5496,7 @@ paths: } main(); - x-example-response: &list_assistants_example | + response: &list_assistants_example | { "object": "list", "data": [ @@ -5635,7 +5635,7 @@ paths: } main(); - x-example-response: &create_assistants_example | + response: &create_assistants_example | { "id": "asst_abc123", "object": "assistant", @@ -5726,7 +5726,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "asst_abc123", "object": "assistant", @@ -5840,7 +5840,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "asst_123", "object": "assistant", @@ -5932,7 +5932,7 @@ paths: console.log(response); } main(); - x-example-response: | + response: | { "id": "asst_abc123", "object": "assistant.deleted", @@ -6181,7 +6181,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "thread_abc123", "object": "thread", @@ -6262,7 +6262,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "thread_abc123", "object": "thread", @@ -6365,7 +6365,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "thread_abc123", "object": "thread", @@ -6444,7 +6444,7 @@ paths: console.log(response); } main(); - x-example-response: | + response: | { "id": "thread_abc123", "object": "thread.deleted", @@ -6553,7 +6553,7 @@ paths: } main(); - x-example-response: | + response: | { "object": "list", "data": [ @@ -6687,7 +6687,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "msg_abc123", "object": "thread.message", @@ -6791,7 +6791,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "msg_abc123", "object": "thread.message", @@ -6909,7 +6909,7 @@ paths: }, } }' - x-example-response: | + response: | { "id": "msg_abc123", "object": "thread.message", @@ -7011,7 +7011,7 @@ paths: console.log(deletedMessage); } - x-example-response: | + response: | { "id": "msg_abc123", "object": "thread.message.deleted", @@ -7110,7 +7110,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "run_abc123", "object": "thread.run", @@ -7244,7 +7244,7 @@ paths: } main(); - x-example-response: | + response: | { "object": "list", "data": [ @@ -7431,7 +7431,7 @@ paths: } main(); - x-example-response: &run_object_example | + response: &run_object_example | { "id": "run_abc123", "object": "thread.run", @@ -7550,7 +7550,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "run_abc123", "object": "thread.run", @@ -7688,7 +7688,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "run_abc123", "object": "thread.run", @@ -7851,7 +7851,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "run_123", "object": "thread.run", @@ -7988,7 +7988,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "run_abc123", "object": "thread.run", @@ -8129,7 +8129,7 @@ paths: } main(); - x-example-response: | + response: | { "object": "list", "data": [ @@ -8255,7 +8255,7 @@ paths: } main(); - x-example-response: &run_step_object_example | + response: &run_step_object_example | { "id": "step_abc123", "object": "thread.run.step", @@ -8369,7 +8369,7 @@ paths: } main(); - x-example-response: | + response: | { "object": "list", "data": [ @@ -8479,7 +8479,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "vs_abc123", "object": "vector_store", @@ -8567,7 +8567,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "vs_abc123", "object": "vector_store", @@ -8657,7 +8657,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "vs_abc123", "object": "vector_store", @@ -8745,7 +8745,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "vs_abc123", "object": "vector_store.deleted", @@ -8854,7 +8854,7 @@ paths: } main(); - x-example-response: | + response: | { "object": "list", "data": [ @@ -8961,7 +8961,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "file-abc123", "object": "vector_store.file", @@ -9054,7 +9054,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "file-abc123", "object": "vector_store.file", @@ -9143,7 +9143,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "file-abc123", "object": "vector_store.file.deleted", @@ -9237,7 +9237,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "vsfb_abc123", "object": "vector_store.file_batch", @@ -9335,7 +9335,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "vsfb_abc123", "object": "vector_store.file_batch", @@ -9432,7 +9432,7 @@ paths: } main(); - x-example-response: | + response: | { "id": "vsfb_abc123", "object": "vector_store.file_batch", @@ -9558,7 +9558,7 @@ paths: } main(); - x-example-response: | + response: | { "object": "list", "data": [ @@ -20734,7 +20734,7 @@ paths: operands: - value: cache_read_tokens - value: rates.cache_read_input_token - x-example-response: + response: operation: multiply operands: - value: output_tokens @@ -20765,7 +20765,7 @@ paths: operands: - value: input_tokens - value: rates.request_token - x-example-response: + response: operation: multiply operands: - value: output_tokens From f41b35937b95129876f26a078c0af6e154fda0c8 Mon Sep 17 00:00:00 2001 From: Krishna Chandra Date: Wed, 22 Apr 2026 17:25:19 +0530 Subject: [PATCH 7/8] fix: remove websearch tool changes --- openapi.yaml | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 89f0dad0..4b6cdcb9 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -30500,21 +30500,20 @@ components: - `web_search_preview` - `web_search_preview_2025_03_11` user_location: - anyOf: - - allOf: - - $ref: "#/components/schemas/WebSearchLocation" - - type: object - properties: - type: - type: string - description: | - The type of location approximation. Always `approximate`. - enum: - - approximate - x-stainless-const: true - required: - - type - - enum: [null] + allOf: + - $ref: "#/components/schemas/WebSearchLocation" + - type: object + properties: + type: + type: string + description: | + The type of location approximation. Always `approximate`. + enum: + - approximate + x-stainless-const: true + required: + - type + nullable: true search_context_size: $ref: "#/components/schemas/WebSearchContextSize" required: From 0751ab212e3e8f510fabe9b6000c70a36a1eec95 Mon Sep 17 00:00:00 2001 From: Krishna Chandra Date: Wed, 22 Apr 2026 17:34:17 +0530 Subject: [PATCH 8/8] feat: add examples in create and update api key --- openapi.yaml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 4b6cdcb9..54e436a7 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -17362,6 +17362,31 @@ paths: application/json: schema: $ref: "#/components/schemas/CreateApiKeyObject" + examples: + create_basic: + summary: Create a basic service API key + value: + name: "API_KEY_NAME_0909" + scopes: ["completions.write"] + create_with_rotation: + summary: Create an API key with automatic monthly rotation + value: + name: "Auto-rotating Key" + scopes: ["completions.write"] + rotation_policy: + rotation_period: "monthly" + key_transition_period_ms: 3600000 + create_with_usage_limits: + summary: Create an API key with usage limits and alert emails + value: + name: "Budget-limited Key" + scopes: ["completions.write"] + usage_limits: + type: "cost" + credit_limit: 100 + alert_threshold: 80 + periodic_reset: "monthly" + alert_emails: ["admin@example.com"] responses: "200": description: OK @@ -17771,6 +17796,21 @@ paths: summary: Reset accumulated usage for this key value: reset_usage: true + set_rotation_policy: + summary: Set automatic monthly rotation on an existing key + value: + rotation_policy: + rotation_period: "monthly" + key_transition_period_ms: 3600000 + update_usage_limits: + summary: Update usage limits and alert emails + value: + usage_limits: + type: "cost" + credit_limit: 100 + alert_threshold: 80 + periodic_reset: "monthly" + alert_emails: ["admin@example.com"] parameters: - name: id in: path