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

# Create a Benchmark.

> Create a Benchmark with a set of Scenarios.



## OpenAPI

````yaml /openapi-specs/stainless-processed-openapi.json post /v1/benchmarks
openapi: 3.1.0
info:
  title: RunLoop API
  version: '0.1'
  description: >-
    The RunLoop API spec that allows you to host lambda functions and Devboxes
    to enable scaled long running ai workflows.
  contact:
    name: Runloop AI Support
    url: https://runloop.ai
    email: support@runloop.ai
servers:
  - url: https://api.runloop.ai
    description: Runloop API
    variables: {}
security:
  - bearerAuth: []
tags:
  - name: Benchmark
  - name: Blueprint
  - name: Blueprint-Lifecycle
  - name: Blueprint-ObservabilityTools
  - name: Devbox
  - name: Devbox-FileTools
  - name: Devbox-Lifecycle
  - name: Devbox-NetworkTools
  - name: Devbox-ObservabilityTools
  - name: Devbox-PersistenceTools
  - name: Devbox-ShellTools
  - name: Scenario
  - name: ScenarioScorer
  - name: accounts
  - name: agents
  - name: apikeys
  - name: axons
  - name: executions
  - name: gateway-configs
  - name: mcp-configs
  - name: network-policies
  - name: objects
  - name: restricted_keys
  - name: secrets
  - name: streaming
paths:
  /v1/benchmarks:
    post:
      tags:
        - Benchmark
      summary: Create a Benchmark.
      description: Create a Benchmark with a set of Scenarios.
      operationId: createBenchmark
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BenchmarkCreateParameters'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BenchmarkDefinitionView'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Runloop from '@runloop/api-client';


            const client = new Runloop({
              bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
            });


            const benchmarkView = await client.benchmarks.create({ name: 'name'
            });


            console.log(benchmarkView.id);
        - lang: Python
          source: |-
            import os
            from runloop_api_client import Runloop

            client = Runloop(
                bearer_token=os.environ.get("RUNLOOP_API_KEY"),  # This is the default and can be omitted
            )
            benchmark_view = client.benchmarks.create(
                name="name",
            )
            print(benchmark_view.id)
components:
  schemas:
    BenchmarkCreateParameters:
      type: object
      description: >-
        BenchmarkCreateParameters contain the set of parameters to create a
        Benchmark.
      properties:
        name:
          type: string
          description: The unique name of the Benchmark.
        scenario_ids:
          items:
            type: string
          description: The Scenario IDs that make up the Benchmark.
          type:
            - array
            - 'null'
        metadata:
          additionalProperties:
            type: string
          description: User defined metadata to attach to the benchmark.
          type:
            - object
            - 'null'
        required_environment_variables:
          items:
            type: string
          description: >-
            Environment variables required to run the benchmark. If any required
            variables are not supplied, the benchmark will fail to start.
          type:
            - array
            - 'null'
        required_secret_names:
          type: array
          items:
            type: string
          description: >-
            Secrets required to run the benchmark with (environment variable
            name will be mapped to the your user secret by name). If any of
            these secrets are not provided or the mapping is incorrect, the
            benchmark will fail to start.
        attribution:
          description: Attribution information for the benchmark.
          type:
            - string
            - 'null'
        description:
          description: Detailed description of the benchmark.
          type:
            - string
            - 'null'
      required:
        - name
    BenchmarkDefinitionView:
      type: object
      description: >-
        A BenchmarkDefinitionView represents a grouped set of Scenarios that
        together form a Benchmark.
      properties:
        id:
          type: string
          description: The ID of the Benchmark.
        name:
          type: string
          description: The name of the Benchmark.
        scenarioIds:
          type: array
          items:
            type: string
          description: List of Scenario IDs that make up the benchmark.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: User defined metadata to attach to the benchmark for organization.
        required_environment_variables:
          type: array
          items:
            type: string
          description: >-
            Required environment variables used to run the benchmark. If any
            required environment variables are missing, the benchmark will fail
            to start.
        required_secret_names:
          type: array
          items:
            type: string
          description: >-
            Required secrets used to run the benchmark. If any required secrets
            are missing, the benchmark will fail to start.
        is_public:
          type: boolean
          description: Whether this benchmark is public.
        attribution:
          type: string
          description: Attribution information for the benchmark.
        description:
          type: string
          description: Detailed description of the benchmark.
        status:
          $ref: '#/components/schemas/BenchmarkStatus'
          description: >-
            Whether the benchmark is active or archived. Archived benchmarks are
            excluded from listings and cannot be run.
      required:
        - id
        - name
        - scenarioIds
        - metadata
        - status
    BenchmarkStatus:
      type: string
      enum:
        - active
        - archived
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````