Skip to main content
POST
/
api
/
cached-jobs
/
trigger
Create many cached jobs for all queries in a project.
curl --request POST \
  --url https://api.mentionlab.io/api/cached-jobs/trigger \
  --header 'Content-Type: application/json' \
  --header 'x-organisation-id: <x-organisation-id>' \
  --header 'x-project-id: <x-project-id>' \
  --data '
{
  "aiModels": [
    "openai",
    "anthropic",
    "google-generative-ai"
  ],
  "executionCount": 3
}
'
[
  {
    "id": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6",
    "project": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6",
    "query_id": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6",
    "query": "mentionlab",
    "aiModels": [
      "gpt-4",
      "claude-2"
    ],
    "executionCount": 5,
    "language": "en",
    "country": "US",
    "status": "active",
    "updatedAt": "2023-08-22T10:00:00.000Z",
    "createdAt": "2023-08-22T10:00:00.000Z",
    "restricted": false
  }
]

Headers

x-organisation-id
string
required

Organisation ID to specify the organisation context

x-project-id
string
required

Project ID to specify the project context

Body

application/json
aiModels
enum<string>[]
required

List of AI provider keys to use for analysis (will be transformed to corresponding models)

Available options:
openai,
openai5,
openai5gpt,
openai51gpt,
anthropic,
google-generative-ai,
perplexity,
deepseek,
ai-overview,
ai-mode,
ai-overview2,
ai-overview3,
ai-mode2,
ai-mode3
Example:
[
"openai",
"anthropic",
"google-generative-ai"
]
executionCount
number
required

The number of executions (runs) for each cached job

Required range: x >= 1
Example:

3

Response

201 - application/json
id
string<uuid>
required
Example:

"a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6"

project
object
required

The project this cached job belongs to

Example:

"a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6"

query_id
object
required

The query this cached job belongs to

Example:

"a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6"

query
string
required
Example:

"mentionlab"

aiModels
string[]
required
Example:
["gpt-4", "claude-2"]
executionCount
number
required
Example:

5

language
string
required
Example:

"en"

country
string
required
Example:

"US"

status
enum<string>
required
Available options:
pending,
active,
ended,
inactive
Example:

"active"

updatedAt
string<date-time>
required
Example:

"2023-08-22T10:00:00.000Z"

createdAt
string<date-time>
required
Example:

"2023-08-22T10:00:00.000Z"

restricted
boolean
Example:

false