> ## 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.

# Try Eval

> Try an eval without running the agent. Pass evalId for a saved eval, draft for unsaved content (over the saved eval when both are given), and source for the answers: {type: "run", runId} re-grades a past test run's stored answers, one result each; {type: "chat", threadId, questionId} (from evals/chat-answers) judges one chat answer as continuous evaluation would, skipping it when it lacks what the eval reads. Charges AI credits for a judge's calls (a manual check calls no model); stores nothing. A chat source is refused with EVAL_CHAT_CONFIDENTIAL_DATA for an organization whose data stays confidential, and EVAL_CHAT_ANSWER_NOT_FOUND for a turn not in this workspace.



## OpenAPI

````yaml post /v2/api/projects/{projectId}/workspaces/{workspaceId}/evals/try
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/try:
    post:
      summary: Try an eval without running the agent. Pass evalI…
      description: >-
        Try an eval without running the agent. Pass evalId for a saved eval,
        draft for unsaved content (over the saved eval when both are given), and
        source for the answers: {type: "run", runId} re-grades a past test run's
        stored answers, one result each; {type: "chat", threadId, questionId}
        (from evals/chat-answers) judges one chat answer as continuous
        evaluation would, skipping it when it lacks what the eval reads. Charges
        AI credits for a judge's calls (a manual check calls no model); stores
        nothing. A chat source is refused with EVAL_CHAT_CONFIDENTIAL_DATA for
        an organization whose data stays confidential, and
        EVAL_CHAT_ANSWER_NOT_FOUND for a turn not in this workspace.
      operationId: PostV2ApiProjectsProjectIdWorkspacesWorkspaceIdEvalsTry
      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/try
          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})$
                evalId:
                  description: >-
                    A saved eval to try, as the draft holds it. Omit to try an
                    unsaved draft alone.
                  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})$
                draft:
                  type: object
                  properties:
                    name:
                      description: A name for the draft, shown in the results. Optional.
                      type: string
                      minLength: 1
                      maxLength: 200
                    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.
                  description: >-
                    Unsaved eval content to judge with: a kind and its config.
                    With evalId, a field given replaces the saved eval's;
                    without evalId the kind is required.
                source:
                  oneOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          const: run
                          description: Re-grade a past test run's answers.
                        runId:
                          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 test run whose stored answers are re-graded. It
                            must belong to this workspace.
                        caseIds:
                          description: >-
                            Only these test cases' answers. Omit for every case
                            of the run.
                          maxItems: 50
                          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})$
                        limit:
                          description: >-
                            How many stored answers to re-grade, at most 50
                            (default 20), in the run's order.
                          type: integer
                          minimum: 1
                          maximum: 50
                      required:
                        - type
                        - runId
                      description: 'A past test run: every stored answer is re-graded.'
                    - type: object
                      properties:
                        type:
                          type: string
                          const: chat
                          description: Judge one recorded chat answer.
                        threadId:
                          type: string
                          minLength: 1
                          maxLength: 200
                          description: >-
                            The conversation of the answer to judge (from
                            chat-answers).
                        questionId:
                          type: string
                          minLength: 1
                          maxLength: 200
                          description: The turn of the answer to judge (from chat-answers).
                      required:
                        - type
                        - threadId
                        - questionId
                      description: >-
                        One chat answer, judged as continuous evaluation would
                        judge it. Refused for an organization whose data stays
                        confidential.
                  description: >-
                    The answers to try the eval on: {type: "run"} re-grades a
                    past test run's stored answers; {type: "chat"} judges one
                    recorded chat answer.
                  discriminator:
                    propertyName: type
              required:
                - source
            examples:
              example1:
                value:
                  apiKey: up_embed_************
                  organizationId: 123e4567-e89b-12d3-a456-426614174000
        required: true
      responses:
        '200':
          description: >-
            POST /v2/api/projects/:projectId/workspaces/:workspaceId/evals/try
            Positive response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    type: object
                    properties:
                      evalName:
                        type: string
                        description: The name of the eval (or draft) tried.
                      results:
                        type: array
                        items:
                          type: object
                          properties:
                            testCaseId:
                              type:
                                - string
                                - 'null'
                            attemptIndex:
                              type:
                                - integer
                                - 'null'
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            stepIndex:
                              type:
                                - integer
                                - 'null'
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            threadId:
                              type:
                                - string
                                - 'null'
                            questionId:
                              type:
                                - string
                                - 'null'
                            userMessage:
                              type: string
                              description: The question or message the step asked.
                            answer:
                              type: string
                              description: The agent's answer that was judged.
                            status:
                              type: string
                              enum:
                                - passed
                                - failed
                                - errored
                                - skipped
                              description: >-
                                The eval's verdict. `skipped` when there was
                                nothing to judge (a failed or empty stored turn)
                                or the answer lacks what the eval reads;
                                `errored` when the judge could not run.
                            reason:
                              type:
                                - string
                                - 'null'
                            report:
                              type:
                                - string
                                - 'null'
                            observed:
                              type:
                                - string
                                - 'null'
                            expected:
                              type:
                                - string
                                - 'null'
                            judgeModel:
                              type:
                                - string
                                - 'null'
                            cached:
                              type: boolean
                              description: >-
                                True when an identical answer earlier in this
                                request was reused.
                            costCredits:
                              type:
                                - number
                                - 'null'
                          required:
                            - testCaseId
                            - attemptIndex
                            - stepIndex
                            - threadId
                            - questionId
                            - userMessage
                            - answer
                            - status
                            - reason
                            - report
                            - observed
                            - expected
                            - judgeModel
                            - cached
                            - costCredits
                          additionalProperties: false
                        description: >-
                          One verdict per judged answer: a run's stored answers
                          in the run's order, or exactly one for a chat answer.
                      summary:
                        type: object
                        properties:
                          passed:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                            description: Answers the eval passed.
                          failed:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                            description: Answers it failed.
                          errored:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                            description: Answers the judge could not grade.
                          skipped:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                            description: Answers with nothing to judge.
                          costCredits:
                            type:
                              - number
                              - 'null'
                        required:
                          - passed
                          - failed
                          - errored
                          - skipped
                          - costCredits
                        additionalProperties: false
                        description: Counts over the results.
                      notes:
                        type: array
                        items:
                          type: string
                        description: >-
                          Caveats about this trial, e.g. that result data was
                          read again now rather than as it was during the run.
                    required:
                      - evalName
                      - results
                      - summary
                      - notes
                    additionalProperties: false
                required:
                  - status
                  - data
                additionalProperties: false
        '400':
          description: >-
            POST /v2/api/projects/:projectId/workspaces/:workspaceId/evals/try
            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.