AI Service

Download OpenAPI specification:Download

The service facilitates and streamlines e-commerce processes of product marketing.


Key Features


Key Benefits

  • Product managers can facilitate and streamline the process of creating and updating product descriptions
  • Creating product descriptions that gain more attention and interest by adapting various writing styles
  • Consistency in tone and language
  • Increased visibility resulting from optimization for search engines

Text Generation

Generating text for an object description

Generates a text based on a prompt. Currently supported AI engines for text generation:


Prerequisite: Using the AI service requires an API token, you have to either configure your own OpenAI account, or use the Emporix one. To configure your own OpenAI token, use the configuration service by storing the token under openAiApiToken key.
If you don't provide your own OpenAI token, the Emporix one is used with the following limits: 3 mln input tokens and 1 mln output tokens. When you reach the limit, the next requests are rejected and you have to provide your own OpenAI token. Emporix uses the gpt-4o-mini model by default. If you want to use your own OpenAI account with a different AI model please contact our support team to negotiate the model and usage.


###Required scopes###

  • ai.text_manage
SecurityOAuth2
Request
path Parameters
tenant
required
string

Your Emporix tenant's name.

Note: The tenant name should always be provided in lowercase.

Request Body schema: application/json
id
string

Identifier of the request. The value is not mandatory - if provided then the id is returned in the text generation response.

prompt
required
string

A prompt to AI engine. A desired text content is generated based on the prompt.

maxTokens
integer

Maximum number of tokens that should be used during text generation. If not provided then 4097 is used.

Responses
200
400

The request was syntactically incorrect.

401

The authorization token is invalid or has expired.

403

Authorization scopes of the access token are not sufficient and do not match the scopes required by the endpoint.

500

A server-side error occurred.

post/{tenant}/texts
Request samples
application/json
{
  • "id": "en",
  • "prompt": "Generate a long description for product 'pipe cutter' in language EN ",
  • "maxTokens": 2048
}
Response samples
application/json
{
  • "id": "en",
  • "result": "Mini pipe cutters are small cutting tools that are designed to precisely and effectively cut through pipes ranging in size from 3 to 16 millimeters. Unlike some larger pipe cutters, these mini versions are conveniently small and light enough to be carried around easily and used in places where a standard-sized cutter may not be able to fit. They are typically made of hardened steel and are designed to work on most types of tubing and thin-walled plastic piping. The continuous interlocking jaws hold the pipe securely while the cutting blade smoothly and accurately creates a precise and neat cutting edge. Mini pipe cutters are the perfect tool for plumbers, DIYers and those tackling smaller scale pipe work in hard-to-reach places."
}

AI Completions

AI Completions

Generates a completion based on chat history. Currently supported AI engines for the completion:


Prerequisite: Using the AI service requires an API token, you have to either configure your own OpenAI account, or use the Emporix one. To configure your own OpenAI token, use the configuration service by storing the token under openAiApiToken key. If you don't provide your own OpenAI token, the Emporix one is used with the following limits: 3 mln input tokens and 1 mln output tokens. When you reach the limit, the next requests are rejected and you have to provide your own OpenAI token. Emporix uses the gpt-4o-mini model by default. If you want to use your own OpenAI account with a different AI model please contact our support team to negotiate the model and usage.


###Required scopes###

  • ai.completion_manage
SecurityOAuth2
Request
path Parameters
tenant
required
string
Request Body schema: application/json
id
string

Identifier of the request. The value is not mandatory - if provided then the id is returned in the text generation response.

required
Array of objects
Responses
200
400

The request was syntactically incorrect.

401

The authorization token is invalid or has expired.

403

Authorization scopes of the access token are not sufficient and do not match the scopes required by the endpoint.

500

A server-side error occurred.

post/{tenant}/completions
Request samples
application/json
{
  • "id": "abc-123",
  • "messages": [
    ]
}
Response samples
application/json
{
  • "id": "en",
  • "result": "Mini pipe cutters are small cutting tools that are designed to precisely and effectively cut through pipes ranging in size from 3 to 16 millimeters. Unlike some larger pipe cutters, these mini versions are conveniently small and light enough to be carried around easily and used in places where a standard-sized cutter may not be able to fit. They are typically made of hardened steel and are designed to work on most types of tubing and thin-walled plastic piping. The continuous interlocking jaws hold the pipe securely while the cutting blade smoothly and accurately creates a precise and neat cutting edge. Mini pipe cutters are the perfect tool for plumbers, DIYers and those tackling smaller scale pipe work in hard-to-reach places."
}