---
title: "Create Evaluation"
method: POST
path: "/sdk/v1/evaluations"
---

# Create Evaluation

`POST /sdk/v1/evaluations`

Create a new evaluation.

## Request body

- EvaluationBody
  - `promptId` string, required
  - `appendedMessages` ConversationMessage[], required — The messages to append to the completion messages when running the evaluation.
    - `content` MessageContentBlockSchema[], required
      - union
        - TextContentBlock
          - `type` 'TEXT', required
          - `text` string, required
        - ImageBase64ContentBlock
          - `type` 'IMAGE_BASE64', required
          - `imageBase64` string, required
          - `mediaType` string, required
        - ToolCallContentBlock
          - `type` 'TOOL_CALL', required
          - `toolCall` ToolFunctionCall, required
            - `toolCallId` string, required — TOOL_CALL_1
            - `type` 'function', required — The type of the tool. Currently, only `function` is supported.
            - `function` object, required
              - …
        - ToolResultContentBlock
          - `type` 'TOOL_RESULT', required
          - `toolCallId` string, required
          - `result` string, required
    - `role` 'assistant' | 'system' | 'tool' | 'user', required
  - `variables` PromptVariables, required — The template variables added to the prompt when executing the prompt.
  - `weight` number — How heavily to weigh the evaluation within the prompt.
  - `threshold` number — What percentage of assertions must pass for the evaluation to pass.

## Response `201`

Successful operation

- Evaluation
  - `id` string, required
  - `promptId` string, required
  - `appendedMessages` ConversationMessage[], required — The messages to append to the completion messages when running the evaluation.
    - `content` MessageContentBlockSchema[], required
      - union
        - TextContentBlock
          - `type` 'TEXT', required
          - `text` string, required
        - ImageBase64ContentBlock
          - `type` 'IMAGE_BASE64', required
          - `imageBase64` string, required
          - `mediaType` string, required
        - ToolCallContentBlock
          - `type` 'TOOL_CALL', required
          - `toolCall` ToolFunctionCall, required
            - `toolCallId` string, required — TOOL_CALL_1
            - `type` 'function', required — The type of the tool. Currently, only `function` is supported.
            - `function` object, required
              - …
        - ToolResultContentBlock
          - `type` 'TOOL_RESULT', required
          - `toolCallId` string, required
          - `result` string, required
    - `role` 'assistant' | 'system' | 'tool' | 'user', required
  - `variables` PromptVariables, required — The template variables added to the prompt when executing the prompt.
  - `weight` number — How heavily to weigh the evaluation within the prompt.
  - `threshold` number — What percentage of assertions must pass for the evaluation to pass.

## Other responses

- `400` — Missing or invalid parameters
- `401` — Unauthorized
- `500` — Internal Server Error

---

[API](https://skmtc.net/prompt-foundry/apis/prompt-foundry-api.md) · [All operations](https://skmtc.net/prompt-foundry/apis/prompt-foundry-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/prompt-foundry/prompt-foundry-api/versions/84eb1e848fd1/schema)
