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.19.0"
".": "4.20.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: 136
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-bff810f46da56eff8d5e189b0d1f56ac07a8289723666138549d4239cad7c2ea.yml
openapi_spec_hash: 7532ce5a6f490c8f5d1e079c76c70535
config_hash: a1454ffd9612dee11f9d5a98e55eac9e
configured_endpoints: 147
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-47ef7e0aaa2f2052404041650c9b4d7d8c9c51c45ef2cb081548f329c3f81a6a.yml
openapi_spec_hash: 0207b30cf74121a12c1647e25463cee9
config_hash: 8dca0f2dc2706c07cf2f8d0ed4dc062e
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 4.20.0 (2026-02-10)

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

### Features

* **api:** skills and hosted shell ([fcd724d](https://github.com/openai/openai-java/commit/fcd724d2822b755ef44b9de8f9b5573d82271ce7))
* **api:** support for images in batch api ([c73908a](https://github.com/openai/openai-java/commit/c73908a19f26fa12350f7a5880401bd260420216))

## 4.19.0 (2026-02-09)

Full Changelog: [v4.18.0...v4.19.0](https://github.com/openai/openai-java/compare/v4.18.0...v4.19.0)
Expand Down
14 changes: 7 additions & 7 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.19.0)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/4.19.0/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/4.19.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/4.20.0)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/4.20.0/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/4.20.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.19.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.20.0).

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

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

```kotlin
implementation("com.openai:openai-java:4.19.0")
implementation("com.openai:openai-java:4.20.0")
```

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

Expand Down Expand Up @@ -1342,7 +1342,7 @@ If you're using Spring Boot, then you can use the SDK's [Spring Boot starter](ht
#### Gradle

```kotlin
implementation("com.openai:openai-java-spring-boot-starter:4.19.0")
implementation("com.openai:openai-java-spring-boot-starter:4.20.0")
```

#### Maven
Expand All @@ -1351,7 +1351,7 @@ implementation("com.openai:openai-java-spring-boot-starter:4.19.0")
<dependency>
<groupId>com.openai</groupId>
<artifactId>openai-java-spring-boot-starter</artifactId>
<version>4.19.0</version>
<version>4.20.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 @@ -8,7 +8,7 @@ repositories {

allprojects {
group = "com.openai"
version = "4.19.0" // x-release-please-version
version = "4.20.0" // x-release-please-version
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import com.openai.services.blocking.ModelService
import com.openai.services.blocking.ModerationService
import com.openai.services.blocking.RealtimeService
import com.openai.services.blocking.ResponseService
import com.openai.services.blocking.SkillService
import com.openai.services.blocking.UploadService
import com.openai.services.blocking.VectorStoreService
import com.openai.services.blocking.VideoService
Expand Down Expand Up @@ -102,6 +103,8 @@ interface OpenAIClient {

fun containers(): ContainerService

fun skills(): SkillService

fun videos(): VideoService

/**
Expand Down Expand Up @@ -167,6 +170,8 @@ interface OpenAIClient {

fun containers(): ContainerService.WithRawResponse

fun skills(): SkillService.WithRawResponse

fun videos(): VideoService.WithRawResponse
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import com.openai.services.async.ModelServiceAsync
import com.openai.services.async.ModerationServiceAsync
import com.openai.services.async.RealtimeServiceAsync
import com.openai.services.async.ResponseServiceAsync
import com.openai.services.async.SkillServiceAsync
import com.openai.services.async.UploadServiceAsync
import com.openai.services.async.VectorStoreServiceAsync
import com.openai.services.async.VideoServiceAsync
Expand Down Expand Up @@ -102,6 +103,8 @@ interface OpenAIClientAsync {

fun containers(): ContainerServiceAsync

fun skills(): SkillServiceAsync

fun videos(): VideoServiceAsync

/**
Expand Down Expand Up @@ -169,6 +172,8 @@ interface OpenAIClientAsync {

fun containers(): ContainerServiceAsync.WithRawResponse

fun skills(): SkillServiceAsync.WithRawResponse

fun videos(): VideoServiceAsync.WithRawResponse
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ import com.openai.services.async.RealtimeServiceAsync
import com.openai.services.async.RealtimeServiceAsyncImpl
import com.openai.services.async.ResponseServiceAsync
import com.openai.services.async.ResponseServiceAsyncImpl
import com.openai.services.async.SkillServiceAsync
import com.openai.services.async.SkillServiceAsyncImpl
import com.openai.services.async.UploadServiceAsync
import com.openai.services.async.UploadServiceAsyncImpl
import com.openai.services.async.VectorStoreServiceAsync
Expand Down Expand Up @@ -137,6 +139,10 @@ class OpenAIClientAsyncImpl(private val clientOptions: ClientOptions) : OpenAICl
ContainerServiceAsyncImpl(clientOptionsWithUserAgent)
}

private val skills: SkillServiceAsync by lazy {
SkillServiceAsyncImpl(clientOptionsWithUserAgent)
}

private val videos: VideoServiceAsync by lazy {
VideoServiceAsyncImpl(clientOptionsWithUserAgent)
}
Expand Down Expand Up @@ -188,6 +194,8 @@ class OpenAIClientAsyncImpl(private val clientOptions: ClientOptions) : OpenAICl

override fun containers(): ContainerServiceAsync = containers

override fun skills(): SkillServiceAsync = skills

override fun videos(): VideoServiceAsync = videos

override fun close() = clientOptions.close()
Expand Down Expand Up @@ -275,6 +283,10 @@ class OpenAIClientAsyncImpl(private val clientOptions: ClientOptions) : OpenAICl
ContainerServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}

private val skills: SkillServiceAsync.WithRawResponse by lazy {
SkillServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}

private val videos: VideoServiceAsync.WithRawResponse by lazy {
VideoServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
Expand Down Expand Up @@ -326,6 +338,8 @@ class OpenAIClientAsyncImpl(private val clientOptions: ClientOptions) : OpenAICl

override fun containers(): ContainerServiceAsync.WithRawResponse = containers

override fun skills(): SkillServiceAsync.WithRawResponse = skills

override fun videos(): VideoServiceAsync.WithRawResponse = videos
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ import com.openai.services.blocking.RealtimeService
import com.openai.services.blocking.RealtimeServiceImpl
import com.openai.services.blocking.ResponseService
import com.openai.services.blocking.ResponseServiceImpl
import com.openai.services.blocking.SkillService
import com.openai.services.blocking.SkillServiceImpl
import com.openai.services.blocking.UploadService
import com.openai.services.blocking.UploadServiceImpl
import com.openai.services.blocking.VectorStoreService
Expand Down Expand Up @@ -123,6 +125,8 @@ class OpenAIClientImpl(private val clientOptions: ClientOptions) : OpenAIClient
ContainerServiceImpl(clientOptionsWithUserAgent)
}

private val skills: SkillService by lazy { SkillServiceImpl(clientOptionsWithUserAgent) }

private val videos: VideoService by lazy { VideoServiceImpl(clientOptionsWithUserAgent) }

override fun async(): OpenAIClientAsync = async
Expand Down Expand Up @@ -172,6 +176,8 @@ class OpenAIClientImpl(private val clientOptions: ClientOptions) : OpenAIClient

override fun containers(): ContainerService = containers

override fun skills(): SkillService = skills

override fun videos(): VideoService = videos

override fun close() = clientOptions.close()
Expand Down Expand Up @@ -259,6 +265,10 @@ class OpenAIClientImpl(private val clientOptions: ClientOptions) : OpenAIClient
ContainerServiceImpl.WithRawResponseImpl(clientOptions)
}

private val skills: SkillService.WithRawResponse by lazy {
SkillServiceImpl.WithRawResponseImpl(clientOptions)
}

private val videos: VideoService.WithRawResponse by lazy {
VideoServiceImpl.WithRawResponseImpl(clientOptions)
}
Expand Down Expand Up @@ -310,6 +320,8 @@ class OpenAIClientImpl(private val clientOptions: ClientOptions) : OpenAIClient

override fun containers(): ContainerService.WithRawResponse = containers

override fun skills(): SkillService.WithRawResponse = skills

override fun videos(): VideoService.WithRawResponse = videos
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ private constructor(

/**
* The endpoint to be used for all requests in the batch. Currently `/v1/responses`,
* `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, and `/v1/moderations` are
* supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000
* embedding inputs across all requests in the batch.
* `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, `/v1/moderations`,
* `/v1/images/generations`, and `/v1/images/edits` are supported. Note that `/v1/embeddings`
* batches are also restricted to a maximum of 50,000 embedding inputs across all requests in
* the batch.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
Expand Down Expand Up @@ -197,9 +198,10 @@ private constructor(

/**
* The endpoint to be used for all requests in the batch. Currently `/v1/responses`,
* `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, and `/v1/moderations` are
* supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000
* embedding inputs across all requests in the batch.
* `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, `/v1/moderations`,
* `/v1/images/generations`, and `/v1/images/edits` are supported. Note that
* `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs
* across all requests in the batch.
*/
fun endpoint(endpoint: Endpoint) = apply { body.endpoint(endpoint) }

Expand Down Expand Up @@ -467,9 +469,10 @@ private constructor(

/**
* The endpoint to be used for all requests in the batch. Currently `/v1/responses`,
* `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, and `/v1/moderations` are
* supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000
* embedding inputs across all requests in the batch.
* `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, `/v1/moderations`,
* `/v1/images/generations`, and `/v1/images/edits` are supported. Note that
* `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs
* across all requests in the batch.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
Expand Down Expand Up @@ -624,9 +627,10 @@ private constructor(

/**
* The endpoint to be used for all requests in the batch. Currently `/v1/responses`,
* `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, and `/v1/moderations`
* are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of
* 50,000 embedding inputs across all requests in the batch.
* `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, `/v1/moderations`,
* `/v1/images/generations`, and `/v1/images/edits` are supported. Note that
* `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs
* across all requests in the batch.
*/
fun endpoint(endpoint: Endpoint) = endpoint(JsonField.of(endpoint))

Expand Down Expand Up @@ -943,9 +947,10 @@ private constructor(

/**
* The endpoint to be used for all requests in the batch. Currently `/v1/responses`,
* `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, and `/v1/moderations` are
* supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000
* embedding inputs across all requests in the batch.
* `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, `/v1/moderations`,
* `/v1/images/generations`, and `/v1/images/edits` are supported. Note that `/v1/embeddings`
* batches are also restricted to a maximum of 50,000 embedding inputs across all requests in
* the batch.
*/
class Endpoint @JsonCreator private constructor(private val value: JsonField<String>) : Enum {

Expand All @@ -971,6 +976,10 @@ private constructor(

@JvmField val V1_MODERATIONS = of("/v1/moderations")

@JvmField val V1_IMAGES_GENERATIONS = of("/v1/images/generations")

@JvmField val V1_IMAGES_EDITS = of("/v1/images/edits")

@JvmStatic fun of(value: String) = Endpoint(JsonField.of(value))
}

Expand All @@ -981,6 +990,8 @@ private constructor(
V1_EMBEDDINGS,
V1_COMPLETIONS,
V1_MODERATIONS,
V1_IMAGES_GENERATIONS,
V1_IMAGES_EDITS,
}

/**
Expand All @@ -998,6 +1009,8 @@ private constructor(
V1_EMBEDDINGS,
V1_COMPLETIONS,
V1_MODERATIONS,
V1_IMAGES_GENERATIONS,
V1_IMAGES_EDITS,
/** An enum member indicating that [Endpoint] was instantiated with an unknown value. */
_UNKNOWN,
}
Expand All @@ -1016,6 +1029,8 @@ private constructor(
V1_EMBEDDINGS -> Value.V1_EMBEDDINGS
V1_COMPLETIONS -> Value.V1_COMPLETIONS
V1_MODERATIONS -> Value.V1_MODERATIONS
V1_IMAGES_GENERATIONS -> Value.V1_IMAGES_GENERATIONS
V1_IMAGES_EDITS -> Value.V1_IMAGES_EDITS
else -> Value._UNKNOWN
}

Expand All @@ -1035,6 +1050,8 @@ private constructor(
V1_EMBEDDINGS -> Known.V1_EMBEDDINGS
V1_COMPLETIONS -> Known.V1_COMPLETIONS
V1_MODERATIONS -> Known.V1_MODERATIONS
V1_IMAGES_GENERATIONS -> Known.V1_IMAGES_GENERATIONS
V1_IMAGES_EDITS -> Known.V1_IMAGES_EDITS
else -> throw OpenAIInvalidDataException("Unknown Endpoint: $value")
}

Expand Down
Loading