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

# Start an eval run

> Queues a run of the scenario. At most 5 runs per account may be pending or running at once;
further starts return 429 with a plain `error` message and no `Retry-After`. Starts are also
rate-limited (burst 2, then one start every 10 seconds) with the standard rate-limit envelope.




## OpenAPI

````yaml /api-reference/openapi.yaml post /api/v1/evals/{eval_id}/runs
openapi: 3.1.0
info:
  title: Customer API
  version: 1.0.0-beta
  description: >
    **Beta.** This API is in beta. Contracts can still change while we complete
    it, including

    breaking changes; we announce changes in the release notes and keep them as
    rare as we can.

    Pin your integration to the field names and status codes documented here and
    treat unknown

    fields as optional.


    REST API to create and configure voice agents, add tools, test them with
    evals, read

    conversations, and place AI outbound calls.


    **Authentication.** Voice agents, settings, tools, evals and conversations
    use an API token

    created on the **Keys** page of your dashboard. Each operation lists the
    scope it needs under

    `x-required-scopes`; `<resource>:*` grants every action of a resource.
    Outbound calls use a

    separate outbound API token from the **Outbound Calls** page. Send either
    token as

    `Authorization: Bearer <token>`.


    **Responses.** A single resource is returned as a flat JSON object; a
    collection is wrapped in a plural

    key (`voice_agents`, `tools`, `evals`, `conversations`) next to its paging
    fields. Deleting returns

    `204 No Content`. Everything is addressed by the voice agent's `id`; prompts
    and numbers are internal.


    **Errors.** Authentication failures return `{ "error", "message" }`. Request
    quotas return

    `429` with a `Retry-After` header and `{ "error", "message", "details" }`,
    where `error` is a

    stable machine-readable code. Every API call must finish within 30 seconds;
    longer requests return `503` with

    `mf-core:api-request-timeout`. Validation errors list the problems per
    field; the exact shape is

    shown on each operation.
servers:
  - url: https://app.miyon.ai
security: []
tags:
  - name: Voice Agents
    description: >-
      Create and manage voice agents. Configure them through the voice, prompt
      and knowledge-base settings endpoints.
  - name: Voice Agent Settings
    description: >-
      Read and change a voice agent's voice, prompt and knowledge-base settings.
      A voice agent has one prompt (its instructions, greeting and conversation
      settings). Read the schema of a settings group, then update one
      `key`/`value` pair per request.
  - name: Tools
    description: >-
      Create, configure, enable and execute agent tools. Tools are enabled per
      voice agent with `agent_id`. These endpoints accept scoped API tokens
      only; every error uses the `{ "error", "message", "details" }` envelope
      with a stable `mf-core:tool-*` code.
  - name: Outbound Calls
    description: >-
      Place AI calls and review their outcome. Authenticate with the outbound
      API token from the **Outbound Calls** page.
  - name: Conversations
    description: >-
      List and inspect the conversations of your account, including transcripts
      when your retention settings allow.
  - name: Evals
    description: >-
      Evals are automated test conversations that check how a voice agent
      responds. A scenario contains cases; each case contains the caller's turns
      and what the agent must say or do. Run a scenario to get pass/fail
      results.
paths:
  /api/v1/evals/{eval_id}/runs:
    parameters:
      - name: eval_id
        in: path
        required: true
        schema:
          type: integer
        description: ID of the eval scenario.
    post:
      tags:
        - Evals
      summary: Start an eval run
      description: >
        Queues a run of the scenario. At most 5 runs per account may be pending
        or running at once;

        further starts return 429 with a plain `error` message and no
        `Retry-After`. Starts are also

        rate-limited (burst 2, then one start every 10 seconds) with the
        standard rate-limit envelope.
      operationId: startEvalRun
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EvalRunStartRequest'
            example:
              repetitions: 1
      responses:
        '201':
          description: Eval run started.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EvalRunStartResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/EvalNotFound'
        '422':
          description: The run could not be started. It is recorded with status `error`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EvalRequestError'
              example:
                error: 'Failed to start eval: Eval service rejected batch'
        '429':
          description: >-
            Either the per-account concurrency cap (plain `error`, no
            `Retry-After`) or the rate limit (`Retry-After` set).
          headers:
            Retry-After:
              description: Seconds to wait. Present only for the rate-limit variant.
              schema:
                type: integer
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/EvalRequestError'
                    title: Concurrency cap
                  - $ref: '#/components/schemas/ApiError'
                    title: Rate limit
              examples:
                concurrency:
                  value:
                    error: >-
                      You have 5 eval runs in progress. Please wait for some to
                      finish.
                rateLimit:
                  value:
                    error: mf-core:rate-limit-exceeded
                    message: Rate limit exceeded
                    details:
                      policy: eval_start
                      retry_after: 10
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - scopedJwt: []
components:
  schemas:
    EvalRunStartRequest:
      type: object
      properties:
        repetitions:
          type: integer
          minimum: 1
          maximum: 20
          default: 1
          description: Number of times to run every case (1-20, default 1).
    EvalRunStartResponse:
      type: object
      required:
        - eval_run_id
        - scenario_id
        - status
        - poll_url
      properties:
        eval_run_id:
          type: integer
          description: ID of the new run.
        scenario_id:
          type: integer
          description: ID of the scenario.
        status:
          type: string
          const: running
          description: Always `running`.
        poll_url:
          type: string
          description: Relative path of `GET /api/v1/evals/{eval_id}/runs/{id}`.
          examples:
            - /api/v1/evals/12/runs/345
    EvalRequestError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Why the request failed, in English.
    ApiError:
      type: object
      description: >-
        Error format with a stable machine-readable `error` code, a
        human-readable `message` and request-specific `details`.
      properties:
        error:
          type: string
          description: >-
            Stable machine-readable error code, for example
            `mf-core:rate-limit-exceeded`.
        message:
          type: string
          description: Human-readable explanation.
        details:
          type: object
          additionalProperties: true
          description: >-
            Request-specific data, for example the offending parameter or the
            quota policy.
      required:
        - error
        - message
        - details
    AuthError:
      type: object
      description: >-
        Returned when the API token is missing, invalid, expired or lacks the
        required scope.
      properties:
        error:
          type: string
          description: Short error category.
          examples:
            - Authentication failed
            - Forbidden
        message:
          type: string
          description: Human-readable explanation. Absent on some 403 responses.
          examples:
            - 'Missing required scope: voice_agents:write'
      required:
        - error
  responses:
    Unauthorized:
      description: Missing, expired or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthError'
          example:
            error: Authentication failed
            message: Missing bearer token
    Forbidden:
      description: >-
        The token does not carry the scope this operation requires (see
        `x-required-scopes`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthError'
          example:
            error: Forbidden
            message: 'Missing required scope: voice_agents:write'
    EvalNotFound:
      description: Eval scenario or run not found in your account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EvalRequestError'
          example:
            error: Record not found error
    ServiceUnavailable:
      description: >-
        The request was not completed. Either it exceeded the 30-second request
        time limit that applies to every API call (narrow the request and
        retry), or rate limiting is temporarily unavailable. Retry shortly.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            timeout:
              value:
                error: mf-core:api-request-timeout
                message: The API request exceeded the 30-second time limit
                details: {}
            limiter:
              value:
                error: mf-core:rate-limiter-unavailable
                message: API rate limiting is temporarily unavailable
                details:
                  policy: api_write
  securitySchemes:
    scopedJwt:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Scoped API token. Required scopes are listed on each operation in
        x-required-scopes.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.