Galya Docs
API referencescore

Score a single candidate against a user's taste

POST
/score

Scores one candidate against the taste profile of a specified entity. The candidate may be an already-indexed reference ({ entity_id } or { id }) or an inline ContentObject ({ url, type }), which is indexed before scoring. Uses the same relevance/taste path as /rerank for a single item.

Authorization

ApiKeyAuth
X-API-Key<token>

In: header

Query Parameters

relative_to_entity_id*string

The entity whose taste profile is used to score the candidate.

in_terms_of_entity_type*string

The entity type context for scoring.

Value in"content" | "place" | "brand" | "user" | "website" | "file"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/score?relative_to_entity_id=string&in_terms_of_entity_type=content" \  -H "Content-Type: application/json" \  -d '{    "content": {      "url": "http://example.com",      "type": "image",      "domain": "restaurants"    }  }'
{
  "entity_id": "string",
  "score": 0
}
{
  "error": "string",
  "code": "string"
}
{
  "error": "string",
  "code": "string"
}
{
  "error": "string",
  "code": "string"
}