POST
/
v1
/
prompt_engine
/
{id}
import { JigsawStack } from "jigsawstack";

const jigsaw = JigsawStack({ apiKey: "your-api-key" });

const response = await jigsaw.prompt_engine.run({
  "input_values": {
        "text": "How to get started with JigsawStack?"
  },
  "id": "0073d008-da9b-4c27-90a8-0240f3ecd4f5"
})
{
  "success": true,
  "result": {
        "outline": [
              {
                    "section": "Introduction to JigsawStack"
              },
              {
                    "section": "Prerequisites"
              },
              {
                    "section": "Installation and Setup"
              },
              {
                    "section": "Creating Your First Project"
              },
              {
                    "section": "Understanding the JigsawStack Architecture"
              },
              {
                    "section": "Basic JigsawStack Concepts"
              },
              {
                    "section": "Next Steps and Resources"
              }
        ]
  },
  "_usage": {
        "input_tokens": 28,
        "output_tokens": 82,
        "inference_time_tokens": 1504,
        "total_tokens": 1614
  }
}
x-api-key
string
required

Your JigsawStack API key

Body

input_values
object

The input values. This is required if the inputs parameter was specified when creating a prompt. Each input value has a 500000 character limit

stream
boolean

If set, partial message chunk will be sent.

Response

success
boolean

Indicates whether the call was successful.

import { JigsawStack } from "jigsawstack";

const jigsaw = JigsawStack({ apiKey: "your-api-key" });

const response = await jigsaw.prompt_engine.run({
  "input_values": {
        "text": "How to get started with JigsawStack?"
  },
  "id": "0073d008-da9b-4c27-90a8-0240f3ecd4f5"
})
{
  "success": true,
  "result": {
        "outline": [
              {
                    "section": "Introduction to JigsawStack"
              },
              {
                    "section": "Prerequisites"
              },
              {
                    "section": "Installation and Setup"
              },
              {
                    "section": "Creating Your First Project"
              },
              {
                    "section": "Understanding the JigsawStack Architecture"
              },
              {
                    "section": "Basic JigsawStack Concepts"
              },
              {
                    "section": "Next Steps and Resources"
              }
        ]
  },
  "_usage": {
        "input_tokens": 28,
        "output_tokens": 82,
        "inference_time_tokens": 1504,
        "total_tokens": 1614
  }
}