> ## Documentation Index
> Fetch the complete documentation index at: https://docs.korve.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Runtime Create Upload

> Create a short-lived signed upload URL from deployed server code. The injected runtime capability fixes the project and environment; an optional visible bucket may narrow the destination but can never address another project or organization.



## OpenAPI

````yaml /openapi.json post /v1/runtime/storage/uploads
openapi: 3.1.0
info:
  title: Korve API
  version: 0.1.0
  description: >-
    Typed control plane for deploying applications and explicitly provisioning
    their managed infrastructure.
servers:
  - url: https://api.korve.dev
security: []
paths:
  /v1/runtime/storage/uploads:
    post:
      tags:
        - storage
      summary: Runtime Create Upload
      description: >-
        Create a short-lived signed upload URL from deployed server code. The
        injected runtime capability fixes the project and environment; an
        optional visible bucket may narrow the destination but can never address
        another project or organization.
      operationId: storage.runtimeCreateUpload
      parameters:
        - name: bucket
          in: query
          required: false
          schema:
            type: string
            pattern: ^[a-z][a-z0-9-]{1,61}$
          description: >-
            Bucket name to address (see buckets.list). The bucket must belong to
            this organization and be either an organization-level shared bucket
            or scoped to this project — any other name answers 404. Omitted, the
            operation addresses the project's original per-environment storage
            scope, exactly as before buckets existed; that legacy scope is
            separate from every named bucket, including the project's default
            bucket. The runtime capability still fixes the project and
            environment. With a bucket, the object lands only in a
            project-visible bucket namespace.
      requestBody:
        required: true
        x-korve-max-bytes: 1048576
        content:
          application/json:
            schema:
              type: object
              properties:
                filename:
                  type: string
                contentType:
                  type: string
                byteLength:
                  type: integer
                  description: Exact size of the upload in bytes.
              required:
                - filename
                - contentType
                - byteLength
              additionalProperties: false
      responses:
        '201':
          description: >-
            Short-lived signed upload. PUT the bytes with the returned headers
            before expiry.
          content:
            application/json:
              schema:
                type: object
                properties:
                  key:
                    type: string
                    description: Scope-relative object key.
                  url:
                    type: string
                  method:
                    type: string
                    enum:
                      - PUT
                  headers:
                    type: object
                    additionalProperties:
                      type: string
                  expiresAt:
                    type: string
                    format: date-time
                required:
                  - key
                  - url
                  - method
                  - headers
                  - expiresAt
        '401':
          description: >-
            Runtime capability is absent, invalid, expired, or lacks storage
            upload access.
        '402':
          description: Organization billing is not active.
        '404':
          description: No such project-visible bucket.
        '422':
          description: Invalid filename, content type, or byte length.
      security:
        - appService: []
components:
  securitySchemes:
    appService:
      type: http
      scheme: bearer
      bearerFormat: korve_app_service

````