Python
import os
from meibel import MeibelClient
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
entry = client.metadata_model_catalog.get_entry(model_id="invoice_extraction_v1")
print(f"{entry.name} ({entry.scope}): {entry.description}")
for field in entry.fields:
print(f"- {field.name}: {field.type}")const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const entry = await client.metadataModelCatalog.getEntry("invoice_extraction_v1");
console.log(`${entry.name} (${entry.scope}): ${entry.description}`);
entry.fields.forEach((field) => {
console.log(`- ${field.name} [${field.type}]: ${field.description}`);
});package main
import (
"context"
"fmt"
"os"
v2 "github.com/meibel-ai/meibel-go/v2"
)
func main() {
client := v2.NewClient(v2.WithAPIKey(os.Getenv("MEIBEL_API_KEY")))
entry, err := client.MetadataModelCatalog.GetEntry(context.Background(), "invoice-extraction-v1")
if err != nil {
fmt.Printf("error: %v\n", err)
return
}
fmt.Printf("%s: %s (%d fields)\n", entry.Name, entry.Scope, len(entry.Fields))
}curl --request GET \
--url https://api.meibel.ai/v2/metadata-model-catalog/{model_id} \
--header 'Meibel-API-Key: <api-key>'const options = {method: 'GET', headers: {'Meibel-API-Key': '<api-key>'}};
fetch('https://api.meibel.ai/v2/metadata-model-catalog/{model_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.meibel.ai/v2/metadata-model-catalog/{model_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Meibel-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.meibel.ai/v2/metadata-model-catalog/{model_id}")
.header("Meibel-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/metadata-model-catalog/{model_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Meibel-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"model_id": "<string>",
"name": "<string>",
"scope": "<string>",
"fields": [
{
"name": "<string>",
"description": "<string>",
"index": true
}
],
"description": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Metadata model catalog
Get Metadata Model Catalog Entry
GET
/
metadata-model-catalog
/
{model_id}
Python
import os
from meibel import MeibelClient
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
entry = client.metadata_model_catalog.get_entry(model_id="invoice_extraction_v1")
print(f"{entry.name} ({entry.scope}): {entry.description}")
for field in entry.fields:
print(f"- {field.name}: {field.type}")const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const entry = await client.metadataModelCatalog.getEntry("invoice_extraction_v1");
console.log(`${entry.name} (${entry.scope}): ${entry.description}`);
entry.fields.forEach((field) => {
console.log(`- ${field.name} [${field.type}]: ${field.description}`);
});package main
import (
"context"
"fmt"
"os"
v2 "github.com/meibel-ai/meibel-go/v2"
)
func main() {
client := v2.NewClient(v2.WithAPIKey(os.Getenv("MEIBEL_API_KEY")))
entry, err := client.MetadataModelCatalog.GetEntry(context.Background(), "invoice-extraction-v1")
if err != nil {
fmt.Printf("error: %v\n", err)
return
}
fmt.Printf("%s: %s (%d fields)\n", entry.Name, entry.Scope, len(entry.Fields))
}curl --request GET \
--url https://api.meibel.ai/v2/metadata-model-catalog/{model_id} \
--header 'Meibel-API-Key: <api-key>'const options = {method: 'GET', headers: {'Meibel-API-Key': '<api-key>'}};
fetch('https://api.meibel.ai/v2/metadata-model-catalog/{model_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.meibel.ai/v2/metadata-model-catalog/{model_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Meibel-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.meibel.ai/v2/metadata-model-catalog/{model_id}")
.header("Meibel-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/metadata-model-catalog/{model_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Meibel-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"model_id": "<string>",
"name": "<string>",
"scope": "<string>",
"fields": [
{
"name": "<string>",
"description": "<string>",
"index": true
}
],
"description": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Response
Successful Response
A pre-built metadata extraction model from the catalog, selectable by model_id.
Stable ID used to reference this model when configuring a datasource
Human-readable model name
Visibility of the model (e.g. 'global', 'customer', 'project')
Field definitions this model extracts
Show child attributes
Show child attributes
What this model is designed to extract
Was this page helpful?
⌘I