Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.47.0"
".": "4.48.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 277
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-44d4add500460ed21ac9ae1d6dd4047a32a79d3b4c3a9d9754f6ecf8cbdb9eec.yml
openapi_spec_hash: 8a34ba094583f56e975067493574fa69
config_hash: ca12d10f1dbe101a81cd0376f868c674
configured_endpoints: 278
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-31fcc3c97e5c432754bf0b72c5d5abbe1493573f0ca888af914baf81188b453e.yml
openapi_spec_hash: f867849a0c2a9c9b838d21f1c720a9e3
config_hash: fce3820c4f95b555e486349bc7d297d8
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 4.48.0 (2026-07-31)

Full Changelog: [v4.47.0...v4.48.0](https://github.com/openai/openai-java/compare/v4.47.0...v4.48.0)

### Features

* **api:** content provenance checks ([b89a308](https://github.com/openai/openai-java/commit/b89a3082b84d68cd7003f53397fb56cdd3062bd6))
* **api:** support the fast service tier for response compaction ([b89a308](https://github.com/openai/openai-java/commit/b89a3082b84d68cd7003f53397fb56cdd3062bd6))

## 4.47.0 (2026-07-30)

Full Changelog: [v4.46.0...v4.47.0](https://github.com/openai/openai-java/compare/v4.46.0...v4.47.0)
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

<!-- x-release-please-start-version -->

[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/4.47.0)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/4.47.0/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/4.47.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/4.48.0)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/4.48.0/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/4.48.0)

<!-- x-release-please-end -->

The OpenAI Java SDK provides convenient access to the [OpenAI REST API](https://platform.openai.com/docs) from applications written in Java.

<!-- x-release-please-start-version -->

The REST API documentation can be found on [platform.openai.com](https://platform.openai.com/docs). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.openai/openai-java/4.47.0).
The REST API documentation can be found on [platform.openai.com](https://platform.openai.com/docs). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.openai/openai-java/4.48.0).

<!-- x-release-please-end -->

Expand All @@ -22,7 +22,7 @@ The REST API documentation can be found on [platform.openai.com](https://platfor
### Gradle

```kotlin
implementation("com.openai:openai-java:4.47.0")
implementation("com.openai:openai-java:4.48.0")
```

### Maven
Expand All @@ -31,7 +31,7 @@ implementation("com.openai:openai-java:4.47.0")
<dependency>
<groupId>com.openai</groupId>
<artifactId>openai-java</artifactId>
<version>4.47.0</version>
<version>4.48.0</version>
</dependency>
```

Expand Down Expand Up @@ -94,7 +94,7 @@ with normal AWS credentials:
<!-- x-release-please-start-version -->

```kotlin
implementation("com.openai:openai-java-bedrock:4.47.0")
implementation("com.openai:openai-java-bedrock:4.48.0")
```

<!-- x-release-please-end -->
Expand Down
4 changes: 2 additions & 2 deletions bedrock.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ Use this artifact instead of adding AWS dependencies to the base OpenAI package
<!-- x-release-please-start-version -->

```kotlin
implementation("com.openai:openai-java-bedrock:4.47.0")
implementation("com.openai:openai-java-bedrock:4.48.0")
```

```xml
<dependency>
<groupId>com.openai</groupId>
<artifactId>openai-java-bedrock</artifactId>
<version>4.47.0</version>
<version>4.48.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ repositories {

allprojects {
group = "com.openai"
version = "4.47.0" // x-release-please-version
version = "4.48.0" // x-release-please-version

// Dokka 2.1.0 depends on Jackson 2.15.3. Keep its isolated build-tool classpaths on a
// secure, internally aligned Jackson release without changing the SDK's published or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.openai.services.blocking.BetaService
import com.openai.services.blocking.ChatService
import com.openai.services.blocking.CompletionService
import com.openai.services.blocking.ContainerService
import com.openai.services.blocking.ContentProvenanceCheckService
import com.openai.services.blocking.ConversationService
import com.openai.services.blocking.EmbeddingService
import com.openai.services.blocking.EvalService
Expand Down Expand Up @@ -87,6 +88,8 @@ interface OpenAIClient {
/** Given a prompt and/or an input image, the model will generate a new image. */
fun images(): ImageService

fun contentProvenanceChecks(): ContentProvenanceCheckService

fun audio(): AudioService

/** Given text and/or image inputs, classifies if those inputs are potentially harmful. */
Expand Down Expand Up @@ -175,6 +178,8 @@ interface OpenAIClient {
/** Given a prompt and/or an input image, the model will generate a new image. */
fun images(): ImageService.WithRawResponse

fun contentProvenanceChecks(): ContentProvenanceCheckService.WithRawResponse

fun audio(): AudioService.WithRawResponse

/** Given text and/or image inputs, classifies if those inputs are potentially harmful. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.openai.services.async.BetaServiceAsync
import com.openai.services.async.ChatServiceAsync
import com.openai.services.async.CompletionServiceAsync
import com.openai.services.async.ContainerServiceAsync
import com.openai.services.async.ContentProvenanceCheckServiceAsync
import com.openai.services.async.ConversationServiceAsync
import com.openai.services.async.EmbeddingServiceAsync
import com.openai.services.async.EvalServiceAsync
Expand Down Expand Up @@ -87,6 +88,8 @@ interface OpenAIClientAsync {
/** Given a prompt and/or an input image, the model will generate a new image. */
fun images(): ImageServiceAsync

fun contentProvenanceChecks(): ContentProvenanceCheckServiceAsync

fun audio(): AudioServiceAsync

/** Given text and/or image inputs, classifies if those inputs are potentially harmful. */
Expand Down Expand Up @@ -177,6 +180,8 @@ interface OpenAIClientAsync {
/** Given a prompt and/or an input image, the model will generate a new image. */
fun images(): ImageServiceAsync.WithRawResponse

fun contentProvenanceChecks(): ContentProvenanceCheckServiceAsync.WithRawResponse

fun audio(): AudioServiceAsync.WithRawResponse

/** Given text and/or image inputs, classifies if those inputs are potentially harmful. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import com.openai.services.async.CompletionServiceAsync
import com.openai.services.async.CompletionServiceAsyncImpl
import com.openai.services.async.ContainerServiceAsync
import com.openai.services.async.ContainerServiceAsyncImpl
import com.openai.services.async.ContentProvenanceCheckServiceAsync
import com.openai.services.async.ContentProvenanceCheckServiceAsyncImpl
import com.openai.services.async.ConversationServiceAsync
import com.openai.services.async.ConversationServiceAsyncImpl
import com.openai.services.async.EmbeddingServiceAsync
Expand Down Expand Up @@ -85,6 +87,10 @@ class OpenAIClientAsyncImpl(private val clientOptions: ClientOptions) : OpenAICl
ImageServiceAsyncImpl(clientOptionsWithUserAgent)
}

private val contentProvenanceChecks: ContentProvenanceCheckServiceAsync by lazy {
ContentProvenanceCheckServiceAsyncImpl(clientOptionsWithUserAgent)
}

private val audio: AudioServiceAsync by lazy {
AudioServiceAsyncImpl(clientOptionsWithUserAgent)
}
Expand Down Expand Up @@ -183,6 +189,9 @@ class OpenAIClientAsyncImpl(private val clientOptions: ClientOptions) : OpenAICl
/** Given a prompt and/or an input image, the model will generate a new image. */
override fun images(): ImageServiceAsync = images

override fun contentProvenanceChecks(): ContentProvenanceCheckServiceAsync =
contentProvenanceChecks

override fun audio(): AudioServiceAsync = audio

/** Given text and/or image inputs, classifies if those inputs are potentially harmful. */
Expand Down Expand Up @@ -250,6 +259,11 @@ class OpenAIClientAsyncImpl(private val clientOptions: ClientOptions) : OpenAICl
ImageServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}

private val contentProvenanceChecks:
ContentProvenanceCheckServiceAsync.WithRawResponse by lazy {
ContentProvenanceCheckServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}

private val audio: AudioServiceAsync.WithRawResponse by lazy {
AudioServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
Expand Down Expand Up @@ -352,6 +366,9 @@ class OpenAIClientAsyncImpl(private val clientOptions: ClientOptions) : OpenAICl
/** Given a prompt and/or an input image, the model will generate a new image. */
override fun images(): ImageServiceAsync.WithRawResponse = images

override fun contentProvenanceChecks(): ContentProvenanceCheckServiceAsync.WithRawResponse =
contentProvenanceChecks

override fun audio(): AudioServiceAsync.WithRawResponse = audio

/** Given text and/or image inputs, classifies if those inputs are potentially harmful. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import com.openai.services.blocking.CompletionService
import com.openai.services.blocking.CompletionServiceImpl
import com.openai.services.blocking.ContainerService
import com.openai.services.blocking.ContainerServiceImpl
import com.openai.services.blocking.ContentProvenanceCheckService
import com.openai.services.blocking.ContentProvenanceCheckServiceImpl
import com.openai.services.blocking.ConversationService
import com.openai.services.blocking.ConversationServiceImpl
import com.openai.services.blocking.EmbeddingService
Expand Down Expand Up @@ -83,6 +85,10 @@ class OpenAIClientImpl(private val clientOptions: ClientOptions) : OpenAIClient

private val images: ImageService by lazy { ImageServiceImpl(clientOptionsWithUserAgent) }

private val contentProvenanceChecks: ContentProvenanceCheckService by lazy {
ContentProvenanceCheckServiceImpl(clientOptionsWithUserAgent)
}

private val audio: AudioService by lazy { AudioServiceImpl(clientOptionsWithUserAgent) }

private val moderations: ModerationService by lazy {
Expand Down Expand Up @@ -163,6 +169,8 @@ class OpenAIClientImpl(private val clientOptions: ClientOptions) : OpenAIClient
/** Given a prompt and/or an input image, the model will generate a new image. */
override fun images(): ImageService = images

override fun contentProvenanceChecks(): ContentProvenanceCheckService = contentProvenanceChecks

override fun audio(): AudioService = audio

/** Given text and/or image inputs, classifies if those inputs are potentially harmful. */
Expand Down Expand Up @@ -230,6 +238,10 @@ class OpenAIClientImpl(private val clientOptions: ClientOptions) : OpenAIClient
ImageServiceImpl.WithRawResponseImpl(clientOptions)
}

private val contentProvenanceChecks: ContentProvenanceCheckService.WithRawResponse by lazy {
ContentProvenanceCheckServiceImpl.WithRawResponseImpl(clientOptions)
}

private val audio: AudioService.WithRawResponse by lazy {
AudioServiceImpl.WithRawResponseImpl(clientOptions)
}
Expand Down Expand Up @@ -332,6 +344,9 @@ class OpenAIClientImpl(private val clientOptions: ClientOptions) : OpenAIClient
/** Given a prompt and/or an input image, the model will generate a new image. */
override fun images(): ImageService.WithRawResponse = images

override fun contentProvenanceChecks(): ContentProvenanceCheckService.WithRawResponse =
contentProvenanceChecks

override fun audio(): AudioService.WithRawResponse = audio

/** Given text and/or image inputs, classifies if those inputs are potentially harmful. */
Expand Down
Loading
Loading