v1

latestOpenAPI 3.0.32026-07-2659199427.5 KB
Passthrough prompt

Passthrough prompt

The prompt request for the passthrough use case and specified generative AI (GenAI) modelId (model name) sends text to return results in formats supported by generative AI (GenAI) models.

post/ai/prompt/passthrough/{MODEL_ID}

Headers

Authorizationstring required

Bearer token used for authentication. Format: Authorization: Bearer ACCESS_TOKEN.

Content-Typestring
Example:application/json

application/json

Request body

Example request

{
  "batch": [
    {
      "text": "[{\\\"role\\\": \\\"system\\\", \\\"content\\\": \\\"You are a helpful utility program instructed to accomplish a product classififcation task. Please, classify the provided product name into one of the following categories:\\\\nGROCERIES, FURNITURE, UNKNOWN\\\"}, {\\\"role\\\": \\\"user\\\", \\\"content\\\": \\\"chocolate milk\\\"}, {\\\"role\\\": \\\"assistant\\\", \\\"content\\\": \\\"GROCERIES\\\"}, {\\\"role\\\": \\\"user\\\", \\\"content\\\": \\\"chocolate table\\\"}, {\\\"role\\\": \\\"assistant\\\", \\\"content\\\": \\\"FURNITURE\\\"}, {\\\"role\\\": \\\"user\\\", \\\"content\\\": \\\"stone baked pizza\\\"}]"
    }
  ],
  "useCaseConfig": {
    "dataType": "json_prompt"
  },
  "modelConfig": {
    "vectorQuantizationMethod": "min-max",
    "dimReductionSize": 256
  }
}

Response

OK

OR
OR

Example response

{
  "tokensUsed": {
    "promptTokens": 148,
    "completionTokens": 27,
    "totalTokens": 175
  },
  "prompt": "<|begin_of_text|><|start_header_id|>system<|end_header_id|>\\n\\nYou are a helpful utility program instructed to accomplish a product classififcation task. Please, classify the provided product name into one of the following categories:\\nGROCERIES, FURNITURE, UNKNOWN<|eot_id|><|start_header_id|>user<|end_header_id|>\\n\\nchocolate milk<|eot_id|><|start_header_id|>assistant<|end_header_id|>\\n\\nGROCERIES<|eot_id|><|start_header_id|>user<|end_header_id|>\\n\\nchocolate table<|eot_id|><|start_header_id|>assistant<|end_header_id|>\\n\\nFURNITURE<|eot_id|><|start_header_id|>user<|end_header_id|>\\n\\nstone baked pizza<|eot_id|><|start_header_id|>assistant<|end_header_id|>\\n\\n"
}