Skip to main content
POST
/
api
/
ai
/
v1
/
text
/
generation
curl --request POST \
  --url https://example.com/v1/api/ai/v1/text/generation \
  --header 'Content-Type: application/json' \
  --header 'X-DOMO-Developer-Token: <api-key>' \
  --data '
{
  "input": "Why is the sky blue?"
}
'
{
  "output": "The sky is blue because of Rayleigh scattering.",
  "modelId": "domo.domo_ai.domogpt-chat-small-v1:anthropic"
}

Authorizations

X-DOMO-Developer-Token
string
header
required

Domo Developer Token for authentication.

Body

application/json
input
string
required

The input text to send to the model.

model
string

The ID of the model to use.

modelConfiguration
object

Additional model-specific configuration key-value pairs (e.g., temperature).

Example:
{ "temperature": 0.7, "max_tokens": 1024 }
promptTemplate
object

A prompt template object. The 'template' string should contain placeholders.

parameters
object

Custom parameters to inject into the prompt template.

Example:
{ "language": "Japanese" }
system
string

The system message to use for the Text Generation task. If not provided, the default system message will be used. If the model does not include built-in support for system prompts, this parameter may be included in the prompt template using the "${system}" placeholder.

Response

The generated text.

Standard successful AI response.

output
string
modelId
string