Skip to content
Closed
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
14 changes: 7 additions & 7 deletions .castiron.stats.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
schema_version: 1
generation_id: 43a1b7cc-09da-4086-8fd1-456f14112910
openapi_spec_hash: 0ac5ea4ab2546a188a36a0d370367637
openapi_transformed_spec_hash: 6be6c39576ec27111cab26c251d2ab65
config_hash: d92ec885ac2a08b6a4c1ff90420f0327
codegen_sha: 440da83c56fffec6c18a4da2ce5b52b404668edf
codegen_hash: a2790b8eaf45c2658d61b1117235b43ddf5443dbc5e081fa949ce331c49d7e73
public_codegen_sha: 1247c65d31e710b2a6f77ca801065faf3fd59f67
generation_id: 36424a6d-29e7-4d76-a33c-b1d80eecb75b
openapi_spec_hash: 0cb51423f74235e850a5f1961f31c167
openapi_transformed_spec_hash: 70d190d2b54dd216f7280d9fd94363f0
config_hash: d7b82262337a543ff59106e4a32ead4e
codegen_sha: 1f1e7fdb2076f412b0a3a2fba45e5585155be07a
codegen_hash: 782c20ae20f5648db19d23e2e9dd374d70334343cabea0a89de2d92656e1ad89
public_codegen_sha: 8e2c04546082f3776ca3fa37aca8b5886550f6c1
1,020 changes: 598 additions & 422 deletions api_reference/openapi.transformed.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/cmd/adminorganizationauditlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var adminOrganizationAuditLogsList = requestflag.WithInnerFlags(cli.Command{
},
&requestflag.Flag[[]string]{
Name: "event-type",
Usage: "Return only events with a `type` in one of these values. For example, `project.created`. For all options, see the documentation for the [audit log object](https://platform.openai.com/docs/api-reference/audit-logs/object).",
Usage: "Return only events with a `type` in one of these values. For example, `project.created`. For all options, see the documentation for the [audit log object](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/audit_logs).",
QueryPath: "event_types",
},
&requestflag.Flag[int64]{
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/adminorganizationproject.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var adminOrganizationProjectsCreate = cli.Command{
},
&requestflag.Flag[*string]{
Name: "geography",
Usage: "Create the project with the specified data residency region. Your organization must have access to Data residency functionality in order to use. See [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field.\nDeprecated: use `residency` instead. Do not provide both `geography` and `residency`.",
Usage: "Create the project with the specified data residency region. Your organization must have access to Data residency functionality in order to use. See [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field.\nDeprecated: use `residency` instead. Do not provide both `geography` and `residency`.",
BodyPath: "geography",
},
&requestflag.Flag[*string]{
Expand Down
5 changes: 5 additions & 0 deletions pkg/cmd/adminorganizationprojectserviceaccount.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ var adminOrganizationProjectsServiceAccountsCreate = cli.Command{
Usage: "Create the service account without default roles or an API key.",
BodyPath: "create_service_account_only",
},
&requestflag.Flag[*int64]{
Name: "expires-in-seconds",
Usage: "Number of seconds until the initial API key expires. If omitted or null, the key does not expire unless the effective organization or project policy requires an expiration. When a policy sets a maximum lifetime, this value must be provided and must not exceed that limit. A non-null value cannot be used when `create_service_account_only` is true.",
BodyPath: "expires_in_seconds",
},
Comment thread
markstuart-oai marked this conversation as resolved.
},
Action: handleAdminOrganizationProjectsServiceAccountsCreate,
HideHelpCommand: true,
Expand Down
6 changes: 4 additions & 2 deletions pkg/cmd/adminorganizationprojectserviceaccount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ func TestAdminOrganizationProjectsServiceAccountsCreate(t *testing.T) {
"admin:organization:projects:service-accounts", "create",
"--project-id", "project_id",
"--name", "name",
"--create-service-account-only=true",
"--create-service-account-only=false",
"--expires-in-seconds", "1",
)
})

