POST
/
v1
/
eval
from atla import Atla

client = Atla()

# Direct evaluation
evaluation = client.evaluation.create(
    model_id="atla-selene",
    model_input="What is the capital of France?",
    model_output="Paris",
    evaluation_criteria="Evaluate the answer based on its factual correctness. Assign a score of 1 if the answer is factually correct, otherwise assign a score of 0.",
).result.evaluation

print(evaluation)

# Metric-based evaluation
evaluation = client.evaluation.create(
    model_id="atla-selene",
    model_input="What is the capital of France?",
    model_output="Paris",
    metric_name="my_custom_correctness_metric",
).result.evaluation

print(evaluation)
{
  "request_id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "success",
  "result": {
    "model_id": "atla-selene-mini-20250127",
    "evaluation": {
      "score": "1",
      "critique": "The model output is factually correct and well-reasoned. It does not provide any additional information not directly supported by the input or context provided."
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

A request to an Atla evaluator via the /eval endpoint.

Response

200
application/json
Success

A response to an Atla evaluator via the /eval endpoint.