Skip to content
WP EngineDocumentation

Get model schema

GET
/v1/models/{owner}/{model}/schema
<?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();

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.

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

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
{
"id": "anthropic/claude-haiku-4-5"
}

Invalid request body or parameters

Media typeapplication/json
object
error
required
object
message
required
string
type
required
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
{
"error": {
"type": "invalid_request_error",
"request_id": "80f1e2c3a4b5c6d7e8f9a0b1c2d3e4f5"
}
}

The requested resource was not found

Media typeapplication/json
object
error
required
object
message
required
string
type
required
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
{
"error": {
"type": "invalid_request_error",
"request_id": "80f1e2c3a4b5c6d7e8f9a0b1c2d3e4f5"
}
}

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