You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3c50399
Browse filesBrowse the repository at this point in the historyBrowse files
feat(api): support image URLs and detailed safety alert explanations (#4061)
## Summary
Document HTTP(S) image URLs for Decisions inputs and expose detailed
safety alert explanations.
## Changes
- Document publicly accessible HTTP(S) image URLs alongside base64 data
URLs in Decisions inputs.
- Add optional detailed_explanation to safety alerts when an explanation
is available for an eligible zero data retention alert.
Copy file name to clipboardExpand all lines: api_reference/openapi.transformed.yml
+12-7Lines changed: 12 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -30102,7 +30102,7 @@ paths:
30102
30102
description: |-
30103
30103
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.
30104
30104
30105
-
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.
30105
+
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.
30106
30106
30107
30107
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.
30108
30108
tags:
@@ -78416,6 +78416,11 @@ components:
78416
78416
- type: string
78417
78417
description: A customer-safe description derived from error_type, or null for zero data retention requests.
78418
78418
- type: 'null'
78419
+
detailed_explanation:
78420
+
anyOf:
78421
+
- type: string
78422
+
description: A generated explanation, temporarily available for eligible zero data retention alerts. Omitted when unavailable.
78423
+
- type: 'null'
78419
78424
type: object
78420
78425
required:
78421
78426
- id
@@ -80903,8 +80908,8 @@ components:
80903
80908
type: string
80904
80909
minLength: 0
80905
80910
maxLength: 1073741824
80906
-
pattern: '^data:'
80907
-
description: A base64-encoded image in a data URL.
80911
+
pattern: ^(data:|https?://)
80912
+
description: A base64-encoded image in a data URL or a publicly accessible HTTP(S) image URL.
80908
80913
detail:
80909
80914
anyOf:
80910
80915
- $ref: '#/components/schemas/ImageDetailParam'
@@ -80921,7 +80926,7 @@ components:
80921
80926
- image_url
80922
80927
- type
80923
80928
additionalProperties: false
80924
-
description: An inline image. External URLs and file IDs are not supported.
80929
+
description: An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.
80925
80930
DecisionInputContentParts:
80926
80931
type: array
80927
80932
items:
@@ -80939,7 +80944,7 @@ components:
80939
80944
minItems: 0
80940
80945
maxItems: 16384
80941
80946
DecisionInputContent:
80942
-
description: Text evidence or an ordered list of text and inline image parts.
80947
+
description: Text evidence or an ordered list of text and image parts.
80943
80948
anyOf:
80944
80949
- type: string
80945
80950
minLength: 0
@@ -80967,9 +80972,9 @@ components:
80967
80972
- role
80968
80973
- content
80969
80974
additionalProperties: false
80970
-
description: A user message containing text or inline images.
80975
+
description: A user message containing text or images.
80971
80976
DecisionInput:
80972
-
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.
80977
+
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.
0 commit comments