Skip to content
Status

Technical Reference · gram upload

gram upload

Upload a single asset and deploy it in one step, without a deployment file.

The upload command uploads one asset — an OpenAPI document or a functions bundle — and deploys it in a single step. Where gram stage and gram push work from a gram.deploy.json file describing several sources, upload takes the asset’s details as flags, so it needs no configuration file.

If the project already has a deployment, the uploaded asset evolves it (the previous deployment is cloned with the new asset added). If the project has no deployment yet, a new one is created.

The gram upload command requires an API key, an organization slug, and a project slug. After running gram auth, these values come from the local profile. For more information on these values, see the global CLI options.

Terminal window
gram upload --type openapiv3 \
--location https://raw.githubusercontent.com/my/spec.yaml \
--name "My API" \
--slug my-api

The type of asset to upload: openapiv3 or functions.

The location of the asset, as a local file path or a URL.

The human-readable name of the asset.

The URL-friendly slug for the asset. Names and slugs must be unique across all sources in the target project.

The runtime to use for function execution. Required when the type is functions.

Terminal window
gram upload --type functions --runtime nodejs:22 [command options]

The number of instances to run for a function.

The amount of memory, in MiB, to allocate for the function.