t.Run("piping data", func(t *testing.T) {
// Test piping YAML data over stdin
pipeData := []byte("" +
"name: name\n" +
"create_service_account_only: true\n")
"create_service_account_only: false\n" +
"expires_in_seconds: 1\n")
mocktest.TestRunMockTestWithPipeAndFlags(
t, pipeData,
"--api-key", "string",
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/audiospeech.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ var audioSpeechCreate = cli.Command{
},
&requestflag.Flag[string]{
Name: "model",
Usage: "One of the available [TTS models](https://platform.openai.com/docs/models#tts): `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`.\n",
Usage: "One of the available [TTS models](https://developers.openai.com/api/docs/guides/text-to-speech): `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`.\n",
Required: true,
BodyPath: "model",
},
&requestflag.Flag[any]{
Name: "voice",
Usage: "The voice to use when generating the audio. Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice object with an `id`, for example `{ \"id\": \"voice_1234\" }`. Previews of the voices are available in the [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).",
Usage: "The voice to use when generating the audio. Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice object with an `id`, for example `{ \"id\": \"voice_1234\" }`. Previews of the voices are available in the [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).",
Required: true,
BodyPath: "voice",
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/audiotranscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var audioTranscriptionsCreate = cli.Command{
},
&requestflag.Flag[string]{
Name: "prompt",
Usage: "An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`.\n",
Usage: "An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`.\n",
BodyPath: "prompt",
},
&requestflag.Flag[string]{
Expand All @@ -80,7 +80,7 @@ var audioTranscriptionsCreate = cli.Command{
},
&requestflag.Flag[*bool]{
Name: "stream",
Usage: "If set to true, the model response data will be streamed to the client\nas it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\nSee the [Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions)\nfor more information.\n\nNote: Streaming is not supported for the `whisper-1` model and will be ignored.\n",
Usage: "If set to true, the model response data will be streamed to the client\nas it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\nSee the [Streaming section of the Speech-to-Text guide](https://developers.openai.com/api/docs/guides/speech-to-text?lang=curl#streaming)\nfor more information.\n\nNote: Streaming is not supported for the `whisper-1` model and will be ignored.\n",
Default: requestflag.Ptr[bool](false),
BodyPath: "stream",
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/audiotranslation.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var audioTranslationsCreate = cli.Command{
},
&requestflag.Flag[string]{
Name: "prompt",
Usage: "An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should be in English.\n",
Usage: "An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should be in English.\n",
BodyPath: "prompt",
},
&requestflag.Flag[string]{
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var batchesCreate = requestflag.WithInnerFlags(cli.Command{
},
&requestflag.Flag[string]{
Name: "input-file-id",
Usage: "The ID of an uploaded file that contains requests for the new batch.\n\nSee [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file.\n\nYour input file must be formatted as a [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size.\n",
Usage: "The ID of an uploaded file that contains requests for the new batch.\n\nSee [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) for how to upload a file.\n\nYour input file must be formatted as a [JSONL file](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size.\n",
Required: true,
BodyPath: "input_file_id",
},
Expand Down
12 changes: 6 additions & 6 deletions pkg/cmd/betaassistant.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var betaAssistantsCreate = requestflag.WithInnerFlags(cli.Command{
Flags: []cli.Flag{
&requestflag.Flag[string]{
Name: "model",
Usage: "ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them.\n",
Usage: "ID of the model to use. You can use the [List models](https://developers.openai.com/api/reference/resources/models/methods/list) API to see all of your available models, or see our [Model overview](https://developers.openai.com/api/docs/models) for descriptions of them.\n",
Required: true,
BodyPath: "model",
},
Expand All @@ -47,13 +47,13 @@ var betaAssistantsCreate = requestflag.WithInnerFlags(cli.Command{
},
&requestflag.Flag[*string]{
Name: "reasoning-effort",
Usage: "Constrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](https://platform.openai.com/docs/guides/reasoning)\nfor model-specific support.\n",
Usage: "Constrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](https://developers.openai.com/api/docs/guides/reasoning)\nfor model-specific support.\n",
Default: requestflag.Ptr[string]("medium"),
BodyPath: "reasoning_effort",
},
&requestflag.Flag[any]{
Name: "response-format",
Usage: "Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which ensures the message the model generates is valid JSON.\n\n**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.\n",
Usage: "Specifies the format that the model must output. Compatible with [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which ensures the message the model generates is valid JSON.\n\n**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.\n",
BodyPath: "response_format",
},
&requestflag.Flag[*float64]{
Expand Down Expand Up @@ -137,7 +137,7 @@ var betaAssistantsUpdate = requestflag.WithInnerFlags(cli.Command{
},
&requestflag.Flag[string]{
Name: "model",
Usage: "ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them.\n",
Usage: "ID of the model to use. You can use the [List models](https://developers.openai.com/api/reference/resources/models/methods/list) API to see all of your available models, or see our [Model overview](https://developers.openai.com/api/docs/models) for descriptions of them.\n",
BodyPath: "model",
},
&requestflag.Flag[*string]{
Expand All @@ -147,13 +147,13 @@ var betaAssistantsUpdate = requestflag.WithInnerFlags(cli.Command{
},
&requestflag.Flag[*string]{
Name: "reasoning-effort",
Usage: "Constrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](https://platform.openai.com/docs/guides/reasoning)\nfor model-specific support.\n",
Usage: "Constrains effort on reasoning for reasoning models. Currently supported\nvalues are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.\nReducing reasoning effort can result in faster responses and fewer tokens\nused on reasoning in a response. Not all reasoning models support every\nvalue. See the\n[reasoning guide](https://developers.openai.com/api/docs/guides/reasoning)\nfor model-specific support.\n",
Default: requestflag.Ptr[string]("medium"),
BodyPath: "reasoning_effort",
},
&requestflag.Flag[any]{
Name: "response-format",
Usage: "Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which ensures the message the model generates is valid JSON.\n\n**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.\n",
Usage: "Specifies the format that the model must output. Compatible with [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which ensures the message the model generates is valid JSON.\n\n**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.\n",
BodyPath: "response_format",
},
&requestflag.Flag[*float64]{
Expand Down
Loading