diff --git a/.castiron.stats.yml b/.castiron.stats.yml index 219cb1f731..43fb9a3293 100644 --- a/.castiron.stats.yml +++ b/.castiron.stats.yml @@ -1,8 +1,8 @@ schema_version: 1 -generation_id: d1408dd9-9fc1-448f-8241-6aef0534e244 -openapi_spec_hash: 134c119262ce50017727a300b0106882 -openapi_transformed_spec_hash: b5602cf76f35aea5b689f2439368863b +generation_id: 374b2605-c0fb-47ec-8751-b55b29e1dab4 +openapi_spec_hash: fd66f1b55a7b5e3f8e7331bb0bd0febb +openapi_transformed_spec_hash: 79a17820b39aac110d9207c90d19966c config_hash: adfe6b936328bd198d9442c21c42383b -codegen_sha: a3c6c909393aec81c33f5001d5afbd157596a838 -codegen_hash: d3486c711958cf5d4f9fbed196ae4718ad568c00ec74ef3f9f8f5e6cdda376c9 -public_codegen_sha: c29cf7f6b2c6fb1452bfb4c1ef1c106b4570a155 +codegen_sha: 6f0f42de4317505ef496cc9032dddbfe5bdf993d +codegen_hash: 1119dd81bb211845bebb460287cac844467a00519dd09e9dead3693bd0c95fd9 +public_codegen_sha: 561382381cc7fa8b74939c4d3fa85393f9edc96e diff --git a/api_reference/openapi.transformed.yml b/api_reference/openapi.transformed.yml index 71c0479dc4..bcc56b345d 100644 --- a/api_reference/openapi.transformed.yml +++ b/api_reference/openapi.transformed.yml @@ -30102,7 +30102,7 @@ paths: description: |- Use this endpoint to ask classification or scoring questions about the same input. You’ll get the answers back in the order you asked the questions. - For text, you can pass a string. You can also send user messages containing `input_text` and `input_image` parts, with up to 128 images per request. Images must be data URLs; external URLs and file IDs aren’t accepted. Other message roles, function calls, files, audio, and item references aren’t supported. + For text, you can pass a string. You can also send user messages containing `input_text` and `input_image` parts, with up to 128 images per request. Images can be base64 data URLs or publicly accessible HTTP(S) URLs. File IDs aren’t accepted. Other message roles, function calls, files, audio, and item references aren’t supported. Sometimes a question returns a refusal instead of an answer. The result has type `refusal` and includes the question’s name, or `null` if you didn’t give it one. tags: @@ -78416,6 +78416,11 @@ components: - type: string description: A customer-safe description derived from error_type, or null for zero data retention requests. - type: 'null' + detailed_explanation: + anyOf: + - type: string + description: A generated explanation, temporarily available for eligible zero data retention alerts. Omitted when unavailable. + - type: 'null' type: object required: - id @@ -80903,8 +80908,8 @@ components: type: string minLength: 0 maxLength: 1073741824 - pattern: '^data:' - description: A base64-encoded image in a data URL. + pattern: ^(data:|https?://) + description: A base64-encoded image in a data URL or a publicly accessible HTTP(S) image URL. detail: anyOf: - $ref: '#/components/schemas/ImageDetailParam' @@ -80921,7 +80926,7 @@ components: - image_url - type additionalProperties: false - description: An inline image. External URLs and file IDs are not supported. + description: An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported. DecisionInputContentParts: type: array items: @@ -80939,7 +80944,7 @@ components: minItems: 0 maxItems: 16384 DecisionInputContent: - description: Text evidence or an ordered list of text and inline image parts. + description: Text evidence or an ordered list of text and image parts. anyOf: - type: string minLength: 0 @@ -80967,9 +80972,9 @@ components: - role - content additionalProperties: false - description: A user message containing text or inline images. + description: A user message containing text or images. DecisionInput: - description: The text or images to evaluate for every question. Provide a text string or user messages containing text and inline images. Images must be inline data URLs; at most 128 images are allowed across all messages in one request. External URLs, files, audio, tools, and item references are not supported. + description: The text or images to evaluate for every question. Provide a text string or user messages containing text and images. Images can be base64 data URLs or publicly accessible HTTP(S) URLs; at most 128 images are allowed across all messages in one request. Files, audio, tools, and item references are not supported. anyOf: - type: string minLength: 0 diff --git a/src/resources/decisions.ts b/src/resources/decisions.ts index f479b54453..ddd033df53 100644 --- a/src/resources/decisions.ts +++ b/src/resources/decisions.ts @@ -18,8 +18,9 @@ export class Decisions extends APIResource { * * For text, you can pass a string. You can also send user messages containing * `input_text` and `input_image` parts, with up to 128 images per request. Images - * must be data URLs; external URLs and file IDs aren’t accepted. Other message - * roles, function calls, files, audio, and item references aren’t supported. + * can be base64 data URLs or publicly accessible HTTP(S) URLs. File IDs aren’t + * accepted. Other message roles, function calls, files, audio, and item references + * aren’t supported. * * Sometimes a question returns a refusal instead of an answer. The result has type * `refusal` and includes the question’s name, or `null` if you didn’t give it one. @@ -154,11 +155,12 @@ export namespace Decision { } /** - * An inline image. External URLs and file IDs are not supported. + * An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. + * File IDs are not supported. */ export interface DecisionInputImage { /** - * A base64-encoded image in a data URL. + * A base64-encoded image in a data URL or a publicly accessible HTTP(S) image URL. */ image_url: string; @@ -172,11 +174,11 @@ export interface DecisionInputImage { } /** - * A user message containing text or inline images. + * A user message containing text or images. */ export interface DecisionInputMessage { /** - * Text evidence or an ordered list of text and inline image parts. + * Text evidence or an ordered list of text and image parts. */ content: string | Array; @@ -186,7 +188,8 @@ export interface DecisionInputMessage { } /** - * An inline image. External URLs and file IDs are not supported. + * An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. + * File IDs are not supported. */ export type DecisionInputPart = DecisionInputText | DecisionInputImage; @@ -199,9 +202,9 @@ export interface DecisionInputText { export interface DecisionCreateParams { /** * The text or images to evaluate for every question. Provide a text string or user - * messages containing text and inline images. Images must be inline data URLs; at - * most 128 images are allowed across all messages in one request. External URLs, - * files, audio, tools, and item references are not supported. + * messages containing text and images. Images can be base64 data URLs or publicly + * accessible HTTP(S) URLs; at most 128 images are allowed across all messages in + * one request. Files, audio, tools, and item references are not supported. */ input: string | Array; diff --git a/src/resources/safety/alerts.ts b/src/resources/safety/alerts.ts index 363bc0a4e8..df5eea808a 100644 --- a/src/resources/safety/alerts.ts +++ b/src/resources/safety/alerts.ts @@ -54,6 +54,12 @@ export interface SafetyAlert { request_paused: boolean; response_id: string; + + /** + * A generated explanation, temporarily available for eligible zero data retention + * alerts. Omitted when unavailable. + */ + detailed_explanation?: string | null; } export declare namespace Alerts {