Text Generation

AI Text Generation

Generating text for an object description

post

Generates a text based on a prompt. Currently, the supported AI engine for the text generation is https://platform.openai.com/.


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 Emporix Support Team to negotiate the model and usage.

Required scopes
This endpoint requires the following scopes:
  • : Needed to execute actions related to the text generation.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstringRequired

Your Emporix tenant name.

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

Body

Represents a request body for a text generation operation.

idstringOptional

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

promptstringRequired

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

maxTokensintegerOptional

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

Responses
200Success
application/json
post
/ai-service/{tenant}/texts

Last updated

Was this helpful?