Class Batch.Builder
- 
                    
                    - All Implemented Interfaces:
 
 public final class Batch.BuilderA builder for Batch. 
- 
                
                    
                    - 
                                
                            
                                Method SummaryModifier and Type Method Description final Batch.Builderid(String id)final Batch.Builderid(JsonField<String> id)Sets Builder.id to an arbitrary JSON value. final Batch.BuildercompletionWindow(String completionWindow)The time frame within which the batch should be processed. final Batch.BuildercompletionWindow(JsonField<String> completionWindow)Sets Builder.completionWindow to an arbitrary JSON value. final Batch.BuildercreatedAt(Long createdAt)The Unix timestamp (in seconds) for when the batch was created. final Batch.BuildercreatedAt(JsonField<Long> createdAt)Sets Builder.createdAt to an arbitrary JSON value. final Batch.Builderendpoint(String endpoint)The OpenAI API endpoint used by the batch. final Batch.Builderendpoint(JsonField<String> endpoint)Sets Builder.endpoint to an arbitrary JSON value. final Batch.BuilderinputFileId(String inputFileId)The ID of the input file for the batch. final Batch.BuilderinputFileId(JsonField<String> inputFileId)Sets Builder.inputFileId to an arbitrary JSON value. final Batch.Builderobject_(JsonValue object_)Sets the field to an arbitrary JSON value. final Batch.Builderstatus(Batch.Status status)The current status of the batch. final Batch.Builderstatus(JsonField<Batch.Status> status)Sets Builder.status to an arbitrary JSON value. final Batch.BuildercancelledAt(Long cancelledAt)The Unix timestamp (in seconds) for when the batch was cancelled. final Batch.BuildercancelledAt(JsonField<Long> cancelledAt)Sets Builder.cancelledAt to an arbitrary JSON value. final Batch.BuildercancellingAt(Long cancellingAt)The Unix timestamp (in seconds) for when the batch started cancelling. final Batch.BuildercancellingAt(JsonField<Long> cancellingAt)Sets Builder.cancellingAt to an arbitrary JSON value. final Batch.BuildercompletedAt(Long completedAt)The Unix timestamp (in seconds) for when the batch was completed. final Batch.BuildercompletedAt(JsonField<Long> completedAt)Sets Builder.completedAt to an arbitrary JSON value. final Batch.BuildererrorFileId(String errorFileId)The ID of the file containing the outputs of requests with errors. final Batch.BuildererrorFileId(JsonField<String> errorFileId)Sets Builder.errorFileId to an arbitrary JSON value. final Batch.Buildererrors(Batch.Errors errors)final Batch.Buildererrors(JsonField<Batch.Errors> errors)Sets Builder.errors to an arbitrary JSON value. final Batch.BuilderexpiredAt(Long expiredAt)The Unix timestamp (in seconds) for when the batch expired. final Batch.BuilderexpiredAt(JsonField<Long> expiredAt)Sets Builder.expiredAt to an arbitrary JSON value. final Batch.BuilderexpiresAt(Long expiresAt)The Unix timestamp (in seconds) for when the batch will expire. final Batch.BuilderexpiresAt(JsonField<Long> expiresAt)Sets Builder.expiresAt to an arbitrary JSON value. final Batch.BuilderfailedAt(Long failedAt)The Unix timestamp (in seconds) for when the batch failed. final Batch.BuilderfailedAt(JsonField<Long> failedAt)Sets Builder.failedAt to an arbitrary JSON value. final Batch.BuilderfinalizingAt(Long finalizingAt)The Unix timestamp (in seconds) for when the batch started finalizing. final Batch.BuilderfinalizingAt(JsonField<Long> finalizingAt)Sets Builder.finalizingAt to an arbitrary JSON value. final Batch.BuilderinProgressAt(Long inProgressAt)The Unix timestamp (in seconds) for when the batch started processing. final Batch.BuilderinProgressAt(JsonField<Long> inProgressAt)Sets Builder.inProgressAt to an arbitrary JSON value. final Batch.Buildermetadata(Batch.Metadata metadata)Set of 16 key-value pairs that can be attached to an object. final Batch.Buildermetadata(Optional<Batch.Metadata> metadata)Alias for calling Builder.metadata with metadata.orElse(null).final Batch.Buildermetadata(JsonField<Batch.Metadata> metadata)Sets Builder.metadata to an arbitrary JSON value. final Batch.Buildermodel(String model)Model ID used to process the batch, like gpt-5-2025-08-07.final Batch.Buildermodel(JsonField<String> model)Sets Builder.model to an arbitrary JSON value. final Batch.BuilderoutputFileId(String outputFileId)The ID of the file containing the outputs of successfully executed requests. final Batch.BuilderoutputFileId(JsonField<String> outputFileId)Sets Builder.outputFileId to an arbitrary JSON value. final Batch.BuilderrequestCounts(BatchRequestCounts requestCounts)The request counts for different statuses within the batch. final Batch.BuilderrequestCounts(JsonField<BatchRequestCounts> requestCounts)Sets Builder.requestCounts to an arbitrary JSON value. final Batch.Builderusage(BatchUsage usage)Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used. final Batch.Builderusage(JsonField<BatchUsage> usage)Sets Builder.usage to an arbitrary JSON value. final Batch.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final Batch.BuilderputAdditionalProperty(String key, JsonValue value)final Batch.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final Batch.BuilderremoveAdditionalProperty(String key)final Batch.BuilderremoveAllAdditionalProperties(Set<String> keys)final Batchbuild()Returns an immutable instance of Batch. - 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        idfinal Batch.Builder id(String id) 
 - 
                                        idfinal Batch.Builder id(JsonField<String> id) Sets Builder.id to an arbitrary JSON value. You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        completionWindowfinal Batch.Builder completionWindow(String completionWindow) The time frame within which the batch should be processed. 
 - 
                                        completionWindowfinal Batch.Builder completionWindow(JsonField<String> completionWindow) Sets Builder.completionWindow to an arbitrary JSON value. You should usually call Builder.completionWindow with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        createdAtfinal Batch.Builder createdAt(Long createdAt) The Unix timestamp (in seconds) for when the batch was created. 
 - 
                                        createdAtfinal Batch.Builder createdAt(JsonField<Long> createdAt) Sets Builder.createdAt to an arbitrary JSON value. You should usually call Builder.createdAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        endpointfinal Batch.Builder endpoint(String endpoint) The OpenAI API endpoint used by the batch. 
 - 
                                        endpointfinal Batch.Builder endpoint(JsonField<String> endpoint) Sets Builder.endpoint to an arbitrary JSON value. You should usually call Builder.endpoint with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        inputFileIdfinal Batch.Builder inputFileId(String inputFileId) The ID of the input file for the batch. 
 - 
                                        inputFileIdfinal Batch.Builder inputFileId(JsonField<String> inputFileId) Sets Builder.inputFileId to an arbitrary JSON value. You should usually call Builder.inputFileId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        object_final Batch.Builder object_(JsonValue object_) Sets the field to an arbitrary JSON value. It is usually unnecessary to call this method because the field defaults to the following: JsonValue.from("batch")This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        statusfinal Batch.Builder status(Batch.Status status) The current status of the batch. 
 - 
                                        statusfinal Batch.Builder status(JsonField<Batch.Status> status) Sets Builder.status to an arbitrary JSON value. You should usually call Builder.status with a well-typed Status value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        cancelledAtfinal Batch.Builder cancelledAt(Long cancelledAt) The Unix timestamp (in seconds) for when the batch was cancelled. 
 - 
                                        cancelledAtfinal Batch.Builder cancelledAt(JsonField<Long> cancelledAt) Sets Builder.cancelledAt to an arbitrary JSON value. You should usually call Builder.cancelledAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        cancellingAtfinal Batch.Builder cancellingAt(Long cancellingAt) The Unix timestamp (in seconds) for when the batch started cancelling. 
 - 
                                        cancellingAtfinal Batch.Builder cancellingAt(JsonField<Long> cancellingAt) Sets Builder.cancellingAt to an arbitrary JSON value. You should usually call Builder.cancellingAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        completedAtfinal Batch.Builder completedAt(Long completedAt) The Unix timestamp (in seconds) for when the batch was completed. 
 - 
                                        completedAtfinal Batch.Builder completedAt(JsonField<Long> completedAt) Sets Builder.completedAt to an arbitrary JSON value. You should usually call Builder.completedAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        errorFileIdfinal Batch.Builder errorFileId(String errorFileId) The ID of the file containing the outputs of requests with errors. 
 - 
                                        errorFileIdfinal Batch.Builder errorFileId(JsonField<String> errorFileId) Sets Builder.errorFileId to an arbitrary JSON value. You should usually call Builder.errorFileId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        errorsfinal Batch.Builder errors(Batch.Errors errors) 
 - 
                                        errorsfinal Batch.Builder errors(JsonField<Batch.Errors> errors) Sets Builder.errors to an arbitrary JSON value. You should usually call Builder.errors with a well-typed Errors value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        expiredAtfinal Batch.Builder expiredAt(Long expiredAt) The Unix timestamp (in seconds) for when the batch expired. 
 - 
                                        expiredAtfinal Batch.Builder expiredAt(JsonField<Long> expiredAt) Sets Builder.expiredAt to an arbitrary JSON value. You should usually call Builder.expiredAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        expiresAtfinal Batch.Builder expiresAt(Long expiresAt) The Unix timestamp (in seconds) for when the batch will expire. 
 - 
                                        expiresAtfinal Batch.Builder expiresAt(JsonField<Long> expiresAt) Sets Builder.expiresAt to an arbitrary JSON value. You should usually call Builder.expiresAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        failedAtfinal Batch.Builder failedAt(Long failedAt) The Unix timestamp (in seconds) for when the batch failed. 
 - 
                                        failedAtfinal Batch.Builder failedAt(JsonField<Long> failedAt) Sets Builder.failedAt to an arbitrary JSON value. You should usually call Builder.failedAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        finalizingAtfinal Batch.Builder finalizingAt(Long finalizingAt) The Unix timestamp (in seconds) for when the batch started finalizing. 
 - 
                                        finalizingAtfinal Batch.Builder finalizingAt(JsonField<Long> finalizingAt) Sets Builder.finalizingAt to an arbitrary JSON value. You should usually call Builder.finalizingAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        inProgressAtfinal Batch.Builder inProgressAt(Long inProgressAt) The Unix timestamp (in seconds) for when the batch started processing. 
 - 
                                        inProgressAtfinal Batch.Builder inProgressAt(JsonField<Long> inProgressAt) Sets Builder.inProgressAt to an arbitrary JSON value. You should usually call Builder.inProgressAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        metadatafinal Batch.Builder metadata(Batch.Metadata metadata) Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. 
 - 
                                        metadatafinal Batch.Builder metadata(Optional<Batch.Metadata> metadata) Alias for calling Builder.metadata with metadata.orElse(null).
 - 
                                        metadatafinal Batch.Builder metadata(JsonField<Batch.Metadata> metadata) Sets Builder.metadata to an arbitrary JSON value. You should usually call Builder.metadata with a well-typed Metadata value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        modelfinal Batch.Builder model(String model) Model ID used to process the batch, like gpt-5-2025-08-07. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the model guide to browse and compare available models.
 - 
                                        modelfinal Batch.Builder model(JsonField<String> model) Sets Builder.model to an arbitrary JSON value. You should usually call Builder.model with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        outputFileIdfinal Batch.Builder outputFileId(String outputFileId) The ID of the file containing the outputs of successfully executed requests. 
 - 
                                        outputFileIdfinal Batch.Builder outputFileId(JsonField<String> outputFileId) Sets Builder.outputFileId to an arbitrary JSON value. You should usually call Builder.outputFileId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        requestCountsfinal Batch.Builder requestCounts(BatchRequestCounts requestCounts) The request counts for different statuses within the batch. 
 - 
                                        requestCountsfinal Batch.Builder requestCounts(JsonField<BatchRequestCounts> requestCounts) Sets Builder.requestCounts to an arbitrary JSON value. You should usually call Builder.requestCounts with a well-typed BatchRequestCounts value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        usagefinal Batch.Builder usage(BatchUsage usage) Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used. Only populated on batches created after September 7, 2025. 
 - 
                                        usagefinal Batch.Builder usage(JsonField<BatchUsage> usage) Sets Builder.usage to an arbitrary JSON value. You should usually call Builder.usage with a well-typed BatchUsage value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        additionalPropertiesfinal Batch.Builder additionalProperties(Map<String, JsonValue> additionalProperties) 
 - 
                                        putAdditionalPropertyfinal Batch.Builder putAdditionalProperty(String key, JsonValue value) 
 - 
                                        putAllAdditionalPropertiesfinal Batch.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties) 
 - 
                                        removeAdditionalPropertyfinal Batch.Builder removeAdditionalProperty(String key) 
 - 
                                        removeAllAdditionalPropertiesfinal Batch.Builder removeAllAdditionalProperties(Set<String> keys) 
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-