---
title: "Validate schema"
method: POST
path: "/agents/v2/schema/validate"
tags: ["Schema"]
---

# Validate schema

`POST /agents/v2/schema/validate`

## Request

- Base URL: `https://odyssey.asteroid.ai`
- URL: `https://odyssey.asteroid.ai/agents/v2/schema/validate`
- Auth: API key in header `X-Api-Key`

Validate a JSON schema against OpenAI structured output requirements

## Request body

- AgentsSchemaValidateSchemaRequest: Request to validate a JSON schema against OpenAI structured output requirements
  - `schema` object, required

## Response `200`

The request has succeeded.

- AgentsSchemaValidateSchemaResponse: Response from schema validation
  - `errors` string[], required: List of validation error messages (empty if valid)
  - `valid` boolean, required

## Other responses

- `400`: The server could not understand the request due to invalid syntax.
- `401`: Access is unauthorized.
- `403`: Access is forbidden.
- `404`: The server cannot find the requested resource.
- `500`: Server error

---

[API](https://skmtc.dev/asteroid/apis/agent-service.md) - [All operations](https://skmtc.dev/asteroid/apis/agent-service/llms.txt) - [OpenAPI document](https://skmtc.dev/asteroid/apis/agent-service/revisions/ccc134d1d510?raw)
