POST /v1/search
Service: ai · operationId: (none)
Required scopes
(no scope declared — review service config)
Request body
{
"type": "object",
"properties": {
"query": {
"type": "string",
"minLength": 1
},
"brand_id": {
"type": "string",
"minLength": 1
},
"top_k": {
"type": "integer",
"exclusiveMinimum": 0,
"default": 10
},
"threshold": {
"type": "number",
"minimum": 0,
"maximum": 1,
"default": 0
}
},
"required": [
"query",
"brand_id"
]
}Responses
200 Search results
{
"type": "object",
"properties": {
"hits": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"document_id": {
"type": [
"string",
"null"
]
},
"content": {
"type": "string"
},
"score": {
"type": "number"
},
"metadata": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"id",
"document_id",
"content",
"score",
"metadata"
]
}
},
"query": {
"type": "string"
},
"model": {
"type": "string"
},
"total_hits": {
"type": "number"
}
},
"required": [
"hits",
"query",
"model",
"total_hits"
]
}400 Invalid input
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}500 Internal error
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}Example
curl -X POST https://ai.platform.loop.health/v1/search \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'Related
services/ai— service overview- All endpoints — directory across services
- Auth model — how scopes are enforced