@fungi.computer/darkroom 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -11
- package/dist/app-media-contracts.d.ts +307 -28
- package/dist/app-media-contracts.js +26 -1
- package/dist/browser-failure.d.ts +5 -7
- package/dist/browser-failure.js +6 -1
- package/dist/cloudflare/provider.d.ts +23 -1
- package/dist/cloudflare/provider.js +65 -12
- package/dist/cloudflare/reference-images.d.ts +4 -4
- package/dist/cloudflare/reference-images.js +8 -11
- package/dist/execution-error.d.ts +4 -0
- package/dist/execution-error.js +3 -0
- package/dist/index.d.ts +11 -9
- package/dist/index.js +12 -10
- package/dist/media-binding.d.ts +5 -2
- package/dist/media-binding.js +7 -2
- package/dist/media-generation.js +2 -2
- package/dist/media-operation.js +32 -13
- package/dist/reference-image-size.d.ts +10 -0
- package/dist/reference-image-size.js +37 -0
- package/dist/server.d.ts +3 -2
- package/dist/server.js +23 -4
- package/docs/api/app-media-contracts.md +213 -25
- package/docs/api/browser.md +9 -34
- package/docs/api/cloudflare.md +6 -6
- package/docs/api/index.md +73 -60
- package/docs/api/server.md +41 -5
- package/package.json +2 -2
package/docs/api/index.md
CHANGED
|
@@ -237,23 +237,24 @@ out. Hosts may bind it to Workers AI or their own transport.
|
|
|
237
237
|
type FittedReferenceImage = Omit<MediaReferenceBytes, "filename">;
|
|
238
238
|
```
|
|
239
239
|
|
|
240
|
-
A decoded reference image,
|
|
240
|
+
A decoded reference image, fitted for the selected model.
|
|
241
241
|
|
|
242
242
|
---
|
|
243
243
|
|
|
244
244
|
### ReferenceImageFitter
|
|
245
245
|
|
|
246
246
|
```ts
|
|
247
|
-
type ReferenceImageFitter = (bytes) => Promise<FittedReferenceImage>;
|
|
247
|
+
type ReferenceImageFitter = (bytes, model) => Promise<FittedReferenceImage>;
|
|
248
248
|
```
|
|
249
249
|
|
|
250
|
-
Decode
|
|
250
|
+
Decode and fit a reference: image long edge ≤512, video short edge ≥320.
|
|
251
251
|
|
|
252
252
|
#### Parameters
|
|
253
253
|
|
|
254
254
|
| Parameter | Type |
|
|
255
255
|
| --------- | ------------ |
|
|
256
256
|
| `bytes` | `Uint8Array` |
|
|
257
|
+
| `model` | `string` |
|
|
257
258
|
|
|
258
259
|
#### Returns
|
|
259
260
|
|
|
@@ -352,7 +353,7 @@ hydration.
|
|
|
352
353
|
|
|
353
354
|
```ts
|
|
354
355
|
type MediaReferenceReader = Readonly<{
|
|
355
|
-
read: (reference) => Promise<MediaReferenceBytes>;
|
|
356
|
+
read: (reference, model) => Promise<MediaReferenceBytes>;
|
|
356
357
|
}>;
|
|
357
358
|
```
|
|
358
359
|
|
|
@@ -635,26 +636,6 @@ Decode a viewer long-edge size within the supported pixel bounds.
|
|
|
635
636
|
|
|
636
637
|
---
|
|
637
638
|
|
|
638
|
-
### MAX\_REFERENCE\_COUNT
|
|
639
|
-
|
|
640
|
-
```ts
|
|
641
|
-
const MAX_REFERENCE_COUNT: 4 = 4;
|
|
642
|
-
```
|
|
643
|
-
|
|
644
|
-
Maximum reference files in one generation request.
|
|
645
|
-
|
|
646
|
-
---
|
|
647
|
-
|
|
648
|
-
### MAX\_REFERENCE\_DIMENSION
|
|
649
|
-
|
|
650
|
-
```ts
|
|
651
|
-
const MAX_REFERENCE_DIMENSION: 512 = 512;
|
|
652
|
-
```
|
|
653
|
-
|
|
654
|
-
Maximum reference width and height sent to inference, in pixels.
|
|
655
|
-
|
|
656
|
-
---
|
|
657
|
-
|
|
658
639
|
### MAX\_REFERENCE\_BYTES
|
|
659
640
|
|
|
660
641
|
```ts
|
|
@@ -770,6 +751,7 @@ const mediaGenerationSelectionSchema: ZodObject<
|
|
|
770
751
|
ZodArray<
|
|
771
752
|
ZodObject<
|
|
772
753
|
{
|
|
754
|
+
computerId: ZodOptional<ZodString>;
|
|
773
755
|
path: ZodString;
|
|
774
756
|
role: ZodOptional<
|
|
775
757
|
ZodEnum<{
|
|
@@ -788,7 +770,7 @@ const mediaGenerationSelectionSchema: ZodObject<
|
|
|
788
770
|
>;
|
|
789
771
|
```
|
|
790
772
|
|
|
791
|
-
|
|
773
|
+
A reference may select another Computer; identity never grants access.
|
|
792
774
|
|
|
793
775
|
---
|
|
794
776
|
|
|
@@ -942,6 +924,7 @@ const mediaModelInputSchema: ZodLazy<
|
|
|
942
924
|
own: "own";
|
|
943
925
|
}>;
|
|
944
926
|
maxDimension: ZodNullable<ZodNumber>;
|
|
927
|
+
maxDimensionDocumented: ZodBoolean;
|
|
945
928
|
defaultWidth: ZodNumber;
|
|
946
929
|
defaultHeight: ZodNumber;
|
|
947
930
|
steps: ZodEnum<{
|
|
@@ -964,6 +947,17 @@ Media's provider catalog: Workers AI images plus gateway image and video models.
|
|
|
964
947
|
|
|
965
948
|
---
|
|
966
949
|
|
|
950
|
+
### MAX\_REFERENCE\_COUNT
|
|
951
|
+
|
|
952
|
+
```ts
|
|
953
|
+
const MAX_REFERENCE_COUNT: 16 = 16;
|
|
954
|
+
```
|
|
955
|
+
|
|
956
|
+
Schema ceiling for reference lists: the largest per-model limit. Each model's
|
|
957
|
+
own `maxReferences` / `maxReferenceImages` is enforced after parsing.
|
|
958
|
+
|
|
959
|
+
---
|
|
960
|
+
|
|
967
961
|
### mediaVideoModelIdSchema
|
|
968
962
|
|
|
969
963
|
```ts
|
|
@@ -1100,6 +1094,7 @@ const mediaVideoSchema: ZodLazy<ZodReadonly<ZodObject<{
|
|
|
1100
1094
|
ultrawide: "21:9";
|
|
1101
1095
|
ultratall: "9:21";
|
|
1102
1096
|
}>;
|
|
1097
|
+
supportsAudio: ZodBoolean;
|
|
1103
1098
|
defaultGenerateAudio: ZodNullable<ZodBoolean>;
|
|
1104
1099
|
referenceRoles: ZodReadonly<ZodArray<ZodEnum<{
|
|
1105
1100
|
first: "first-frame";
|
|
@@ -1175,6 +1170,7 @@ const mediaModelSchema: ZodReadonly<ZodObject<{
|
|
|
1175
1170
|
own: "own";
|
|
1176
1171
|
}>;
|
|
1177
1172
|
maxDimension: ZodNullable<ZodNumber>;
|
|
1173
|
+
maxDimensionDocumented: ZodBoolean;
|
|
1178
1174
|
defaultWidth: ZodNumber;
|
|
1179
1175
|
defaultHeight: ZodNumber;
|
|
1180
1176
|
steps: ZodEnum<{
|
|
@@ -1215,6 +1211,7 @@ const mediaModelSchema: ZodReadonly<ZodObject<{
|
|
|
1215
1211
|
ultrawide: "21:9";
|
|
1216
1212
|
ultratall: "9:21";
|
|
1217
1213
|
}>;
|
|
1214
|
+
supportsAudio: ZodBoolean;
|
|
1218
1215
|
defaultGenerateAudio: ZodNullable<ZodBoolean>;
|
|
1219
1216
|
referenceRoles: ZodReadonly<ZodArray<ZodEnum<...>>>;
|
|
1220
1217
|
maxReferenceImages: ZodNumber;
|
|
@@ -1246,6 +1243,16 @@ const USD_PER_1K_NEURONS: 0.011 = 0.011;
|
|
|
1246
1243
|
|
|
1247
1244
|
Published Workers AI image rate: $0.011 per 1,000 neurons.
|
|
1248
1245
|
|
|
1246
|
+
---
|
|
1247
|
+
|
|
1248
|
+
### MAX\_REFERENCE\_DIMENSION
|
|
1249
|
+
|
|
1250
|
+
```ts
|
|
1251
|
+
const MAX_REFERENCE_DIMENSION: 512 = 512;
|
|
1252
|
+
```
|
|
1253
|
+
|
|
1254
|
+
Maximum long edge for image-model references, in pixels.
|
|
1255
|
+
|
|
1249
1256
|
## Functions
|
|
1250
1257
|
|
|
1251
1258
|
### estimateImageNeurons()
|
|
@@ -1328,7 +1335,7 @@ function validateMediaGenerationSelection(
|
|
|
1328
1335
|
): Readonly<Omit<MediaGenerationSettings, "references"> & object>;
|
|
1329
1336
|
```
|
|
1330
1337
|
|
|
1331
|
-
Validate
|
|
1338
|
+
Validate selections without granting Computer authority.
|
|
1332
1339
|
|
|
1333
1340
|
#### Parameters
|
|
1334
1341
|
|
|
@@ -1546,6 +1553,7 @@ function listMediaModels(): readonly Readonly<{
|
|
|
1546
1553
|
transport: "json" | "multipart";
|
|
1547
1554
|
dimensions: "none" | "own";
|
|
1548
1555
|
maxDimension: number | null;
|
|
1556
|
+
maxDimensionDocumented: boolean;
|
|
1549
1557
|
defaultWidth: number;
|
|
1550
1558
|
defaultHeight: number;
|
|
1551
1559
|
steps: "steps" | "num_steps" | "fixed";
|
|
@@ -1570,6 +1578,7 @@ function listMediaModels(): readonly Readonly<{
|
|
|
1570
1578
|
defaultResolution: "480p" | "720p" | "768p" | "1080p" | "4k";
|
|
1571
1579
|
defaultAspectRatio:
|
|
1572
1580
|
"16:9" | "4:3" | "1:1" | "3:4" | "9:16" | "21:9" | "9:21";
|
|
1581
|
+
supportsAudio: boolean;
|
|
1573
1582
|
defaultGenerateAudio: boolean | null;
|
|
1574
1583
|
referenceRoles: readonly ("first-frame" | "last-frame" | "reference")[];
|
|
1575
1584
|
maxReferenceImages: number;
|
|
@@ -1594,23 +1603,24 @@ readonly `Readonly`\<\{ `id`: `string`; `label`: `string`; `kind`: `"image"` \|
|
|
|
1594
1603
|
`outputFormats`: readonly (`"png"` \| `"jpeg"` \| `"webp"`)[];
|
|
1595
1604
|
`maxPromptLength`: `number`; `input`: `Readonly`\<\{ `transport`: `"json"` \|
|
|
1596
1605
|
`"multipart"`; `dimensions`: `"none"` \| `"own"`; `maxDimension`: `number` \|
|
|
1597
|
-
`null`; `
|
|
1598
|
-
|
|
1599
|
-
`number` \| `null`; `
|
|
1600
|
-
`
|
|
1601
|
-
|
|
1602
|
-
`number`; `
|
|
1603
|
-
|
|
1604
|
-
`
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
`
|
|
1608
|
-
`"
|
|
1609
|
-
`
|
|
1610
|
-
`
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
`"
|
|
1606
|
+
`null`; `maxDimensionDocumented`: `boolean`; `defaultWidth`: `number`;
|
|
1607
|
+
`defaultHeight`: `number`; `steps`: `"steps"` \| `"num_steps"` \| `"fixed"`;
|
|
1608
|
+
`maxSteps`: `number` \| `null`; `defaultSteps`: `number` \| `null`;
|
|
1609
|
+
`referenceField`: `string` \| `null`; `maxReferences`: `number`; \}\>; `sizes`:
|
|
1610
|
+
readonly `string`[] \| `null`; `video`: \| `Readonly`\<\{ `minSeconds`:
|
|
1611
|
+
`number`; `maxSeconds`: `number`; `defaultSeconds`: `number`; `durations`:
|
|
1612
|
+
readonly `number`[]; `provider`: `"seedance"` \| `"veo"` \| `"minimax"`;
|
|
1613
|
+
`formats`: readonly `Readonly`\<\{ `resolution`: `"480p"` \| `"720p"` \|
|
|
1614
|
+
`"768p"` \| `"1080p"` \| `"4k"`; `aspectRatio`: `"16:9"` \| `"4:3"` \| `"1:1"`
|
|
1615
|
+
\| `"3:4"` \| `"9:16"` \| `"21:9"` \| `"9:21"`; `width`: `number`; `height`:
|
|
1616
|
+
`number`; \}\>[]; `defaultResolution`: `"480p"` \| `"720p"` \| `"768p"` \|
|
|
1617
|
+
`"1080p"` \| `"4k"`; `defaultAspectRatio`: `"16:9"` \| `"4:3"` \| `"1:1"` \|
|
|
1618
|
+
`"3:4"` \| `"9:16"` \| `"21:9"` \| `"9:21"`; `supportsAudio`: `boolean`;
|
|
1619
|
+
`defaultGenerateAudio`: `boolean` \| `null`; `referenceRoles`: readonly
|
|
1620
|
+
(`"first-frame"` \| `"last-frame"` \| `"reference"`)[]; `maxReferenceImages`:
|
|
1621
|
+
`number`; `referenceResolutions`: readonly (`"480p"` \| `"720p"` \| `"768p"` \|
|
|
1622
|
+
`"1080p"` \| `"4k"`)[]; `prices`: readonly `Readonly`\<\{ `resolution`: `"480p"`
|
|
1623
|
+
\| `"720p"` \| `"768p"` \| `"1080p"` \| `"4k"`; `silentMilliunitsPerSecond`:
|
|
1614
1624
|
`number`; `audioMilliunitsPerSecond`: `number`; \}\>[]; \}\> \| `null`; \}\>[]
|
|
1615
1625
|
|
|
1616
1626
|
---
|
|
@@ -1630,6 +1640,7 @@ function getMediaModel(id):
|
|
|
1630
1640
|
transport: "json" | "multipart";
|
|
1631
1641
|
dimensions: "none" | "own";
|
|
1632
1642
|
maxDimension: number | null;
|
|
1643
|
+
maxDimensionDocumented: boolean;
|
|
1633
1644
|
defaultWidth: number;
|
|
1634
1645
|
defaultHeight: number;
|
|
1635
1646
|
steps: "steps" | "num_steps" | "fixed";
|
|
@@ -1655,6 +1666,7 @@ function getMediaModel(id):
|
|
|
1655
1666
|
defaultResolution: "480p" | "720p" | "768p" | "1080p" | "4k";
|
|
1656
1667
|
defaultAspectRatio:
|
|
1657
1668
|
"16:9" | "4:3" | "1:1" | "3:4" | "9:16" | "21:9" | "9:21";
|
|
1669
|
+
supportsAudio: boolean;
|
|
1658
1670
|
defaultGenerateAudio: boolean | null;
|
|
1659
1671
|
referenceRoles: readonly ("first-frame" | "last-frame" | "reference")[];
|
|
1660
1672
|
maxReferenceImages: number;
|
|
@@ -1686,23 +1698,24 @@ Find a model by provider identifier, returning undefined when it is absent.
|
|
|
1686
1698
|
`outputFormats`: readonly (`"png"` \| `"jpeg"` \| `"webp"`)[];
|
|
1687
1699
|
`maxPromptLength`: `number`; `input`: `Readonly`\<\{ `transport`: `"json"` \|
|
|
1688
1700
|
`"multipart"`; `dimensions`: `"none"` \| `"own"`; `maxDimension`: `number` \|
|
|
1689
|
-
`null`; `
|
|
1690
|
-
|
|
1691
|
-
`number` \| `null`; `
|
|
1692
|
-
`
|
|
1693
|
-
|
|
1694
|
-
`number`; `
|
|
1695
|
-
|
|
1696
|
-
`
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
`
|
|
1700
|
-
`"
|
|
1701
|
-
`
|
|
1702
|
-
`
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
`"
|
|
1701
|
+
`null`; `maxDimensionDocumented`: `boolean`; `defaultWidth`: `number`;
|
|
1702
|
+
`defaultHeight`: `number`; `steps`: `"steps"` \| `"num_steps"` \| `"fixed"`;
|
|
1703
|
+
`maxSteps`: `number` \| `null`; `defaultSteps`: `number` \| `null`;
|
|
1704
|
+
`referenceField`: `string` \| `null`; `maxReferences`: `number`; \}\>; `sizes`:
|
|
1705
|
+
readonly `string`[] \| `null`; `video`: \| `Readonly`\<\{ `minSeconds`:
|
|
1706
|
+
`number`; `maxSeconds`: `number`; `defaultSeconds`: `number`; `durations`:
|
|
1707
|
+
readonly `number`[]; `provider`: `"seedance"` \| `"veo"` \| `"minimax"`;
|
|
1708
|
+
`formats`: readonly `Readonly`\<\{ `resolution`: `"480p"` \| `"720p"` \|
|
|
1709
|
+
`"768p"` \| `"1080p"` \| `"4k"`; `aspectRatio`: `"16:9"` \| `"4:3"` \| `"1:1"`
|
|
1710
|
+
\| `"3:4"` \| `"9:16"` \| `"21:9"` \| `"9:21"`; `width`: `number`; `height`:
|
|
1711
|
+
`number`; \}\>[]; `defaultResolution`: `"480p"` \| `"720p"` \| `"768p"` \|
|
|
1712
|
+
`"1080p"` \| `"4k"`; `defaultAspectRatio`: `"16:9"` \| `"4:3"` \| `"1:1"` \|
|
|
1713
|
+
`"3:4"` \| `"9:16"` \| `"21:9"` \| `"9:21"`; `supportsAudio`: `boolean`;
|
|
1714
|
+
`defaultGenerateAudio`: `boolean` \| `null`; `referenceRoles`: readonly
|
|
1715
|
+
(`"first-frame"` \| `"last-frame"` \| `"reference"`)[]; `maxReferenceImages`:
|
|
1716
|
+
`number`; `referenceResolutions`: readonly (`"480p"` \| `"720p"` \| `"768p"` \|
|
|
1717
|
+
`"1080p"` \| `"4k"`)[]; `prices`: readonly `Readonly`\<\{ `resolution`: `"480p"`
|
|
1718
|
+
\| `"720p"` \| `"768p"` \| `"1080p"` \| `"4k"`; `silentMilliunitsPerSecond`:
|
|
1706
1719
|
`number`; `audioMilliunitsPerSecond`: `number`; \}\>[]; \}\> \| `null`; \}\> \|
|
|
1707
1720
|
`undefined`
|
|
1708
1721
|
|
package/docs/api/server.md
CHANGED
|
@@ -53,6 +53,14 @@ readonly provider: MediaProviderDiagnostic | undefined;
|
|
|
53
53
|
|
|
54
54
|
Safe provider facts only; the original cause remains private.
|
|
55
55
|
|
|
56
|
+
##### customerCharge
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
readonly customerCharge: "none" | "unknown";
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Unknown unless the execution owner confirmed zero-unit settlement.
|
|
63
|
+
|
|
56
64
|
##### stage
|
|
57
65
|
|
|
58
66
|
```ts
|
|
@@ -780,9 +788,10 @@ Private cause plus an independently decoded, safe provider diagnostic.
|
|
|
780
788
|
|
|
781
789
|
#### Type Declaration
|
|
782
790
|
|
|
783
|
-
| Name
|
|
784
|
-
|
|
|
785
|
-
| `provider?`
|
|
791
|
+
| Name | Type | Description |
|
|
792
|
+
| ----------------- | ------------------------- | ------------------------------------------------------------------------- |
|
|
793
|
+
| `provider?` | `MediaProviderDiagnostic` | Safe provider facts, when the failure came from provider transport. |
|
|
794
|
+
| `customerCharge?` | `"none"` | Confirmed zero-unit customer settlement, never an upstream billing claim. |
|
|
786
795
|
|
|
787
796
|
---
|
|
788
797
|
|
|
@@ -1457,7 +1466,7 @@ type MediaServiceHost = Readonly<{
|
|
|
1457
1466
|
destination: Readonly<{
|
|
1458
1467
|
authorize: (path) => Promise<void>;
|
|
1459
1468
|
write: (path, bytes) => Promise<void>;
|
|
1460
|
-
readReference?: (reference) => Promise<MediaReferenceBytes>;
|
|
1469
|
+
readReference?: (reference, model) => Promise<MediaReferenceBytes>;
|
|
1461
1470
|
}>;
|
|
1462
1471
|
onFailure?: (error) => Response | undefined;
|
|
1463
1472
|
}> &
|
|
@@ -1554,6 +1563,7 @@ const mediaImageBindingInputSchema: ZodObject<{
|
|
|
1554
1563
|
}>>;
|
|
1555
1564
|
generateAudio: ZodOptional<ZodBoolean>;
|
|
1556
1565
|
references: ZodOptional<ZodArray<ZodObject<{
|
|
1566
|
+
computerId: ZodOptional<ZodString>;
|
|
1557
1567
|
path: ZodString;
|
|
1558
1568
|
role: ZodOptional<ZodEnum<{
|
|
1559
1569
|
first: ...;
|
|
@@ -1652,6 +1662,7 @@ const mediaBindingGenerationSchema: ZodDiscriminatedUnion<[ZodObject<{
|
|
|
1652
1662
|
}>>;
|
|
1653
1663
|
generateAudio: ZodOptional<ZodBoolean>;
|
|
1654
1664
|
references: ZodOptional<ZodArray<ZodObject<{
|
|
1665
|
+
computerId: ZodOptional<...>;
|
|
1655
1666
|
path: ZodString;
|
|
1656
1667
|
role: ZodOptional<...>;
|
|
1657
1668
|
}, $strict>>>;
|
|
@@ -1749,7 +1760,7 @@ const mediaBindingCallSchema: ZodDiscriminatedUnion<[ZodObject<{
|
|
|
1749
1760
|
}, $strict>], "operation">;
|
|
1750
1761
|
```
|
|
1751
1762
|
|
|
1752
|
-
Maintained MEDIA
|
|
1763
|
+
Maintained MEDIA grammar; reference selectors carry no Computer authority.
|
|
1753
1764
|
|
|
1754
1765
|
---
|
|
1755
1766
|
|
|
@@ -1947,6 +1958,31 @@ Decode relative service generation input. Identity comes from the host.
|
|
|
1947
1958
|
|
|
1948
1959
|
## Functions
|
|
1949
1960
|
|
|
1961
|
+
### estimateMediaModel()
|
|
1962
|
+
|
|
1963
|
+
```ts
|
|
1964
|
+
function estimateMediaModel(model): object;
|
|
1965
|
+
```
|
|
1966
|
+
|
|
1967
|
+
Quote the catalog defaults through the exact estimator used before dispatch.
|
|
1968
|
+
|
|
1969
|
+
#### Parameters
|
|
1970
|
+
|
|
1971
|
+
| Parameter | Type |
|
|
1972
|
+
| --------- | ----------------------------------- |
|
|
1973
|
+
| `model` | [`MediaModel`](index.md#mediamodel) |
|
|
1974
|
+
|
|
1975
|
+
#### Returns
|
|
1976
|
+
|
|
1977
|
+
| Name | Type | Description |
|
|
1978
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
|
|
1979
|
+
| `kind` | `"estimate"` | An indicative quote, not an admitted generation receipt. |
|
|
1980
|
+
| `basis` | `"provider-cost"` | Provider cost before the host's billing policy. |
|
|
1981
|
+
| `settings` | `Readonly`\<\{ `model`: `string`; `prompt`: `string`; `width`: `number`; `height`: `number`; `steps?`: `number`; `durationSeconds?`: `number`; `resolution?`: `"480p"` \| `"720p"` \| `"768p"` \| `"1080p"` \| `"4k"`; `aspectRatio?`: `"16:9"` \| `"4:3"` \| `"1:1"` \| `"3:4"` \| `"9:16"` \| `"21:9"` \| `"9:21"`; `generateAudio?`: `boolean`; `references?`: readonly `Readonly`\<\{ `computerId`: `string`; `path`: `string`; `role?`: `"first-frame"` \| `"last-frame"` \| `"reference"`; \}\>[]; \}\> | Catalog defaults, a one-character prompt and no references. |
|
|
1982
|
+
| `costMilliunits` | `number` | Estimated provider milliunits of a cent for these exact settings. |
|
|
1983
|
+
|
|
1984
|
+
---
|
|
1985
|
+
|
|
1950
1986
|
### mediaUnits()
|
|
1951
1987
|
|
|
1952
1988
|
```ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/darkroom",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"author": "Levi <levi@technomancy.dev>",
|
|
5
5
|
"description": "Media generation, durable output retention and provenance with host-owned authority and billing",
|
|
6
6
|
"type": "module",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"exifreader": "4.46.0",
|
|
60
60
|
"@fungi.computer/ts-webp": "0.1.6",
|
|
61
61
|
"@xmldom/xmldom": "0.9.12",
|
|
62
|
-
"@fungi.computer/agar": "0.
|
|
62
|
+
"@fungi.computer/agar": "0.6.0",
|
|
63
63
|
"@fungi.computer/capnweb": "0.12.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|