Skip to main content
POST
/
v1
/
hub
/
schema
Get Domain Schema
import requests

url = "https://api.example.com/v1/hub/schema"

payload = {
    "domain": "<string>",
    "config": {
        "prompt": "<string>",
        "detail": "auto",
        "json_schema": {},
        "gql_stmt": "<string>",
        "max_retries": 1,
        "max_tokens": 65535,
        "temperature": 0,
        "confidence": False,
        "grounding": False,
        "keyframes": False
    }
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "domain": "<string>",
  "description": "<string>",
  "schema_version": "<string>",
  "schema_hash": "<string>",
  "gql_stmt": "<string>",
  "json_schema": {},
  "json_sample": {}
}

Description

This endpoint returns the JSON schema for a given domain, as defined in the VLM Run Hub.

Body

application/json

Request model for the hub schema: /v1/hub/schema

domain
string
required

The domain to get the schema for (e.g. document.invoice).

config
GenerationConfig · object

The VLM generation config to be used for //generate.

Response

Successful Response

Response model for the hub schema: /v1/hub/schema

domain
string
required

The domain to get the schema for.

description
string
required

The description of the domain.

schema_version
string
required

The specific version of the schema.

schema_hash
string
required

The sha256 hash of the schema.

gql_stmt
string
required

The GraphQL statement for the domain.

json_schema
Json Schema · object
required

The JSON schema for the domain.

json_sample
Json Sample · object

A sample JSON object that matches the schema.