---
title: Get model schema
url: https://developers.wpengine.com/docs/ai/api/reference/operations/getmodelschema/
image: https://developers.wpengine.com/og/docs/ai/api/reference/operations/getmodelschema.png
---

# Get model schema

GET

/v1/models/{owner}/{model}/schema

Select code sample

```php
<?php


$client = new \GuzzleHttp\Client();


$response = $client->request('GET', 'https://api.ai.wpengine.com/v1/models/anthropic/claude-haiku-4-5/schema');


echo $response->getBody();
```

- Current environment

Returns the generated request (input) and response (output) JSON Schemas for a single model. The model ID is namespaced as “owner/name”, where owner is the model’s vendor (anthropic, google, …). The schemas describe the chat completion contract, so only chat-capable models are served; unknown or non-chat models return 404. No authentication is required.

## Authorizations

- **None**

## Parameters

### Path Parameters

**owner**

required

string

Owner (vendor) segment of the namespaced model ID.

#### Example

```
anthropic
```

**model**

required

string

Model-name segment of the namespaced model ID.

#### Example

```
claude-haiku-4-5
```

## Responses

### 200

Generated input and output JSON Schemas for the model

Media typeapplication/json

Per-model JSON Schemas. input_schema validates a chat completion request body for this model (with model-specific parameter constraints baked in); output_schema describes the chat completion response. Both are JSON Schema 2020-12 documents emitted as free-form objects.

object

**id**

required

The namespaced model ID the schemas were generated for.

string

**input_schema**

required

JSON Schema (2020-12) for the chat completion request body.

object

**_key_**

additional properties

any

**output_schema**

required

JSON Schema (2020-12) for the chat completion response body.

object

**_key_**

additional properties

any

#### Example

```json
{
  "id": "anthropic/claude-haiku-4-5"
}
```

### 400

Invalid request body or parameters. On agent create and update, error type “profile_unavailable” means the requested profile is not available to the caller.

Media typeapplication/json

object

**error**

required

object

**message**

required

string

**type**

required

string

**error_code**

Stable, machine-readable cause, set by routes that document their codes (the AI readiness and account AI routes, and an entitlement_required refusal, where it is one of not_eligible, terms_required, not_enabled or suspended); absent elsewhere and on errors from shared layers such as authentication. Clients must allow new codes.

string

**portal_url**

Where the customer can resolve the error, set on an entitlement_required refusal that has an error_code when one is configured.

string

**code**

required

integer

**request_id**

required

Correlation ID for this request, matching the X-Request-ID response header — a 32-character trace ID behind the load balancer, otherwise a UUID. Quote it in support reports.

string

#### Example

```json
{
  "error": {
    "type": "invalid_request_error",
    "request_id": "80f1e2c3a4b5c6d7e8f9a0b1c2d3e4f5"
  }
}
```

### 404

The requested resource was not found

Media typeapplication/json

object

**error**

required

object

**message**

required

string

**type**

required

string

**error_code**

Stable, machine-readable cause, set by routes that document their codes (the AI readiness and account AI routes, and an entitlement_required refusal, where it is one of not_eligible, terms_required, not_enabled or suspended); absent elsewhere and on errors from shared layers such as authentication. Clients must allow new codes.

string

**portal_url**

Where the customer can resolve the error, set on an entitlement_required refusal that has an error_code when one is configured.

string

**code**

required

integer

**request_id**

required

Correlation ID for this request, matching the X-Request-ID response header — a 32-character trace ID behind the load balancer, otherwise a UUID. Quote it in support reports.

string

#### Example

```json
{
  "error": {
    "type": "invalid_request_error",
    "request_id": "80f1e2c3a4b5c6d7e8f9a0b1c2d3e4f5"
  }
}
```

### 429

Rate limit exceeded. The request was throttled at the edge; wait and retry later. The response body is a short HTML page generated by the load balancer, not a structured JSON error — clients should rely on the 429 status code rather than parsing the body.

Media typetext/html

string

## Was this helpful?

Thanks for the feedback!

```json
{"@context":"https://schema.org","@graph":[{"@type":"WebSite","@id":"https://developers.wpengine.com/#website","name":"WP Engine Product Documentation","url":"https://developers.wpengine.com/","description":"Resources for developing, deploying, and scaling on WP Engine.","inLanguage":"en-US","keywords":["API documentation","product documentation","headless WordPress","managed WordPress hosting"],"publisher":{"@id":"https://wpengine.com/#organization"}}]}
```
