inference-endpoint-poc / contracts /request.schema.json
phongphamthe's picture
Add initial implementation of Hugging Face Inference Endpoint with model handling and request/response schemas
321aee7
Raw
History Blame Contribute Delete
1.01 kB
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Vision Inference Request",
"type": "object",
"required": ["inputs", "task"],
"properties": {
"inputs": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": ["image_base64"],
"properties": {
"image_id": { "type": "string" },
"image_base64": { "type": "string", "minLength": 1 },
"metadata": { "type": "object" }
},
"additionalProperties": true
}
},
"task": {
"type": "string",
"enum": ["object_segmentation", "depth_estimation"]
},
"parameters": {
"type": "object",
"properties": {
"text_query": { "type": "string" },
"confidence_threshold": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"additionalProperties": true
}
},
"additionalProperties": true
}