# Limits

Every size, time and rate limit, read from the SDK constants the runtime enforces.

Every number below is read from the SDK constant named under its heading, the same value the runtime and StillMade enforce. Exceeding one fails with the error code in the [error reference](/docs/reference/errors).

## JavaScript Blocks (src/run.js)

`JAVASCRIPT_LIMITS`

| Limit | Value |
| --- | --- |
| Source size | 256 KiB |
| Input and output JSON | 4 MiB |
| CPU time per run | 500 ms |
| Memory | 16 MiB |
| Sandbox memory reserve | 32 MiB |

## Module Blocks

`MODULE_LIMITS`

| Limit | Value |
| --- | --- |
| Files in module/ | 64 |
| One file | 64 MiB |
| All files | 128 MiB |
| File path length | 160 |
| Run time without progress (host calls do not count) | 2 min |
| Longest run in real time | 30 min |
| Extra time after each progress report | 1 min |
| One message to or from the host | 16 MiB |
| Log lines kept per run | 500 |

## Standard views

`VIEW_LIMITS`

| Limit | Value |
| --- | --- |
| Markup | 64 KiB |
| Styles | 32 KiB |
| Script | 64 KiB |
| One message to the host | 4 MiB |
| StillMade.run calls per minute | 30 |
| Image previews per minute | 60 |
| One image preview | 15 s |
| Preview image side (pixels) | 512 |

## Frame views

`FRAME_VIEW_LIMITS`

| Limit | Value |
| --- | --- |
| Markup | 256 KiB |
| Each stylesheet | 256 KiB |
| Script bundle (view.js) | 4 MiB |
| Asset files | 32 |
| All asset files | 8 MiB |
| One task before it is stopped | 250 ms |
| A blocking native operation before the view is closed | 1 s |

## Shared view state

`SHARED_VIEW_LIMITS`

| Limit | Value |
| --- | --- |
| All shared fields | 384 KiB |
| One updateShared request | 800,000 bytes |
| Unsent edits | 2 MiB |

## Hosted operations

`CAPABILITY_LIMITS`

| Limit | Value |
| --- | --- |
| Prompt characters | 32,000 |
| Project context sent with a prompt | 24,000 bytes |
| System instruction characters | 8,000 |
| Text output characters | 32,768 |
| Tokens a reply may use | 4,096 |
| Fixtures in a capability Block | 3 |
| Literal phrases one fixture checks | 8 |
| One literal phrase | 256 |
| Capability package | 256 KiB |
| Host metadata | 8 KiB |

## Image generation

`IMAGE_CAPABILITY_LIMITS`

| Limit | Value |
| --- | --- |
| Prompt characters | 32,000 |
| Legacy fixed-size image | 12,000,000 bytes |
| Legacy fixed width | 1,024 |
| Legacy fixed height | 1,024 |
| Longest side (pixels) | 8,192 |
| Pixels | 40,000,000 |
| Image file | 64 MiB |

## Video generation

`VIDEO_CAPABILITY_LIMITS`

| Limit | Value |
| --- | --- |
| Prompt characters | 32,000 |
| Video file | 256 MiB |
| Seconds | 60 |
| Width (pixels) | 3,840 |
| Height (pixels) | 3,840 |
| Pixels per frame | 8,294,400 |

## Speech

`SPEECH_CAPABILITY_LIMITS`

| Limit | Value |
| --- | --- |
| Characters per call | 3,800 |
| Seconds | 1,400 |
| Audio file | 64 MiB |
| Canonical WAV sample rate | 24,000 |
| Canonical WAV channels | 1 |

## Music, sound effects and transcription

`AUDIO_CAPABILITY_LIMITS`

| Limit | Value |
| --- | --- |
| Audio file | 128 MiB |
| Seconds | 1,800 |
| Music seconds (min, max, default) | min 5; max 240; default 30 |
| Sound effect seconds (min, max, default) | min 0.5; max 22; default 4 |

## Conversation history (text.generate)

`TEXT_HISTORY_LIMITS`

| Limit | Value |
| --- | --- |
| Turns | 20 |
| Characters per turn | 8,000 |
| Characters in all turns | 24,000 |

## Web reading

`WEB_CAPABILITY_LIMITS`

| Limit | Value |
| --- | --- |
| URL length | 2,048 |
| Instruction characters | 4,000 |
| Research topic characters | 500 |
| Sources returned | 12 |
| Answer characters | 32,768 |

## Media analysis

`MEDIA_ANALYZE_LIMITS`

| Limit | Value |
| --- | --- |
| Images per call | 4 |
| Question characters | 2,000 |
| Seconds of one closer-inspected video range | 12 |

## Image description

`IMAGE_DESCRIBE_LIMITS`

| Limit | Value |
| --- | --- |
| Images per call | 4 |

## Generation from code (media.generate)

`MEDIA_GENERATE_LIMITS`

| Limit | Value |
| --- | --- |
| Items per batch | 50 |
| Prompt characters | 4,000 |

## Generation settings

`GENERATION_LIMITS`

| Limit | Value |
| --- | --- |
| Reference images | 8 |
| Negative prompt characters | 2,000 |
| Largest seed | 2,147,483,647 |

## Outside APIs (net.fetch)

`NETWORK_LIMITS`

| Limit | Value |
| --- | --- |
| Declared origins | 8 |
| Request body | 4 MiB |
| Response body after decompression | 8 MiB |
| One request | 30 s |
| Redirects followed | 3 |
| Request headers | 32 |
| All request headers | 16 KiB |
| URL length | 8,192 |
| Requests per minute (person and Block) | 120 |
| Requests per minute to one origin (everyone) | 3,000 |
| Saved key length | 4,096 |

## Cloud storage

`CLOUD_STORAGE_LIMITS`

| Limit | Value |
| --- | --- |
| Key length | 200 |
| One JSON value | 1 MiB |
| One file | 64 MiB |
| Everything one Block keeps in a project | 256 MiB |
| Keys per Block per project | 2,000 |
| Items per list page | 500 |
| Media type length | 100 |

## Triggers

`BLOCK_TRIGGER_LIMITS`

| Limit | Value |
| --- | --- |
| Triggers per Block | 4 |
| Label characters | 120 |
| Shortest schedule interval (seconds) | 60 |
| Longest schedule interval (seconds) | 31,536,000 |

## Media transforms

`MEDIA_TRANSFORM_LIMITS`

| Limit | Value |
| --- | --- |
| Ranges kept by one cut | 500 |
| Videos joined at once | 50 |
| Media length (seconds) | 21,600 |
| Decoded samples | 201,326,592 |
| Decode sample rates | 8,000, 16,000, 22,050, 24,000, 32,000, 44,100, 48,000 |
| Thumbnail width (pixels) | 4,096 |

## Files, documents and tables

`DATA_VALUE_LIMITS`

| Limit | Value |
| --- | --- |
| File name length | 255 |
| Document characters | 1,000,000 |
| Document title characters | 300 |
| Table columns | 500 |
| Table rows | 100,000 |
| Table cells | 500,000 |
| Column name length | 160 |
| Characters in one cell | 100,000 |
| Link length | 8,192 |

## File bundles

`FILE_BUNDLE_LIMITS`

| Limit | Value |
| --- | --- |
| Files | 256 |
| Text in all files | 3,000,000 bytes |
| Path length | 180 |

## JSON schemas (text.generate)

`JSON_SCHEMA_LIMITS`

| Limit | Value |
| --- | --- |
| Schema size | 8 KiB |
| Nesting depth | 8 |
| Properties per object | 64 |
| Values per enum | 64 |
| Characters in a schema string | 4,000 |
