cURL
curl -X POST https://api.aiql.io/shape \
-H "Authorization: Bearer $AIQL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"markdown": "# Report\n\nLong markdown content..."}'import os
from aiql import AiQL
client = AiQL(api_key=os.environ["AIQL_API_KEY"])
schema = client.tools.shape(markdown=markdown)import { AiQL } from "@aiql.io/sdk";
const client = new AiQL({ apiKey: process.env.AIQL_API_KEY });
const schema = await client.tools.shape({ markdown });{
"classes": [
{
"name": "<string>",
"definition": "<string>",
"cardinality": "many"
}
],
"relationships": [
{
"name": "<string>",
"domain": [
"<string>"
],
"range": [
"<string>"
],
"definition": "<string>"
}
],
"properties": [
{
"name": "<string>",
"type": "<string>",
"domain": [
"<string>"
],
"definition": "<string>",
"values": [
"<string>"
]
}
]
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Tools
Shape
POST
/
shape
cURL
curl -X POST https://api.aiql.io/shape \
-H "Authorization: Bearer $AIQL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"markdown": "# Report\n\nLong markdown content..."}'import os
from aiql import AiQL
client = AiQL(api_key=os.environ["AIQL_API_KEY"])
schema = client.tools.shape(markdown=markdown)import { AiQL } from "@aiql.io/sdk";
const client = new AiQL({ apiKey: process.env.AIQL_API_KEY });
const schema = await client.tools.shape({ markdown });{
"classes": [
{
"name": "<string>",
"definition": "<string>",
"cardinality": "many"
}
],
"relationships": [
{
"name": "<string>",
"domain": [
"<string>"
],
"range": [
"<string>"
],
"definition": "<string>"
}
],
"properties": [
{
"name": "<string>",
"type": "<string>",
"domain": [
"<string>"
],
"definition": "<string>",
"values": [
"<string>"
]
}
]
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API key or UI session JWT passed as a Bearer token.
Body
application/json
Markdown content to infer a schema from.
Minimum string length:
1Example:
"John Smith works at Acme Corp as a Software Engineer."