Placewise API
Get startedExplore
Get startedExplore
Performance Cloud 🗗
Placewise 🗗
ExplorePublic APIManagement APIUsers APIOperations APIMessaging APIReporting APIML API
Data API
ExplorePublic APIManagement APIUsers APIOperations APIMessaging APIReporting APIML API
Data API
  1. ML API
  • Introduction
  • Predict Sending KPI v1
    POST
  • Explain Sending KPI Prediction v1
    POST
  • Predict Sending KPI In Date Range v1
    POST
  • Predict Sending Popularity v2
    POST
  • Predict Sending Text Popularity v2
    POST
  • Predict Sending Time Series Popularity v2
    POST
  • Explain Sending Popularity Prediction v2
    POST
  • Explain Sending Text Popularity Prediction v2
    POST
  • Explain Sending Time Series Popularity Prediction v2
    POST
  • Recommend sending time v2
    POST
  • Detect receipt fraud
    POST
  • Predict item classes
    POST
  • Generate Image
    POST
  • Generate Image Caption
    POST
  • Generate Text
    POST
  • Generate Sending Text
    POST
  1. ML API

Generate Text

POST
https://api.mpc.dev.placewise.com/v1/ml/general/generate_text
API Permit:ML:TextGeneration:Post
API Context:Loyalty Club
Authorizations:User
Generates a text based on text prompt.

Body Parameters#

ParameterTypeRequired?Description
promptStringyesText generation prompt.
temperatureFloatno (default null)Generation variability and creativity, in range [0, 1]. If null or higher than 0, results in nondeterministic generation.
max_tokensIntegerno (default null)Maximum number of tokens (~number of words) allowed in a generated text. If null, terminates when generative model thinks it should.

Example#

When successful, returns:
{
    'text_generation_task': {
        'id': 1
    }
}

Request

Header Params

Body Params multipart/form-data

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C#
Ruby
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.mpc.dev.placewise.com/v1/ml/general/generate_text' \
--header 'X-User-Agent;' \
--header 'X-Product-Name;' \
--header 'X-Loyalty-Club-Slug;' \
--header 'Authorization: Bearer ' \
--form 'prompt="Write a very short cheesecake recipe"' \
--form 'temperature="0"' \
--form 'max_tokens="1000"'

Responses

🟢200Success
application/json
Body

Example
{
    "text_generation_task": {
        "id": 0
    }
}
Previous
Generate Image Caption
Next
Generate Sending Text
Built with