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

# Create Benchmark Upload

> Allocate signed GCS PUT URLs for one batch of files (manifest.json and task artifacts). Omit bench_id to mint a new benchmark; pass the returned bench_id on later calls to add more files to the same benchmark, which is how a file set over the per-request limit is uploaded. No rows are written until the ingest call.



## OpenAPI

````yaml /openapi.json post /api/v1/benchmarks/uploads
openapi: 3.1.0
info:
  title: Trajectory API
  version: 0.1.0
servers:
  - url: https://api.trajectory.ai
security: []
paths:
  /api/v1/benchmarks/uploads:
    post:
      tags:
        - benchmarks
      summary: Create Benchmark Upload
      description: >-
        Allocate signed GCS PUT URLs for one batch of files (manifest.json and
        task artifacts). Omit bench_id to mint a new benchmark; pass the
        returned bench_id on later calls to add more files to the same
        benchmark, which is how a file set over the per-request limit is
        uploaded. No rows are written until the ingest call.
      operationId: createBenchmarkUpload
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BenchmarkUploadBatchRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateBenchmarkUploadResponse'
        default:
          $ref: '#/components/responses/ApiErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    BenchmarkUploadBatchRequest:
      properties:
        files:
          items:
            $ref: '#/components/schemas/BenchmarkUploadFile'
          type: array
          title: Files
          description: Files to sign upload URLs for, one URL returned per declared path.
        bench_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Bench Id
          description: >-
            Omit to mint a new benchmark. Pass a bench_id returned by an earlier
            batch to add these files to that benchmark's upload prefix, which is
            how a file set larger than the per-request limit is uploaded. An
            already-ingested bench_id is rejected.
      type: object
      required:
        - files
      title: BenchmarkUploadBatchRequest
    CreateBenchmarkUploadResponse:
      properties:
        bench_id:
          type: string
          title: Bench Id
        urls:
          items:
            $ref: '#/components/schemas/BenchmarkUploadUrl'
          type: array
          title: Urls
        expires_at:
          type: string
          format: date-time
          title: Expires At
      type: object
      required:
        - bench_id
        - urls
        - expires_at
      title: CreateBenchmarkUploadResponse
    BenchmarkUploadFile:
      properties:
        path:
          type: string
          title: Path
        content_type:
          type: string
          title: Content Type
        size_bytes:
          type: integer
          title: Size Bytes
      type: object
      required:
        - path
        - content_type
        - size_bytes
      title: BenchmarkUploadFile
    BenchmarkUploadUrl:
      properties:
        path:
          type: string
          title: Path
        url:
          type: string
          title: Url
        headers:
          additionalProperties:
            type: string
          type: object
          title: Headers
      type: object
      required:
        - path
        - url
        - headers
      title: BenchmarkUploadUrl
    ApiErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ApiErrorBody'
      required:
        - error
      title: ApiErrorEnvelope
      type: object
    ApiErrorBody:
      properties:
        type:
          $ref: '#/components/schemas/ErrorType'
        code:
          title: Code
          type: string
        message:
          type: string
          title: Message
        param:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Param
        doc_url:
          type: string
          title: Doc Url
        context:
          additionalProperties: true
          title: Context
          type: object
      required:
        - type
        - code
        - message
        - doc_url
        - context
      title: ApiErrorBody
      type: object
    ErrorType:
      enum:
        - invalid_request_error
        - authentication_error
        - permission_error
        - conflict_error
        - rate_limit_error
        - dependency_error
        - api_error
      title: ErrorType
      type: string
  responses:
    ApiErrorResponse:
      description: >-
        Common API error. Possible codes: `authentication_required`,
        `permission_denied`, `validation_error`, `rate_limited`,
        `internal_error`, `service_unavailable`.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/RequestId'
        Trajectory-Should-Retry:
          $ref: '#/components/headers/TrajectoryShouldRetry'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorEnvelope'
  headers:
    RequestId:
      schema:
        type: string
    TrajectoryShouldRetry:
      schema:
        type: boolean
    RetryAfter:
      schema:
        type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Organization API key

````