emfasemfas

Generate suggestion

Generates an AI-suggested value for an attribute on a specific entity.

POST
/suggestions
Authorization<token>

API key authentication using Bearer token format. Use: Bearer

In: header

Suggestion request

channelId?integer

Channel ID for the suggestion (optional, defaults to default channel of the organization)

entityTypestring

Entity type for the suggestion

Value in"product"
externalIdstring

Product or entity ID for which to generate the suggestion

fieldDefinitionKeystring

Field definition key for the field to generate suggestion for

instructions?string

Instructions for the suggestion generation (optional)

language?string

Language for the suggestion (optional, defaults to base language of the organization)

Response Body

curl -X POST "https://api.emfas.ai/v1/suggestions" \
  -H "Content-Type: application/json" \
  -d '{
    "entityType": "product",
    "externalId": "123",
    "fieldDefinitionKey": "meta_title"
  }'
{
  "metadata": {
    "citations": [
      {
        "title": "string",
        "url": "string"
      }
    ],
    "thinking": "string"
  },
  "suggestion": "Premium quality cotton t-shirt"
}
{
  "error": "Internal server error"
}
{
  "error": "Internal server error"
}
{
  "error": "Internal server error"
}