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
162 changes: 89 additions & 73 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
typescript:
version: 1.5.28
version: 1.5.29
acceptHeaderEnum: false
additionalDependencies:
dependencies:
Expand Down
73 changes: 62 additions & 11 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11815,6 +11815,32 @@ components:
required:
- 'data'
type: 'object'
ExtractionAsset:
additionalProperties: false
description: 'An image or PDF sent once and referenced by its key in the `assets` map. `data_base64` is the file in standard base64 with no `data:` prefix. PDF is read by document models only.'
properties:
data_base64:
minLength: 1
pattern: '^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$'
type: 'string'
format:
enum:
- 'png'
- 'jpg'
- 'jpeg'
- 'pdf'
type: 'string'
x-speakeasy-unknown-values: allow
type:
enum:
- 'image'
- 'document'
type: 'string'
x-speakeasy-unknown-values: allow
required:
- 'format'
- 'data_base64'
type: 'object'
ExtractionDateAnswer:
properties:
confidence:
Expand All @@ -11828,10 +11854,11 @@ components:
format: 'double'
type: 'number'
source:
description: 'Set to `image` when the answer was read from an image rather than the state text.'
description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.'
enum:
- 'state'
- 'image'
- 'document'
type: 'string'
x-speakeasy-unknown-values: allow
span:
Expand All @@ -11858,6 +11885,7 @@ components:
- 'value'
type: 'object'
ExtractionDateField:
additionalProperties: false
properties:
instructions:
description: 'What the field should contain.'
Expand Down Expand Up @@ -11888,10 +11916,11 @@ components:
format: 'double'
type: 'number'
source:
description: 'Set to `image` when the answer was read from an image rather than the state text.'
description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.'
enum:
- 'state'
- 'image'
- 'document'
type: 'string'
x-speakeasy-unknown-values: allow
span:
Expand All @@ -11918,6 +11947,7 @@ components:
- 'value'
type: 'object'
ExtractionDatetimeField:
additionalProperties: false
properties:
instructions:
description: 'What the field should contain.'
Expand Down Expand Up @@ -11949,10 +11979,11 @@ components:
format: 'double'
type: 'number'
source:
description: 'Set to `image` when the answer was read from an image rather than the state text.'
description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.'
enum:
- 'state'
- 'image'
- 'document'
type: 'string'
x-speakeasy-unknown-values: allow
span:
Expand Down Expand Up @@ -11983,6 +12014,7 @@ components:
- 'value'
type: 'object'
ExtractionDurationField:
additionalProperties: false
properties:
decimals:
description: 'Decimal places kept in `value`.'
Expand Down Expand Up @@ -12062,10 +12094,11 @@ components:
- type: 'string'
type: 'array'
source:
description: 'Set to `image` when the answer was read from an image rather than the state text.'
description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.'
enum:
- 'state'
- 'image'
- 'document'
type: 'string'
x-speakeasy-unknown-values: allow
spell_confidence:
Expand All @@ -12087,6 +12120,7 @@ components:
- 'value'
type: 'object'
ExtractionEstimateField:
additionalProperties: false
properties:
instructions:
description: 'What the field should contain.'
Expand Down Expand Up @@ -12181,10 +12215,11 @@ components:
- type: 'string'
type: 'array'
source:
description: 'Set to `image` when the answer was read from an image rather than the state text.'
description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.'
enum:
- 'state'
- 'image'
- 'document'
type: 'string'
x-speakeasy-unknown-values: allow
spell_confidence:
Expand Down Expand Up @@ -12213,6 +12248,7 @@ components:
- 'value'
type: 'object'
ExtractionForecastField:
additionalProperties: false
properties:
horizon:
description: 'Number of forecast steps.'
Expand Down Expand Up @@ -12332,6 +12368,12 @@ components:
confidence:
format: 'double'
type: 'number'
confidences:
description: 'One confidence per item of `value`, in the same order.'
items:
format: 'double'
type: 'number'
type: 'array'
guess:
description: 'The most likely value even when `value` is null because `p_null` crossed the threshold.'
items:
Expand All @@ -12345,10 +12387,11 @@ components:
format: 'double'
type: 'number'
source:
description: 'Set to `image` when the answer was read from an image rather than the state text.'
description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.'
enum:
- 'state'
- 'image'
- 'document'
type: 'string'
x-speakeasy-unknown-values: allow
spans:
Expand Down Expand Up @@ -12382,6 +12425,7 @@ components:
- 'value'
type: 'object'
ExtractionListField:
additionalProperties: false
properties:
decimals:
description: 'Decimal places kept in `value`.'
Expand Down Expand Up @@ -12426,10 +12470,11 @@ components:
format: 'double'
type: 'number'
source:
description: 'Set to `image` when the answer was read from an image rather than the state text.'
description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.'
enum:
- 'state'
- 'image'
- 'document'
type: 'string'
x-speakeasy-unknown-values: allow
span:
Expand Down Expand Up @@ -12457,6 +12502,7 @@ components:
- 'value'
type: 'object'
ExtractionNumberField:
additionalProperties: false
properties:
decimals:
description: 'Decimal places kept in `value`.'
Expand Down Expand Up @@ -12484,11 +12530,12 @@ components:
- 'type'
type: 'object'
ExtractionsRequest:
additionalProperties: false
properties:
assets:
additionalProperties:
$ref: '#/components/schemas/DecisionsImageAsset'
description: 'Images keyed by reference string, as in TypeSafe''s API. Write a reference wherever the image belongs in `state`, `instructions`, or `criteria`; every asset must be referenced at least once. Jev reads a reference as a whole string value or inside longer text. Other Decisions models read a whole-string reference wherever they read an `image_url` part and reject a reference inside longer text.'
$ref: '#/components/schemas/ExtractionAsset'
description: 'Assets keyed by reference string. Write a reference wherever the asset belongs in `state` or a field `instructions`; every asset must be referenced at least once. A `state` that is exactly the sole asset''s key carries no text of its own and is read as file-only. A model that reads either text or a document per request, not both (ScaleDown Extract with a PDF), needs that form: any other text around the key is state text and is rejected with 400.'
type: 'object'
fields:
additionalProperties:
Expand Down Expand Up @@ -12629,10 +12676,11 @@ components:
format: 'double'
type: 'number'
source:
description: 'Set to `image` when the answer was read from an image rather than the state text.'
description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.'
enum:
- 'state'
- 'image'
- 'document'
type: 'string'
x-speakeasy-unknown-values: allow
span:
Expand All @@ -12659,6 +12707,7 @@ components:
- 'value'
type: 'object'
ExtractionTextField:
additionalProperties: false
properties:
instructions:
description: 'What the field should contain.'
Expand Down Expand Up @@ -12689,10 +12738,11 @@ components:
format: 'double'
type: 'number'
source:
description: 'Set to `image` when the answer was read from an image rather than the state text.'
description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.'
enum:
- 'state'
- 'image'
- 'document'
type: 'string'
x-speakeasy-unknown-values: allow
span:
Expand All @@ -12719,6 +12769,7 @@ components:
- 'value'
type: 'object'
ExtractionTimeField:
additionalProperties: false
properties:
instructions:
description: 'What the field should contain.'
Expand Down
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ speakeasyVersion: 1.803.2
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:c62594e70066d4d650785b3c91462710d37b06bface67c235e674692db5d3513
sourceBlobDigest: sha256:0e91138c909f3b7374a29f0a07110b26544ce2f648e9342319018043442f431e
sourceRevisionDigest: sha256:e3c92536844db26c6a4b4a0944676d5c2f9afacea9918272d51ad9848a3d5292
sourceBlobDigest: sha256:73b2b289035e24701e90840d7e0055b71cbc4961e6f32204ec89beaf84d73f9f
tags:
- latest
- 1.0.0
targets:
openrouter:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:c62594e70066d4d650785b3c91462710d37b06bface67c235e674692db5d3513
sourceBlobDigest: sha256:0e91138c909f3b7374a29f0a07110b26544ce2f648e9342319018043442f431e
sourceRevisionDigest: sha256:e3c92536844db26c6a4b4a0944676d5c2f9afacea9918272d51ad9848a3d5292
sourceBlobDigest: sha256:73b2b289035e24701e90840d7e0055b71cbc4961e6f32204ec89beaf84d73f9f
codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples
codeSamplesRevisionDigest: sha256:6b66a47258f7d1220f91f4ba92d3df5a27f08b85c11c1818cdb647a88a3de7ee
codeSamplesRevisionDigest: sha256:1793d6cb5cce28e17775315e9a4c383f2d1ec591c7f86096d920f2d63f3b2392
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.803.2
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4666,4 +4666,14 @@ Based on:
### Generated
- [typescript v1.5.28] .
### Releases
- [NPM v1.5.28] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.28 - .
- [NPM v1.5.28] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.28 - .

