Skip to main content
POST
/
v0.1
/
tasks
Run Dynamic Task
curl --request POST \
  --url https://api.promptloop.com/v0.1/tasks \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "websiteUrl": "https://promptloop.com",
  "variableSearchItems": [
    {
      "query": "What is this website?",
      "formatting": {
        "keyword": "company_description",
        "actionInstructions": "one sentence"
      }
    }
  ]
}'
{
  "status": "success",
  "data": {
    "data_json": {
      "propertyKey": "propertyValue",
      "anotherKey": "anotherValue"
    },
    "list_data_json": [
      {
        "column1Key": "row1Value1",
        "column2Key": "row1Value2"
      },
      {
        "column1Key": "row2Value1",
        "column2Key": "row2Value2"
      }
    ],
    "list": true,
    "job_id": "<string>",
    "error_detected": true
  },
  "message": "<string>",
  "error": {
    "code": 123,
    "details": "<string>"
  }
}

Authorizations

x-api-key
string
header
required

Body

application/json
websiteUrl
string
required

Target website that should be analyzed

Example:

"https://promptloop.com"

variableSearchItems
object[]
required

Queries that will be evaluated against the site, returned using the provided formatting guidance

turbo
boolean

Optional flag to enable turbo execution mode for this request. Can expect around 2x speed improvement with slightly lower quality results.

Response

Successfully ran dynamic task

status
enum<string>
required
Available options:
success,
error
Example:

"success"

data
object
required
message
string
required
error
object
I