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

# Create Eval

> Create an eval: a manual check (kind check, config {metric, operator, value}, e.g. row_count gte 20) or an LLM judge (kind judge, config {instructions, model?} with {{variables}} such as {{final_answer}}). GET eval-inputs lists the metrics and variables. An invalid config is refused with EVAL_CONFIG_INVALID naming the field; a variable the organization may not send to a model, with EVAL_INPUT_BLOCKED.



## OpenAPI

````yaml post /v2/api/projects/{projectId}/workspaces/{workspaceId}/evals
openapi: 3.1.0
info:
  title: Upsolve API
  version: 1.5.0
servers:
  - url: https://api.upsolve.ai
security: []
tags: []
paths:
  /v2/api/projects/{projectId}/workspaces/{workspaceId}/evals:
    post:
      summary: 'Create an eval: a manual check (kind check, confi…'
      description: >-
        Create an eval: a manual check (kind check, config {metric, operator,
        value}, e.g. row_count gte 20) or an LLM judge (kind judge, config
        {instructions, model?} with {{variables}} such as {{final_answer}}). GET
        eval-inputs lists the metrics and variables. An invalid config is
        refused with EVAL_CONFIG_INVALID naming the field; a variable the
        organization may not send to a model, with EVAL_INPUT_BLOCKED.
      operationId: PostV2ApiProjectsProjectIdWorkspacesWorkspaceIdEvals
      parameters:
        - name: projectId
          in: path
          required: true
          description: The project the workspace belongs to.
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
            description: The project the workspace belongs to.
        - name: workspaceId
          in: path
          required: true
          description: The workspace.
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
            description: The workspace.
      requestBody:
        description: >-
          POST /v2/api/projects/:projectId/workspaces/:workspaceId/evals Request
          body
        content:
          application/json:
            schema:
              type: object
              properties:
                apiKey:
                  type: string
                  minLength: 1
                  description: >-
                    Upsolve API key, generated under Account → Developer
                    settings in the Upsolve Hub. Keys are user-scoped: pass
                    organizationId alongside the key to select which org to act
                    on.
                  examples:
                    - up_embed_************
                organizationId:
                  description: >-
                    Your Upsolve organization's UUID — the org that owns the API
                    key and project. This is NOT a project organization: do not
                    pass a value registered via /projects/register-organization,
                    and do not pass an `externalId` (only
                    `projectOrganizationId` accepts those). Omit it when using
                    an org-bound API key — the org is read from the key and any
                    value sent here is ignored. Required only for user-scoped
                    API keys (created under Account → Developer settings) and
                    for the Supabase JWT path, where the org is ambiguous and
                    membership is verified against it.
                  examples:
                    - 123e4567-e89b-12d3-a456-426614174000
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                name:
                  type: string
                  minLength: 1
                  maxLength: 200
                  description: The eval's name.
                kind:
                  type: string
                  enum:
                    - check
                    - judge
                  description: >-
                    check: a manual check of one metric against a value. judge:
                    an LLM judge following instructions with {{variables}}.
                config:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                  description: >-
                    check: {metric, operator, value} — e.g. {metric:
                    'row_count', operator: 'gte', value: 20}; GET eval-inputs
                    lists every metric with its operators. judge: {instructions,
                    model?} — instructions use {{variables}} (GET eval-inputs
                    lists them), at least one besides {{question}}; model is
                    {provider, model} or null for the default.
                continuous:
                  description: >-
                    Continuous evaluation settings, or null / omitted for test
                    runs only.
                  type:
                    - object
                    - 'null'
                  propertyNames:
                    type: string
                  additionalProperties: {}
              required:
                - name
                - kind
                - config
            examples:
              example1:
                value:
                  apiKey: up_embed_************
                  organizationId: 123e4567-e89b-12d3-a456-426614174000
        required: true
      responses:
        '201':
          description: >-
            POST /v2/api/projects/:projectId/workspaces/:workspaceId/evals
            Positive response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    type: object
                    properties:
                      eval:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                            description: The eval's id.
                          workspaceId:
                            type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                            description: The workspace it belongs to.
                          name:
                            type: string
                            description: The eval's name.
                          kind:
                            type: string
                            enum:
                              - check
                              - judge
                            description: 'What it is: check or judge.'
                          isDefault:
                            type: boolean
                            description: >-
                              True for the eval migrated from the workspace's
                              old evaluator.
                          current:
                            type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - check
                                  - judge
                                description: >-
                                  check: a manual check of one metric against a
                                  value. judge: an LLM judge following
                                  instructions with {{variables}}.
                              config:
                                anyOf:
                                  - oneOf:
                                      - type: object
                                        properties:
                                          metric:
                                            type: string
                                            const: answer_text
                                          operator:
                                            type: string
                                            enum:
                                              - contains
                                              - not_contains
                                            description: contains or not_contains.
                                          value:
                                            type: string
                                            minLength: 1
                                            maxLength: 500
                                            description: The text to look for.
                                          caseSensitive:
                                            description: Match case (default false).
                                            type: boolean
                                        required:
                                          - metric
                                          - operator
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          metric:
                                            type: string
                                            const: agent_sql
                                          operator:
                                            type: string
                                            enum:
                                              - contains
                                              - not_contains
                                            description: contains or not_contains.
                                          value:
                                            type: string
                                            minLength: 1
                                            maxLength: 500
                                            description: The text to look for.
                                          caseSensitive:
                                            description: Match case (default false).
                                            type: boolean
                                        required:
                                          - metric
                                          - operator
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          metric:
                                            type: string
                                            const: sql_tables
                                          operator:
                                            type: string
                                            enum:
                                              - contains
                                              - not_contains
                                            description: contains or not_contains.
                                          value:
                                            type: string
                                            minLength: 1
                                            maxLength: 200
                                            pattern: ^[^\s'"`;,()]+$
                                            description: >-
                                              The name to look for among the tables
                                              read: plain, no quotes. A dotted name
                                              (schema.table) matches by its last
                                              parts.
                                        required:
                                          - metric
                                          - operator
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          metric:
                                            type: string
                                            const: sql_columns
                                          operator:
                                            type: string
                                            enum:
                                              - contains
                                              - not_contains
                                            description: contains or not_contains.
                                          value:
                                            type: string
                                            minLength: 1
                                            maxLength: 200
                                            pattern: ^[^\s'"`;,()]+$
                                            description: >-
                                              The name to look for among the columns
                                              read: plain, no quotes. A dotted name
                                              (schema.table) matches by its last
                                              parts.
                                        required:
                                          - metric
                                          - operator
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          metric:
                                            type: string
                                            const: sql_functions
                                          operator:
                                            type: string
                                            enum:
                                              - contains
                                              - not_contains
                                            description: contains or not_contains.
                                          value:
                                            type: string
                                            minLength: 1
                                            maxLength: 200
                                            pattern: ^[^\s'"`;,()]+$
                                            description: >-
                                              The name to look for among the functions
                                              used: plain, no quotes. A dotted name
                                              (schema.table) matches by its last
                                              parts.
                                        required:
                                          - metric
                                          - operator
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          metric:
                                            type: string
                                            const: sql_output_columns
                                          operator:
                                            type: string
                                            enum:
                                              - contains
                                              - not_contains
                                            description: contains or not_contains.
                                          value:
                                            type: string
                                            minLength: 1
                                            maxLength: 200
                                            pattern: ^[^\s'"`;,()]+$
                                            description: >-
                                              The name to look for among the output
                                              columns: plain, no quotes. A dotted name
                                              (schema.table) matches by its last
                                              parts.
                                        required:
                                          - metric
                                          - operator
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          metric:
                                            type: string
                                            const: sql_clauses
                                          operator:
                                            type: string
                                            enum:
                                              - contains
                                              - not_contains
                                            description: contains or not_contains.
                                          value:
                                            type: string
                                            enum:
                                              - select_star
                                              - limit
                                              - order_by
                                              - cte
                                              - set_operation
                                              - subquery
                                            description: >-
                                              select_star: reads *; limit: an
                                              outermost LIMIT/TOP; order_by: an
                                              outermost ORDER BY; cte: a WITH;
                                              set_operation: UNION/INTERSECT/EXCEPT;
                                              subquery: a nested query.
                                        required:
                                          - metric
                                          - operator
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          metric:
                                            type: string
                                            const: chart_type
                                          operator:
                                            type: string
                                            const: is
                                          value:
                                            type: string
                                            minLength: 1
                                            maxLength: 40
                                            description: >-
                                              The chart type the agent must draw, e.g.
                                              bar or line.
                                        required:
                                          - metric
                                          - operator
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          metric:
                                            type: string
                                            const: chart_dimensions
                                          operator:
                                            type: string
                                            const: include
                                          value:
                                            minItems: 1
                                            maxItems: 20
                                            type: array
                                            items:
                                              type: string
                                              minLength: 1
                                              maxLength: 200
                                            description: Fields the chart must include.
                                        required:
                                          - metric
                                          - operator
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          metric:
                                            type: string
                                            const: chart_measures
                                          operator:
                                            type: string
                                            const: include
                                          value:
                                            minItems: 1
                                            maxItems: 20
                                            type: array
                                            items:
                                              type: string
                                              minLength: 1
                                              maxLength: 200
                                            description: Fields the chart must include.
                                        required:
                                          - metric
                                          - operator
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          metric:
                                            type: string
                                            const: chart_row_count
                                          operator:
                                            type: string
                                            enum:
                                              - gte
                                              - lte
                                              - eq
                                              - gt
                                              - lt
                                            description: >-
                                              gte: at least, lte: at most, eq:
                                              exactly, gt: more than, lt: less than.
                                          value:
                                            type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                            description: The number to compare with, in rows.
                                        required:
                                          - metric
                                          - operator
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          metric:
                                            type: string
                                            const: row_count
                                          operator:
                                            type: string
                                            enum:
                                              - gte
                                              - lte
                                              - eq
                                              - gt
                                              - lt
                                            description: >-
                                              gte: at least, lte: at most, eq:
                                              exactly, gt: more than, lt: less than.
                                          value:
                                            type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                            description: The number to compare with, in rows.
                                        required:
                                          - metric
                                          - operator
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          metric:
                                            type: string
                                            const: column_count
                                          operator:
                                            type: string
                                            enum:
                                              - gte
                                              - lte
                                              - eq
                                              - gt
                                              - lt
                                            description: >-
                                              gte: at least, lte: at most, eq:
                                              exactly, gt: more than, lt: less than.
                                          value:
                                            type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                            description: The number to compare with, in columns.
                                        required:
                                          - metric
                                          - operator
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          metric:
                                            type: string
                                            const: latency_ms
                                          operator:
                                            type: string
                                            enum:
                                              - gte
                                              - lte
                                              - eq
                                              - gt
                                              - lt
                                            description: >-
                                              gte: at least, lte: at most, eq:
                                              exactly, gt: more than, lt: less than.
                                          value:
                                            type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                            description: The number to compare with, in ms.
                                        required:
                                          - metric
                                          - operator
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          metric:
                                            type: string
                                            const: cost_credits
                                          operator:
                                            type: string
                                            enum:
                                              - gte
                                              - lte
                                              - eq
                                              - gt
                                              - lt
                                            description: >-
                                              gte: at least, lte: at most, eq:
                                              exactly, gt: more than, lt: less than.
                                          value:
                                            type: number
                                            minimum: 0
                                            maximum: 1000
                                            description: The number to compare with, in credits.
                                        required:
                                          - metric
                                          - operator
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          metric:
                                            type: string
                                            const: step_count
                                          operator:
                                            type: string
                                            enum:
                                              - gte
                                              - lte
                                              - eq
                                              - gt
                                              - lt
                                            description: >-
                                              gte: at least, lte: at most, eq:
                                              exactly, gt: more than, lt: less than.
                                          value:
                                            type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                            description: The number to compare with, in steps.
                                        required:
                                          - metric
                                          - operator
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          metric:
                                            type: string
                                            const: tool_call_count
                                          operator:
                                            type: string
                                            enum:
                                              - gte
                                              - lte
                                              - eq
                                              - gt
                                              - lt
                                            description: >-
                                              gte: at least, lte: at most, eq:
                                              exactly, gt: more than, lt: less than.
                                          value:
                                            type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                            description: The number to compare with, in calls.
                                        required:
                                          - metric
                                          - operator
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          metric:
                                            type: string
                                            const: errors_count
                                          operator:
                                            type: string
                                            enum:
                                              - gte
                                              - lte
                                              - eq
                                              - gt
                                              - lt
                                            description: >-
                                              gte: at least, lte: at most, eq:
                                              exactly, gt: more than, lt: less than.
                                          value:
                                            type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                            description: The number to compare with, in errors.
                                        required:
                                          - metric
                                          - operator
                                          - value
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          metric:
                                            type: string
                                            const: total_tokens
                                          operator:
                                            type: string
                                            enum:
                                              - gte
                                              - lte
                                              - eq
                                              - gt
                                              - lt
                                            description: >-
                                              gte: at least, lte: at most, eq:
                                              exactly, gt: more than, lt: less than.
                                          value:
                                            type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                            description: The number to compare with, in tokens.
                                        required:
                                          - metric
                                          - operator
                                          - value
                                        additionalProperties: false
                                    description: >-
                                      {metric, operator, value}: e.g. {metric:
                                      'row_count', operator: 'gte', value: 20}.
                                      Text metrics take contains|not_contains
                                      and caseSensitive; the SQL property
                                      metrics (sql_tables, sql_columns,
                                      sql_functions, sql_output_columns) take
                                      contains|not_contains and one plain name,
                                      e.g. {metric: 'sql_tables', operator:
                                      'contains', value: 'orders'}; sql_clauses
                                      takes contains|not_contains and one of
                                      select_star, limit, order_by, cte,
                                      set_operation, subquery; chart_type takes
                                      'is'; chart_dimensions/chart_measures take
                                      'include' and a list.
                                    discriminator:
                                      propertyName: metric
                                  - type: object
                                    properties:
                                      instructions:
                                        type: string
                                        description: >-
                                          What the judge decides, with
                                          {{variables}}.
                                      model:
                                        description: >-
                                          The judge's model, or null for the
                                          deployment's default.
                                        type:
                                          - object
                                          - 'null'
                                        properties:
                                          provider:
                                            type: string
                                            minLength: 1
                                            maxLength: 50
                                            description: The provider id.
                                          model:
                                            type: string
                                            minLength: 1
                                            maxLength: 200
                                            description: The model id.
                                        required:
                                          - provider
                                          - model
                                        additionalProperties: false
                                    required:
                                      - instructions
                                    additionalProperties: false
                                description: The kind's settings.
                              continuous:
                                type:
                                  - object
                                  - 'null'
                                properties:
                                  skipWhenDataMissing:
                                    type: boolean
                                    description: >-
                                      Skip an answer that lacks the data the
                                      eval reads (no SQL for a SQL eval, no
                                      chart for a chart eval...). Default true.
                                  skipRules:
                                    maxItems: 20
                                    type: array
                                    items:
                                      oneOf:
                                        - type: object
                                          properties:
                                            field:
                                              type: string
                                              const: draft
                                          required:
                                            - field
                                          additionalProperties: false
                                          description: >-
                                            Skip answers given by the draft (the
                                            Playground, draft testing).
                                        - type: object
                                          properties:
                                            field:
                                              type: string
                                              const: version
                                            operator:
                                              type: string
                                              enum:
                                                - in
                                                - not_in
                                              description: >-
                                                in: skip these versions. not_in: skip
                                                every version but these.
                                            versions:
                                              minItems: 1
                                              maxItems: 50
                                              type: array
                                              items:
                                                type: integer
                                                minimum: 1
                                                maximum: 9007199254740991
                                              description: Published workspace version numbers.
                                          required:
                                            - field
                                            - operator
                                            - versions
                                          additionalProperties: false
                                        - type: object
                                          properties:
                                            field:
                                              type: string
                                              const: user
                                            operator:
                                              type: string
                                              const: in
                                              description: 'in: skip these users'' answers.'
                                            userIds:
                                              minItems: 1
                                              maxItems: 100
                                              type: array
                                              items:
                                                type: string
                                                format: uuid
                                                pattern: >-
                                                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                                              description: Project user ids.
                                          required:
                                            - field
                                            - operator
                                            - userIds
                                          additionalProperties: false
                                        - type: object
                                          properties:
                                            field:
                                              type: string
                                              const: surface
                                            operator:
                                              type: string
                                              enum:
                                                - in
                                                - not_in
                                              description: >-
                                                in: skip these surfaces. not_in: skip
                                                every surface but these.
                                            surfaces:
                                              minItems: 1
                                              maxItems: 6
                                              type: array
                                              items:
                                                type: string
                                                enum:
                                                  - agent_studio
                                                  - embedded
                                                  - mcp
                                                  - slack
                                                  - playground
                                                  - shared_link
                                                description: Where a conversation happened.
                                          required:
                                            - field
                                            - operator
                                            - surfaces
                                          additionalProperties: false
                                        - type: object
                                          properties:
                                            field:
                                              type: string
                                              const: question
                                            operator:
                                              type: string
                                              enum:
                                                - contains
                                                - not_contains
                                              description: >-
                                                Whether the question contains the text,
                                                or does not.
                                            value:
                                              type: string
                                              minLength: 1
                                              maxLength: 200
                                            caseSensitive:
                                              description: Match case (default no).
                                              type: boolean
                                          required:
                                            - field
                                            - operator
                                            - value
                                          additionalProperties: false
                                        - type: object
                                          properties:
                                            field:
                                              type: string
                                              const: user_property
                                            property:
                                              type: string
                                              minLength: 1
                                              maxLength: 100
                                              description: A key of the project user's properties.
                                            operator:
                                              type: string
                                              enum:
                                                - equals
                                                - not_equals
                                                - is_set
                                                - is_not_set
                                            value:
                                              description: >-
                                                The value compared with (equals /
                                                not_equals only).
                                              type: string
                                              maxLength: 200
                                          required:
                                            - field
                                            - property
                                            - operator
                                          additionalProperties: false
                                      description: >-
                                        Skip the answer when: {field:'draft'};
                                        {field:'version',
                                        operator:'in'|'not_in', versions};
                                        {field:'user', operator:'in', userIds};
                                        {field:'surface',
                                        operator:'in'|'not_in', surfaces};
                                        {field:'question',
                                        operator:'contains'|'not_contains',
                                        value, caseSensitive?};
                                        {field:'user_property', property,
                                        operator:'equals'|'not_equals'|'is_set'|'is_not_set',
                                        value?}.
                                      discriminator:
                                        propertyName: field
                                    description: Skip an answer when ANY of these match.
                                required:
                                  - skipWhenDataMissing
                                  - skipRules
                                additionalProperties: false
                                description: >-
                                  Judge every analyst answer in chat with this
                                  eval. null turns it off.
                            required:
                              - kind
                              - config
                              - continuous
                            additionalProperties: false
                            description: >-
                              Its content as the version read holds it: for the
                              draft, what a draft run grades with and what the
                              next publish copies; for a published version, the
                              copy its publish wrote.
                          usedByCount:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                            description: >-
                              How many of the read version's test cases run this
                              eval.
                          createdAt:
                            type: string
                            description: When it was created (ISO 8601).
                          updatedAt:
                            type: string
                            description: When it was last changed (ISO 8601).
                        required:
                          - id
                          - workspaceId
                          - name
                          - kind
                          - isDefault
                          - current
                          - usedByCount
                          - createdAt
                          - updatedAt
                        additionalProperties: false
                        description: The eval as it now stands.
                      contentChanged:
                        type: boolean
                        description: >-
                          Whether the write changed what judges: its kind,
                          config or continuous settings.
                    required:
                      - eval
                      - contentChanged
                    additionalProperties: false
                required:
                  - status
                  - data
                additionalProperties: false
        '400':
          description: >-
            POST /v2/api/projects/:projectId/workspaces/:workspaceId/evals
            Negative response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: error
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      code:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                    required:
                      - message
                    additionalProperties: false
                required:
                  - status
                  - error
                additionalProperties: false
      security:
        - APIKEY_1: []
components:
  securitySchemes:
    APIKEY_1:
      type: apiKey
      in: query
      name: apiKey
      x-in-actual: body
      description: apiKey MUST be supplied within the request body instead of query

````

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