## 2026-10-30 16:22:04
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v1.5.29] .
### Releases
- [NPM v1.5.29] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.29 - .
24 changes: 24 additions & 0 deletions docs/models/extractionasset.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: "ExtractionAsset"
---

An image or PDF sent once and referenced by its key in the `assets` map. `data_base64` is the file in standard base64 with no `data:` prefix. PDF is read by document models only.

## Example Usage

```typescript
import { ExtractionAsset } from "@openrouter/sdk/models";

let value: ExtractionAsset = {
dataBase64: "<value>",
format: "jpeg",
};
```

## Fields

| Field | Type | Required | Description |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `dataBase64` | *string* | ✔️ | N/A |
| `format` | [models.ExtractionAssetFormat](../models/extractionassetformat.mdx) | ✔️ | N/A |
| `type` | [models.ExtractionAssetType](../models/extractionassettype.mdx) | ➖ | N/A |
19 changes: 19 additions & 0 deletions docs/models/extractionassetformat.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: "ExtractionAssetFormat"
---

## Example Usage

```typescript
import { ExtractionAssetFormat } from "@openrouter/sdk/models";

let value: ExtractionAssetFormat = "png";

// Open enum: unrecognized values are captured as Unrecognized<string>
```

## Values

```typescript
"png" | "jpg" | "jpeg" | "pdf" | Unrecognized<string>
```
19 changes: 19 additions & 0 deletions docs/models/extractionassettype.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: "ExtractionAssetType"
---

