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
8 changes: 4 additions & 4 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 8b6cd71c-ea04-44da-af45-e43968b5928d
management:
docChecksum: 973d42c85e29be093122e32bf9e93222
docChecksum: 72770d47aad60a8f1a16b4613e8d1ca3
docVersion: 1.0.0
speakeasyVersion: 1.651.0
speakeasyVersion: 1.652.0
generationVersion: 2.745.2
releaseVersion: 0.1.6
configChecksum: e27fc703d71f79dfd40a863b5853fe72
releaseVersion: 0.1.7
configChecksum: bf32e6ab7422922b4cca9c193ae8e0fb
repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git
installationURL: https://github.com/OpenRouterTeam/typescript-sdk
published: true
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ generation:
generateNewTests: true
skipResponseBodyAssertions: false
typescript:
version: 0.1.6
version: 0.1.7
acceptHeaderEnum: false
additionalDependencies:
dependencies: {}
Expand Down
5 changes: 5 additions & 0 deletions .speakeasy/in.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8130,6 +8130,11 @@ paths:
type: number
description: Credit limit for the API key to be created
example: 100
expires_at:
type: string
nullable: true
format: date-time
description: Optional expiration time for the API key to be created
required:
- callback_url
example:
Expand Down
7 changes: 6 additions & 1 deletion .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -414,12 +414,12 @@ components:
result:
type: string
nullable: true
default: null
status:
$ref: '#/components/schemas/ImageGenerationStatus'
required:
- type
- id
- result
- status
example:
type: image_generation_call
Expand Down Expand Up @@ -8138,6 +8138,11 @@ paths:
type: number
description: Credit limit for the API key to be created
example: 100
expires_at:
type: string
nullable: true
format: date-time
description: Optional expiration time for the API key to be created
required:
- callback_url
example:
Expand Down
13 changes: 7 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
speakeasyVersion: 1.651.0
speakeasyVersion: 1.652.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:73beb40e7db6cb1d1bfbc364fd655f9ebdf6f9d6b3f1a71836a3a851d07e5d80
sourceBlobDigest: sha256:ab3d90309e030249c89844dba54d28dc758bee9c5749ddfd961e4bb844bc5128
sourceRevisionDigest: sha256:6ebac1e729591ec2c09e69bd6be79efd3b92d8c096be40905b2622ba9d55216a
sourceBlobDigest: sha256:77e4e4e1005c72b7f3229453613f1d7aaa997abf08a2fc66523d55a5dbcd8556
tags:
- latest
- staging
- 1.0.0
targets:
openrouter:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:73beb40e7db6cb1d1bfbc364fd655f9ebdf6f9d6b3f1a71836a3a851d07e5d80
sourceBlobDigest: sha256:ab3d90309e030249c89844dba54d28dc758bee9c5749ddfd961e4bb844bc5128
sourceRevisionDigest: sha256:6ebac1e729591ec2c09e69bd6be79efd3b92d8c096be40905b2622ba9d55216a
sourceBlobDigest: sha256:77e4e4e1005c72b7f3229453613f1d7aaa997abf08a2fc66523d55a5dbcd8556
codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples
codeSamplesRevisionDigest: sha256:b6196f12c8fcc8d875b535837a4bd70c5312256f43a98034d60c6fbca000ed87
codeSamplesRevisionDigest: sha256:723294fa9e26e899e01d155bf97971b1d0c207dac0426ee48887ffeae95fab1a
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
3 changes: 2 additions & 1 deletion docs/models/operations/createauthkeyscoderequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ let value: CreateAuthKeysCodeRequest = {
| `callbackUrl` | *string* | :heavy_check_mark: | The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed. | https://myapp.com/auth/callback |
| `codeChallenge` | *string* | :heavy_minus_sign: | PKCE code challenge for enhanced security | E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM |
| `codeChallengeMethod` | [operations.CreateAuthKeysCodeCodeChallengeMethod](../../models/operations/createauthkeyscodecodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 |
| `limit` | *number* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 |
| `limit` | *number* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 |
| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Optional expiration time for the API key to be created | |
2 changes: 1 addition & 1 deletion docs/models/outputitemimagegenerationcall.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ let value: OutputItemImageGenerationCall = {
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `type` | [models.OutputItemImageGenerationCallType](../models/outputitemimagegenerationcalltype.md) | :heavy_check_mark: | N/A | |
| `id` | *string* | :heavy_check_mark: | N/A | |
| `result` | *string* | :heavy_check_mark: | N/A | |
| `result` | *string* | :heavy_minus_sign: | N/A | |
| `status` | [models.ImageGenerationStatus](../models/imagegenerationstatus.md) | :heavy_check_mark: | N/A | completed |
2 changes: 1 addition & 1 deletion docs/models/responsesimagegenerationcall.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ let value: ResponsesImageGenerationCall = {
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `type` | [models.ResponsesImageGenerationCallType](../models/responsesimagegenerationcalltype.md) | :heavy_check_mark: | N/A | |
| `id` | *string* | :heavy_check_mark: | N/A | |
| `result` | *string* | :heavy_check_mark: | N/A | |
| `result` | *string* | :heavy_minus_sign: | N/A | |
| `status` | [models.ImageGenerationStatus](../models/imagegenerationstatus.md) | :heavy_check_mark: | N/A | completed |
3 changes: 2 additions & 1 deletion examples/nextjs-example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
"name": "@openrouter/sdk",
"version": "0.1.6",
"version": "0.1.7",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openrouter/sdk",
"version": "0.1.6",
"version": "0.1.7",
"author": "OpenRouter",
"description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API.",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "1.0.0",
sdkVersion: "0.1.6",
sdkVersion: "0.1.7",
genVersion: "2.745.2",
userAgent: "speakeasy-sdk/typescript 0.1.6 2.745.2 1.0.0 @openrouter/sdk",
userAgent: "speakeasy-sdk/typescript 0.1.7 2.745.2 1.0.0 @openrouter/sdk",
} as const;
8 changes: 4 additions & 4 deletions src/models/openairesponsesinputunion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,19 +195,19 @@ export type OpenAIResponsesInputMessage1 = {
export type OpenAIResponsesInputUnion1 =
| OpenAIResponsesInputFunctionCallOutput
| OpenAIResponsesInputFunctionCall
| OutputItemImageGenerationCall
| OutputMessage
| OpenAIResponsesInputMessage2
| OutputItemImageGenerationCall
| OpenAIResponsesInputMessage1;

export type OpenAIResponsesInputUnion =
| string
| Array<
| OpenAIResponsesInputFunctionCallOutput
| OpenAIResponsesInputFunctionCall
| OutputItemImageGenerationCall
| OutputMessage
| OpenAIResponsesInputMessage2
| OutputItemImageGenerationCall
| OpenAIResponsesInputMessage1
>
| any;
Expand Down Expand Up @@ -585,9 +585,9 @@ export const OpenAIResponsesInputUnion1$inboundSchema: z.ZodType<
> = z.union([
z.lazy(() => OpenAIResponsesInputFunctionCallOutput$inboundSchema),
z.lazy(() => OpenAIResponsesInputFunctionCall$inboundSchema),
OutputItemImageGenerationCall$inboundSchema,
OutputMessage$inboundSchema,
z.lazy(() => OpenAIResponsesInputMessage2$inboundSchema),
OutputItemImageGenerationCall$inboundSchema,
z.lazy(() => OpenAIResponsesInputMessage1$inboundSchema),
]);

Expand All @@ -610,9 +610,9 @@ export const OpenAIResponsesInputUnion$inboundSchema: z.ZodType<
z.array(z.union([
z.lazy(() => OpenAIResponsesInputFunctionCallOutput$inboundSchema),
z.lazy(() => OpenAIResponsesInputFunctionCall$inboundSchema),
OutputItemImageGenerationCall$inboundSchema,
OutputMessage$inboundSchema,
z.lazy(() => OpenAIResponsesInputMessage2$inboundSchema),
OutputItemImageGenerationCall$inboundSchema,
z.lazy(() => OpenAIResponsesInputMessage1$inboundSchema),
])),
z.any(),
Expand Down
12 changes: 6 additions & 6 deletions src/models/openresponsesinput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ export type OpenResponsesInput1 =
| ResponsesOutputMessage
| ResponsesOutputItemFunctionCall
| ResponsesOutputItemFileSearchCall
| ResponsesImageGenerationCall
| OpenResponsesReasoning
| ResponsesWebSearchCallOutput
| ResponsesImageGenerationCall
| OpenResponsesEasyInputMessage
| OpenResponsesInputMessageItem
| ResponsesOutputItemReasoning;
Expand All @@ -83,9 +83,9 @@ export type OpenResponsesInput =
| ResponsesOutputMessage
| ResponsesOutputItemFunctionCall
| ResponsesOutputItemFileSearchCall
| ResponsesImageGenerationCall
| OpenResponsesReasoning
| ResponsesWebSearchCallOutput
| ResponsesImageGenerationCall
| OpenResponsesEasyInputMessage
| OpenResponsesInputMessageItem
| ResponsesOutputItemReasoning
Expand All @@ -98,9 +98,9 @@ export type OpenResponsesInput1$Outbound =
| ResponsesOutputMessage$Outbound
| ResponsesOutputItemFunctionCall$Outbound
| ResponsesOutputItemFileSearchCall$Outbound
| ResponsesImageGenerationCall$Outbound
| OpenResponsesReasoning$Outbound
| ResponsesWebSearchCallOutput$Outbound
| ResponsesImageGenerationCall$Outbound
| OpenResponsesEasyInputMessage$Outbound
| OpenResponsesInputMessageItem$Outbound
| ResponsesOutputItemReasoning$Outbound;
Expand All @@ -115,9 +115,9 @@ export const OpenResponsesInput1$outboundSchema: z.ZodType<
ResponsesOutputMessage$outboundSchema,
ResponsesOutputItemFunctionCall$outboundSchema,
ResponsesOutputItemFileSearchCall$outboundSchema,
ResponsesImageGenerationCall$outboundSchema,
OpenResponsesReasoning$outboundSchema,
ResponsesWebSearchCallOutput$outboundSchema,
ResponsesImageGenerationCall$outboundSchema,
OpenResponsesEasyInputMessage$outboundSchema,
OpenResponsesInputMessageItem$outboundSchema,
ResponsesOutputItemReasoning$outboundSchema,
Expand All @@ -140,9 +140,9 @@ export type OpenResponsesInput$Outbound =
| ResponsesOutputMessage$Outbound
| ResponsesOutputItemFunctionCall$Outbound
| ResponsesOutputItemFileSearchCall$Outbound
| ResponsesImageGenerationCall$Outbound
| OpenResponsesReasoning$Outbound
| ResponsesWebSearchCallOutput$Outbound
| ResponsesImageGenerationCall$Outbound
| OpenResponsesEasyInputMessage$Outbound
| OpenResponsesInputMessageItem$Outbound
| ResponsesOutputItemReasoning$Outbound
Expand All @@ -161,9 +161,9 @@ export const OpenResponsesInput$outboundSchema: z.ZodType<
ResponsesOutputMessage$outboundSchema,
ResponsesOutputItemFunctionCall$outboundSchema,
ResponsesOutputItemFileSearchCall$outboundSchema,
ResponsesImageGenerationCall$outboundSchema,
OpenResponsesReasoning$outboundSchema,
ResponsesWebSearchCallOutput$outboundSchema,
ResponsesImageGenerationCall$outboundSchema,
OpenResponsesEasyInputMessage$outboundSchema,
OpenResponsesInputMessageItem$outboundSchema,
ResponsesOutputItemReasoning$outboundSchema,
Expand Down
7 changes: 7 additions & 0 deletions src/models/operations/createauthkeyscode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export type CreateAuthKeysCodeRequest = {
* Credit limit for the API key to be created
*/
limit?: number | undefined;
/**
* Optional expiration time for the API key to be created
*/
expiresAt?: Date | null | undefined;
};

/**
Expand Down Expand Up @@ -85,6 +89,7 @@ export type CreateAuthKeysCodeRequest$Outbound = {
code_challenge?: string | undefined;
code_challenge_method?: string | undefined;
limit?: number | undefined;
expires_at?: string | null | undefined;
};

/** @internal */
Expand All @@ -97,11 +102,13 @@ export const CreateAuthKeysCodeRequest$outboundSchema: z.ZodType<
codeChallengeMethod: CreateAuthKeysCodeCodeChallengeMethod$outboundSchema
.optional(),
limit: z.number().optional(),
expiresAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
}).transform((v) => {
return remap$(v, {
callbackUrl: "callback_url",
codeChallenge: "code_challenge",
codeChallengeMethod: "code_challenge_method",
expiresAt: "expires_at",
});
});

Expand Down
Loading
Loading