Skip to content

Commit c095a79

Browse files
feat(api): gpt-image-1.5
1 parent 282a4ba commit c095a79

File tree

15 files changed

+513
-191
lines changed

15 files changed

+513
-191
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 136
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-fe8e67bdc351a518b113ab48e775750190e207807903d6b03ab22c438c38a588.yml
3-
openapi_spec_hash: 8af972190647ffb9dcec516e19d8761a
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-cded37ac004364c2110ebdacf922ef611b3c51258790c72ca479dcfad4df66aa.yml
3+
openapi_spec_hash: 6e615d34cf8c6bc76e0c6933fc8569af
44
config_hash: d013f4fdd4dd59c6f376a9ca482b7f9e

openai-java-core/src/main/kotlin/com/openai/models/images/Image.kt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ private constructor(
3535
) : this(b64Json, revisedPrompt, url, mutableMapOf())
3636

3737
/**
38-
* The base64-encoded JSON of the generated image. Default value for `gpt-image-1`, and only
39-
* present if `response_format` is set to `b64_json` for `dall-e-2` and `dall-e-3`.
38+
* The base64-encoded JSON of the generated image. Returned by default for the GPT image models,
39+
* and only present if `response_format` is set to `b64_json` for `dall-e-2` and `dall-e-3`.
4040
*
4141
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
4242
* server responded with an unexpected value).
@@ -53,7 +53,7 @@ private constructor(
5353

5454
/**
5555
* When using `dall-e-2` or `dall-e-3`, the URL of the generated image if `response_format` is
56-
* set to `url` (default value). Unsupported for `gpt-image-1`.
56+
* set to `url` (default value). Unsupported for the GPT image models.
5757
*
5858
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
5959
* server responded with an unexpected value).
@@ -118,8 +118,9 @@ private constructor(
118118
}
119119

120120
/**
121-
* The base64-encoded JSON of the generated image. Default value for `gpt-image-1`, and only
122-
* present if `response_format` is set to `b64_json` for `dall-e-2` and `dall-e-3`.
121+
* The base64-encoded JSON of the generated image. Returned by default for the GPT image
122+
* models, and only present if `response_format` is set to `b64_json` for `dall-e-2` and
123+
* `dall-e-3`.
123124
*/
124125
fun b64Json(b64Json: String) = b64Json(JsonField.of(b64Json))
125126

@@ -147,7 +148,7 @@ private constructor(
147148

148149
/**
149150
* When using `dall-e-2` or `dall-e-3`, the URL of the generated image if `response_format`
150-
* is set to `url` (default value). Unsupported for `gpt-image-1`.
151+
* is set to `url` (default value). Unsupported for the GPT image models.
151152
*/
152153
fun url(url: String) = url(JsonField.of(url))
153154

openai-java-core/src/main/kotlin/com/openai/models/images/ImageEditCompletedEvent.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ private constructor(
120120
@JsonProperty("type") @ExcludeMissing fun _type(): JsonValue = type
121121

122122
/**
123-
* For `gpt-image-1` only, the token usage information for the image generation.
123+
* For the GPT image models only, the token usage information for the image generation.
124124
*
125125
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
126126
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -321,7 +321,7 @@ private constructor(
321321
*/
322322
fun type(type: JsonValue) = apply { this.type = type }
323323

324-
/** For `gpt-image-1` only, the token usage information for the image generation. */
324+
/** For the GPT image models only, the token usage information for the image generation. */
325325
fun usage(usage: Usage) = usage(JsonField.of(usage))
326326

327327
/**
@@ -974,7 +974,7 @@ private constructor(
974974
override fun toString() = value.toString()
975975
}
976976

977-
/** For `gpt-image-1` only, the token usage information for the image generation. */
977+
/** For the GPT image models only, the token usage information for the image generation. */
978978
class Usage
979979
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
980980
private constructor(

openai-java-core/src/main/kotlin/com/openai/models/images/ImageEditParams.kt

Lines changed: 92 additions & 78 deletions
Large diffs are not rendered by default.

openai-java-core/src/main/kotlin/com/openai/models/images/ImageGenCompletedEvent.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ private constructor(
120120
@JsonProperty("type") @ExcludeMissing fun _type(): JsonValue = type
121121

122122
/**
123-
* For `gpt-image-1` only, the token usage information for the image generation.
123+
* For the GPT image models only, the token usage information for the image generation.
124124
*
125125
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
126126
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -321,7 +321,7 @@ private constructor(
321321
*/
322322
fun type(type: JsonValue) = apply { this.type = type }
323323

324-
/** For `gpt-image-1` only, the token usage information for the image generation. */
324+
/** For the GPT image models only, the token usage information for the image generation. */
325325
fun usage(usage: Usage) = usage(JsonField.of(usage))
326326

327327
/**
@@ -974,7 +974,7 @@ private constructor(
974974
override fun toString() = value.toString()
975975
}
976976

977-
/** For `gpt-image-1` only, the token usage information for the image generation. */
977+
/** For the GPT image models only, the token usage information for the image generation. */
978978
class Usage
979979
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
980980
private constructor(

0 commit comments

Comments
 (0)