SpyBara
Go Premium

Documentation 2026-10-21 23:02 UTC to 2026-10-22 22:59 UTC

6 files changed +190 −24. View all changes and history on the product overview
2026
Sat 31 23:01 Fri 30 23:59 Thu 29 23:59 Wed 28 23:00 Tue 27 23:58 Mon 26 23:58 Sat 24 23:02 Fri 23 23:58 Thu 22 22:59 Wed 21 23:02 Tue 20 23:02 Mon 19 23:00 Sun 18 23:00 Sat 17 22:57 Fri 16 23:02 Thu 15 23:00 Wed 14 23:59 Tue 13 23:00 Sun 11 23:59 Sat 10 23:58 Fri 9 22:57 Thu 8 23:01 Wed 7 23:57 Tue 6 22:58 Mon 5 22:59 Sun 4 22:58 Fri 2 23:58 Thu 1 22:59
Details

178**Requirements and limitations**178**Requirements and limitations**

179 179 

180- At most 20 voices from recordings can be created per organization.180- At most 20 voices from recordings can be created per organization.

181- The audio samples must be 30 seconds or less.181- The audio samples must be 60 seconds or less.

182- The audio samples must be one of the following types: `mpeg`, `wav`, `ogg`, `aac`, `flac`, `webm`, or `mp4`.182- The audio samples must be one of the following types: `mpeg`, `wav`, `ogg`, `aac`, `flac`, `webm`, or `mp4`.

183 183 

184Refer to the Text-to-Speech Supplemental Agreement for additional terms of use.184Refer to the Text-to-Speech Supplemental Agreement for additional terms of use.


305 305 

306The consent recording and reference sample must come from the same person. The306The consent recording and reference sample must come from the same person. The

307sample needs at least five seconds of actual speech and at least 15 transcribed307sample needs at least five seconds of actual speech and at least 15 transcribed

308text tokens; silence does not count. Use a 10–30-second308text tokens; silence does not count. Use a 10–60-second

309recording with several complete sentences. Each upload is limited to 10 MiB.309recording with several complete sentences. Each upload is limited to 10 MiB.

310The service extracts the reference transcript from your recording.310The service extracts the reference transcript from your recording.

311 311 

guides/decisions.md +144 −11

Details

2 2 

3> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.3> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

4 4 