## Example Usage

```typescript
import { ExtractionAssetType } from "@openrouter/sdk/models";

let value: ExtractionAssetType = "image";

// Open enum: unrecognized values are captured as Unrecognized<string>
```

## Values

```typescript
"image" | "document" | Unrecognized<string>
```
2 changes: 1 addition & 1 deletion docs/models/extractiondateanswer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let value: ExtractionDateAnswer = {
| `confidence` | *number* | ➖ | N/A |
| `guess` | *string* | ➖ | The most likely value even when `value` is null because `p_null` crossed the threshold. |
| `pNull` | *number* | ➖ | Probability that the state contains nothing for this field. |
| `source` | [models.ExtractionDateAnswerSource](../models/extractiondateanswersource.mdx) | ➖ | Set to `image` when the answer was read from an image rather than the state text. |
| `source` | [models.ExtractionDateAnswerSource](../models/extractiondateanswersource.mdx) | ➖ | Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text. |
| `span` | *number*[] | ➖ | Unicode code point offsets [start, end) into the state text: index code points (not UTF-16 code units or UTF-8 bytes), so an emoji or accented letter counts once. |
| `spellConfidence` | *number* | ➖ | Confidence in the spelling of text read from an image. |
| `type` | *"date"* | ✔️ | N/A |
Expand Down
Loading
Loading