Hermes API
Structure
Generate normalized Structure payloads from images and optional context.
Functions
structure_enrichPOST /structure/enrichcurl -sS -X POST "https://api.hermes-api.dev/structure/enrich" \
-H "X-Hermes-Key: $HERMES_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"images": [
"string"
]
}'Types
Request and response shapes pulled directly from the OpenAPI schema.
AgeGroup
export type AgeGroup = "newborn" | "infant" | "toddler" | "kids" | "adults";
ApiError
export type ApiError = {
code?: string | null;
detail?: string | null;
error: string;
fields?: {
[key: string]: string;
} | null;
request_id?: string | null;
};Brand
export type Brand = {
name?: string | null;
};ImageField
export type ImageField = string | Array<string>;
IngestUsage
export type IngestUsage = {
input_tokens?: number | null;
output_tokens?: number | null;
};Offer
export type Offer = {
availability?: null | OfferAvailability;
price?: number | null;
price_currency?: string | null;
quantity?: number | null;
};OfferAvailability
export type OfferAvailability = "in_stock" | "out_of_stock" | "pre_order" | "backorder" | "unknown";
Product
export type Product = {
age_group?: null | AgeGroup;
audience?: string | null;
brand?: null | Brand;
category?: string | null;
color?: string | null;
condition?: null | ProductCondition;
country_of_origin?: string | null;
depth?: null | QuantitativeValue;
description?: string | null;
gtin?: string | null;
height?: null | QuantitativeValue;
image: ImageField;
material?: string | null;
model?: string | null;
mpn?: string | null;
name: string;
offers: Offer;
pattern?: string | null;
size?: null | SizeField;
sku?: string | null;
weight?: null | QuantitativeValue;
width?: null | QuantitativeValue;
};ProductCondition
export type ProductCondition = "new" | "used" | "refurbished" | "damaged";
QuantitativeValue
export type QuantitativeValue = {
unit_code?: string | null;
value?: number | null;
};SizeField
export type SizeField = string | QuantitativeValue | SizeSpecification;
SizeSpecification
export type SizeSpecification = {
name?: string | null;
size_group?: string | null;
size_system?: string | null;
};StructureEnrichRequest
export type StructureEnrichRequest = {
context_text?: string | null;
images: Array<string>;
prompt_rules?: string | null;
sku?: string | null;
};StructureEnrichResponse
export type StructureEnrichResponse = {
product: Product;
usage?: null | IngestUsage;
};