POST
/
v1
/
ai
/
prompt_engine

Body

prompt
string
required

The prompt. Prompt supports dynamic inputs. See example below.

inputs
array<object>

The prompt inputs. See example below.

return_prompt
string | array | object

How the prompt result should be returned or formatted. See examples below

Sample Prompt Payload

  • String return_prompt
{
    prompt: "Tell me a story about {about}",
    inputs: [
      {
        key: "about",
        optional: false,
        initial_value: "Leaning Tower of Pisa",
      },
    ],
    return_prompt: "Return the result in a markdown format",
  }
  • Array<object> return_prompt

{
    prompt: "Tell me a story about {about}",
    inputs: [
      {
        key: "about",
        optional: false,
        initial_value: "Leaning Tower of Pisa",
      },
    ],
    return_prompt: [{ excerpt: "short story text", summary: "summary of story" }],
  }
  • Object return_prompt
{
    prompt: "Tell me a story about {about}",
    inputs: [
      {
        key: "about",
        optional: false,
        initial_value: "Leaning Tower of Pisa",
      },
    ],
    return_prompt: { excerpt: "short story text", summary: "summary of story" },
  }
x-api-key
string
required

Your JigsawStack API key

Response

success
boolean

Indicates whether the call was successful.