Galya Docs
API referenceexplain

Explain entity affinities for agent consumption

POST
/explain

Returns a natural language explanation of an entity's affinities, structured for agent consumption. Tailored by domain and task context. Simple input/output — no openresponses schema.

Authorization

ApiKeyAuth
X-API-Key<token>

In: header

Query Parameters

relative_to_entity_id*string

The entity to explain affinities for.

in_terms_of_entity_type*string

The entity type context for affinity.

Value in"content" | "place" | "brand" | "user" | "website" | "file"
domain?string
Value in"discovery" | "design" | "decisions" | "data"
task?string
Value in"coding-agent" | "commerce-agent" | "design-agent" | "insight-agent"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

query*string

Natural language query from the user.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/explain?relative_to_entity_id=string&in_terms_of_entity_type=content" \  -H "Content-Type: application/json" \  -d '{    "query": "string"  }'
{
  "explanation": "string"
}
{
  "error": "string",
  "code": "string"
}
{
  "error": "string",
  "code": "string"
}