5The Decisions API evaluates text, images, or both and returns typed answers about 10x faster than the Responses API. Get the probability that a condition is true, a choice from a fixed set, or a score against a rubric. Use those answers to classify content, route requests, and prioritize work in your application.5The Decisions API is now generally available. Review [what's new](#whats-new)

6 since the public beta.

7 

8The Decisions API evaluates text, images, and JSON and returns typed answers about 10x faster than the Responses API. Get the probability that a condition is true, a choice from a fixed set, or a score against a rubric. Use those answers to classify content, route requests, and prioritize work in your application.

6 9 

7Try the Decisions API in the [Playground](https://platform.openai.com/decisions) to experiment with questions and inputs before writing code.10Try the Decisions API in the [Playground](https://platform.openai.com/decisions) to experiment with questions and inputs before writing code.

8 11 

9The Decisions API is in public beta, and we expect to GA in the coming weeks.12Send requests to `POST /v1/decisions` using `gpt-6-luna`, the only currently

10 `gpt-6-luna` is the only model currently available. Use the dedicated `POST13 supported model.

11 /v1/decisions` endpoint.14 

15## What's new

16 

17Since the public beta launched, the Decisions API has added these capabilities:

12 18 

13To run the SDK examples below, use these OpenAI SDK versions or later: Python 3.26.0, JavaScript 7.30.0, Go 3.73.0, Ruby 0.101.0, and Java 4.78.0. See [OpenAI SDK](https://developers.openai.com/api/docs/libraries) for installation instructions.19- [**Prompt caching.**](#reuse-shared-input-with-prompt-caching) Reuse shared input across requests and receive cache discounts.

20- [**Images in question instructions.**](#include-images-in-question-instructions) Give each question its own images to compare against shared evidence.

21- [**JSON input.**](#evaluate-json-data) Pass structured data directly with an `input_json` content part.

22- [**More questions per request.**](#ask-multiple-questions) Ask up to 400 questions per request, up from 200 during the public beta.

23- [**Hosted image inputs.**](#check-an-image-for-visible-damage) Pass publicly accessible HTTP or HTTPS image URLs as well as inline base64 data URLs.

24- [**Conversation history.**](#evaluate-a-conversation) Evaluate messages alongside function calls, custom tool calls, and their outputs.

25- [**Organization usage reporting.**](#monitor-usage) Track token usage and request counts.

26- [**Native GPT-Live integration.**](https://developers.openai.com/api/docs/guides/decisions-voice) Let Live call Decisions directly, or trigger decisions as input or output transcripts arrive.

27- [**Private Link.**](https://developers.openai.com/api/docs/guides/private-link) Send Decisions requests over a private connection.

14 28 

15## How decisions work29## How decisions work

16 30 

17A request has three parts:31A request has three parts:

18 32 

19| Field | Purpose |33| Field | Purpose |

20| ----------- | -------------------------------------------------------------------------------------------------------- |34| ----------- | --------------------------------------------------------------------------------------------------------------- |

21| `model` | The model that evaluates the request. Currently, only `gpt-6-luna` is supported. |35| `model` | The model that evaluates the request. Currently, only `gpt-6-luna` is supported. |

22| `input` | Shared evidence for the questions: a text string or user messages containing text and images. |36| `input` | Shared evidence for the questions: a text string or an ordered array of messages, tool calls, and tool outputs. |

23| `questions` | What to evaluate, including each question's type, instructions, and any allowed choices or score levels. |37| `questions` | What to evaluate, including each question's type, instructions, and any allowed choices or score levels. |

24 38 

25The response contains an `answers` array. Give each question a unique `name` to identify its answer; the API echoes that name in the response.39The response contains an `answers` array. Give each question a unique `name` to identify its answer; the API echoes that name in the response.


36 50 

37Use Decisions when your application needs one of these answer types. Use [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) with the Responses API when you need to generate an object that follows your own JSON schema, such as extracted fields or a written explanation, or [function calling](https://developers.openai.com/api/docs/guides/function-calling) when you need a model to request a tool call with arguments.51Use Decisions when your application needs one of these answer types. Use [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) with the Responses API when you need to generate an object that follows your own JSON schema, such as extracted fields or a written explanation, or [function calling](https://developers.openai.com/api/docs/guides/function-calling) when you need a model to request a tool call with arguments.

38 52 

53### Evaluate a conversation

54 

55Pass conversation history in `input` to evaluate a request in context. Include messages and any function or custom tool calls and outputs in order. Match each tool output to its call with `call_id`.

56 

57The supported content depends on the message role or item type:

58 

59| Input item | Supported content |

60| ------------------------------ | ------------------------------------------------------------------ |

61| User message | Text, images, and JSON |

62| Developer or system message | Input text only; system messages are treated as developer messages |

63| Assistant message | Output text or refusals |

64| Function or custom tool output | Text and images, associated with a matching tool call |

65 

66Tool calls and outputs provide evidence for your questions. Decisions returns typed answers; your application runs any actions those answers select. Files, audio, and item references aren't supported. See the [create decision reference](https://developers.openai.com/api/reference/resources/decisions/methods/create) for accepted input fields.

67 

68## Evaluate JSON data

69 

70Use an `input_json` content part to pass structured evidence without first converting it to a string. Put the JSON object or array in `data`, alongside any text or image parts in a user message. Within message content, `input_json` is supported only for the `user` role.

71 

72For example, send this JSON request body to `POST /v1/decisions` to evaluate a support ticket against an order record:

73 

74```json

75{

76 "model": "gpt-6-luna",

77 "input": [

78 {

79 "role": "user",

80 "content": [

81 {

82 "type": "input_text",

83 "text": "Evaluate the ticket using the order evidence."

84 },

85 {

86 "type": "input_json",

87 "data": {

88 "ticket": { "body": "Please refund the duplicate charge." },

89 "order": { "charges": [49, 49] }

90 }

91 }

92 ]

93 }

94 ],

95 "questions": [

96 {

97 "type": "predicate",

98 "name": "duplicate_charge",

99 "instructions": "Does the ticket describe a duplicate charge supported by the order?"

100 }

101 ]

102}

103```

104 

105JSON keys such as `role` or `image_url` inside `data` are ordinary data: they don't create messages or fetch images. The answer still uses the selected question type; JSON input doesn't change the response format.

106 

39## Check an image for visible damage107## Check an image for visible damage

40 108 

41Use a `predicate` question to check a product photo for visible damage. This request combines the image with instructions to look for a crack, tear, or dent.109Use a `predicate` question to check a product photo for visible damage. This request combines the image with instructions to look for a crack, tear, or dent.


315 383 

316Provide images as inline base64 data URLs or publicly accessible HTTP or HTTPS URLs. This endpoint doesn't support `file_id` inputs. Combine `input_text` and `input_image` parts in a user message to evaluate images together with instructions or other context.384Provide images as inline base64 data URLs or publicly accessible HTTP or HTTPS URLs. This endpoint doesn't support `file_id` inputs. Combine `input_text` and `input_image` parts in a user message to evaluate images together with instructions or other context.

317 385 

386## Include images in question instructions

387 

388Put evidence that all questions share in `input`. To give each question a different image, set its `instructions` to a nonempty array of `input_text` and `input_image` parts. This works for predicate, choice, and score questions. Text-only instructions can remain a string.

389 

390For example, send this JSON request body to `POST /v1/decisions` to compare a candidate against a shared reference. Replace the two example image URLs with publicly accessible images, or use base64 image data URLs:

391 

392```json

393{

394 "model": "gpt-6-luna",

395 "input": [

396 {

397 "role": "user",

398 "content": [

399 {

400 "type": "input_text",

401 "text": "The shared image is reference image A."

402 },

403 {

404 "type": "input_image",

405 "image_url": "https://example.com/reference.jpg"

406 }

407 ]

408 }

409 ],

410 "questions": [

411 {

412 "type": "predicate",

413 "name": "candidate_matches_reference",

414 "instructions": [

415 {

416 "type": "input_text",

417 "text": "Is candidate image B a derivative or variant of reference image A, including recompression or resizing?"

418 },

419 {

420 "type": "input_image",

421 "image_url": "https://example.com/candidate.jpg"

422 }

423 ]

424 }

425 ]

426}

427```

428 

429When adding images to question instructions:

430 

431- Add another question for each candidate image. Each question evaluates its own candidate against the same shared reference.

432- Supply content parts directly in `instructions`, without a message wrapper or `role`.

433- Question images share the request's image limits with images in `input`.

434 

318## Select from fixed options435## Select from fixed options

319 436 

320A `choice` question selects one value from the options you provide. Use distinct values and descriptions that explain when each option applies.437A `choice` question selects one value from the options you provide. Use distinct values and descriptions that explain when each option applies.


584 701 

585## Score against a rubric702## Score against a rubric

586 703 

587A `score` question evaluates an input against ordered `levels`. Define the criteria for each level and arrange them from lowest to highest.704A `score` question evaluates an input against 2–10 ordered `levels`. Define the criteria for each level and arrange them from lowest to highest.

588 705 

589 706 

590 707 


838 955 

839## Ask multiple questions956## Ask multiple questions

840 957 

841Put independent questions in the same `questions` array to evaluate shared input. For a product photo, you could check for damage and classify the product category in one request. Each question can use a different type.958Include between 1 and 400 questions in a request. Put independent questions in the same `questions` array to evaluate shared input. For a product photo, one request can check for damage and classify the product category. Each question can use a different type.

842 959 

843For decisions that depend on an earlier answer, send separate requests. For example, check for damage first, then use the result to decide whether to request a repair category.960For decisions that depend on an earlier answer, send separate requests. For example, check for damage first, then use the result to decide whether to request a repair category.

844 961 


850 967 

851Use labeled examples from your application to set thresholds for routing, filtering, or review. Choose thresholds based on the cost of false positives and false negatives.968Use labeled examples from your application to set thresholds for routing, filtering, or review. Choose thresholds based on the cost of false positives and false negatives.

852 969 

970## Reuse shared input with prompt caching

971 

972Prompt caching lets repeated requests reuse a matching prefix of shared `input` and receive discounted cache-read pricing. For example, keep a reference document or image in `input` and change the questions for each request. Content in `questions`, including question-specific images, is outside the reusable prefix.

973 

974By default, Decisions places an implicit cache breakpoint at the end of shared `input`. Existing requests can benefit without changing their request body. The reusable prefix must contain at least 1,024 tokens; question content doesn't count toward this threshold. Keep the prefix identical across requests to allow reuse.

975 

976Use `prompt_cache_key` to partition cache reuse by a caller-provided key. For control over the boundary, add `prompt_cache_breakpoint: {"mode": "explicit"}` to text or image content parts in shared `input`. Set `prompt_cache_options.mode` to `"explicit"` to use only marked boundaries. In explicit mode, a request with no marked boundaries doesn't use prompt caching. Breakpoints aren't supported in question instructions.

977 

978Check `usage.input_tokens_details.cached_tokens` for cache reads and `usage.input_tokens_details.cache_write_tokens` for cache writes. Both counts are included in `usage.input_tokens`; don't add them to that total. See the [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for caching concepts and the [Decisions reference](https://developers.openai.com/api/reference/resources/decisions/methods/create) for supported request controls.

979 

980## Monitor usage

981 

982Use `GET /v1/organization/usage/decisions` to retrieve your organization's Decisions token usage and request counts. Authenticate with an admin API key and the `api.usage.read` permission.

983 

984Choose a time range and bucket width, then filter or group the results by project, API key, or model. The `num_model_requests` field counts requests, not individual questions: a request with several questions counts once. See the [Decisions usage reference](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/usage/methods/decisions) for filters and pagination.

985 

853## Pricing and availability986## Pricing and availability

854 987 

855With `gpt-6-luna`, input costs **$0.10 per 1M tokens**. You pay only for input tokens: there are no cache-read, cache-write, or output-token charges.988With `gpt-6-luna`, uncached input costs **$0.10 per 1M tokens**. Prompt cache hits receive discounted input pricing; cache writes are charged. Cache-read and cache-write rates match the [standard `gpt-6-luna` prompt caching rates](https://developers.openai.com/api/docs/pricing). Output tokens are not charged.

856 989 

857Regional processing premiums and long-context input pricing multipliers apply. These rates apply to `/v1/decisions`; other requests using `gpt-6-luna` follow the applicable [model and processing-tier pricing](https://developers.openai.com/api/docs/pricing).990Regional processing premiums and long-context input pricing multipliers apply. These rates apply to `/v1/decisions`; other requests using `gpt-6-luna` follow the applicable [model and processing-tier pricing](https://developers.openai.com/api/docs/pricing).

858 991 

859The Decisions API supports Zero Data Retention (ZDR) and HIPAA use for eligible customers. Data residency and regional processing are supported in the United States and Europe (EEA + Switzerland). See [data controls](https://developers.openai.com/api/docs/guides/your-data) for eligibility requirements, required agreements, and limitations.992The Decisions API supports Zero Data Retention (ZDR) and HIPAA use for eligible customers. Data residency is available in all supported API regions. Regional processing is supported in the United States and Europe (EEA + Switzerland). See [data controls](https://developers.openai.com/api/docs/guides/your-data) for eligibility requirements, required agreements, and limitations.

860 993 

861## Add voice control994## Add voice control

862 995 

Details

8 8 

9## Create a transcription session9## Create a transcription session

10 10 

11Create a session with `type: "transcription"` and select `gpt-live-transcribe`. Connect with [WebSocket](https://developers.openai.com/api/docs/guides/voice-websockets?api=realtime) for server-side audio pipelines or [WebRTC](https://developers.openai.com/api/docs/guides/voice-webrtc?api=realtime) for browser audio.11For server-side WebSocket transcription with a standard API key, connect to `wss://api.openai.com/v1/realtime?intent=transcription`. Use the authentication header shown in the [WebSocket guide](https://developers.openai.com/api/docs/guides/voice-websockets?api=realtime), but omit `model` from the URL. That guide's model-based URL creates a conversation session and doesn't accept the transcription update below.

12 

13After the connection opens, send `session.update` with `type: "transcription"` and select `gpt-live-transcribe` in the session configuration. For browser audio, see [WebRTC](https://developers.openai.com/api/docs/guides/voice-webrtc?api=realtime).

12 14 

13```json15```json

14{16{

Details

534 });534 });

535 535 

536 const nextInput = [];536 const nextInput = [];

537 let completedResponseId;537 let completedResponse;

538 let responseId;538 let responseId;

539 let pendingInjections = 0;539 let pendingInjections = 0;

540 540 


573 }573 }

574 nextInput.push(...event.input);574 nextInput.push(...event.input);

575 } else if (event.type === "response.completed") {575 } else if (event.type === "response.completed") {

576 completedResponseId = event.response.id;576 completedResponse = event.response;

577 } else if (577 } else if (

578 event.type === "error" ||578 event.type === "error" ||

579 event.type === "response.failed" ||579 event.type === "response.failed" ||


582 throw new Error(JSON.stringify(event));582 throw new Error(JSON.stringify(event));

583 }583 }

584 584 

585 if (completedResponseId && pendingInjections === 0) break;585 if (completedResponse && pendingInjections === 0) break;

586 }586 }

587 587 

588 if (!completedResponseId) {588 if (!completedResponse) {

589 throw new Error("Connection ended before response.completed");589 throw new Error("Connection ended before response.completed");

590 }590 }

591 if (nextInput.length === 0) return;591 if (pendingInjections !== 0) {

592 throw new Error("Connection ended with unacknowledged tool results");

593 }

594 if (nextInput.length === 0) return completedResponse;

592 595 

593 previousResponseId = completedResponseId;596 previousResponseId = completedResponse.id;

594 pendingInput = nextInput;597 pendingInput = nextInput;

595 }598 }

596}599}


600});603});

601 604 

602try {605try {

603 await runMultiAgent(ws);606 const response = await runMultiAgent(ws);

607 const text = response.output

608 .flatMap((item) =>

609 item.type === "message" &&

610 item.agent?.agent_name === "/root" &&

611 item.phase === "final_answer"

612 ? item.content

613 : []

614 )

615 .filter((part) => part.type === "output_text")

616 .map((part) => part.text)

617 .join("");

618 console.log(text);

604} finally {619} finally {

605 ws.close();620 ws.close();

606}621}


725 740 

726 if completed_response is None:741 if completed_response is None:

727 raise RuntimeError("Connection ended before response.completed")742 raise RuntimeError("Connection ended before response.completed")

743 if pending_injections:

744 raise RuntimeError("Connection ended with unacknowledged tool results")

728 745 

729 if not next_input:746 if not next_input:

730 return completed_response747 return completed_response


736with client.beta.responses.connect(753with client.beta.responses.connect(

737 extra_headers={"OpenAI-Beta": "responses_multi_agent=v1"},754 extra_headers={"OpenAI-Beta": "responses_multi_agent=v1"},

738) as connection:755) as connection:

739 run_multi_agent(connection)756 response = run_multi_agent(connection)

757 print(

758 "".join(

759 part.text

760 for item in response.output

761 if (

762 item.type == "message"

763 and item.agent is not None

764 and item.agent.agent_name == "/root"

765 and item.phase == "final_answer"

766 )

767 for part in item.content

768 if part.type == "output_text"

769 )

770 )

740```771```

741 772 

742 773 

libraries.md +1 −1

Details

173<dependency>173<dependency>

174 <groupId>com.openai</groupId>174 <groupId>com.openai</groupId>

175 <artifactId>openai-java</artifactId>175 <artifactId>openai-java</artifactId>

176 <version>4.89.0</version>176 <version>4.90.0</version>

177</dependency>177</dependency>

178```178```

179 179 

quickstart.md +1 −1

Details

190<dependency>190<dependency>

191 <groupId>com.openai</groupId>191 <groupId>com.openai</groupId>

192 <artifactId>openai-java</artifactId>192 <artifactId>openai-java</artifactId>

193 <version>4.89.0</version>193 <version>4.90.0</version>

194</dependency>194</dependency>

195```195```

196 196