{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk LLM Runner — ChatGPT, Claude & Gemini on CSV & Datasets",
    "description": "Run a prompt on every row of a CSV, Excel file, Google Sheet or Apify dataset with ChatGPT, Claude, Gemini, DeepSeek or any OpenRouter model. Answers as new columns or typed JSON fields. No API key needed. $1 per 1,000 rows.",
    "version": "0.0",
    "x-build-id": "0eYXfMTfFkuLYGm7a"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/saliga~bulk-llm-runner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-saliga-bulk-llm-runner",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/saliga~bulk-llm-runner/runs": {
      "post": {
        "operationId": "runs-sync-saliga-bulk-llm-runner",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/saliga~bulk-llm-runner/run-sync": {
      "post": {
        "operationId": "run-sync-saliga-bulk-llm-runner",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "prompt": {
            "title": "Prompt",
            "type": "string",
            "description": "The prompt to run on every row. Use {{column}} for a column's value ({{address.city}} for nested fields, {{row}} for the whole row as JSON). Without a dataset, file or rows, it is run once (or use Prompts below)."
          },
          "dataset": {
            "title": "Apify dataset",
            "type": "string",
            "description": "Run the prompt on every item of a dataset, for example the results of a scraper run."
          },
          "fileUrl": {
            "title": "File or Google Sheet link",
            "type": "string",
            "description": "A CSV, TSV, Excel (.xlsx), JSON or JSONL link, or a Google Sheet / Google Drive / Dropbox share link (shared as \"Anyone with the link\")."
          },
          "sheet": {
            "title": "Excel sheet",
            "type": "string",
            "description": "Sheet name for Excel files (default: the first sheet)."
          },
          "rows": {
            "title": "Rows",
            "type": "array",
            "description": "Or paste rows as a JSON array of objects."
          },
          "prompts": {
            "title": "Prompts (without data)",
            "type": "array",
            "description": "A list of independent prompts, one per line, when you have no table to process.",
            "items": {
              "type": "string"
            }
          },
          "models": {
            "title": "Models",
            "type": "array",
            "description": "OpenRouter model ids. Several models run every row on each, for a side-by-side comparison. Default openai/gpt-6-luna (fast and cheap). Others: anthropic/claude-sonnet-5.5, google/gemini-3.8-flash, deepseek/deepseek-v4.1-flash, perplexity/sonar, or any on openrouter.ai/models.",
            "items": {
              "type": "string"
            }
          },
          "outputFields": {
            "title": "Output fields (JSON columns)",
            "type": "array",
            "description": "Optional: get typed columns instead of free text. One field per line: \"name: description\" or \"name (type): description\". Types: string, number, integer, boolean, list. Example: \"industry: one or two words\", \"is_b2b (boolean): sells to companies\".",
            "items": {
              "type": "string"
            }
          },
          "systemPrompt": {
            "title": "System prompt",
            "type": "string",
            "description": "Optional instructions for every request (tone, language, rules)."
          },
          "outputColumn": {
            "title": "Answer column name",
            "type": "string",
            "description": "Column for the free-text answer.",
            "default": "llmOutput"
          },
          "keepColumns": {
            "title": "Keep input columns",
            "type": "boolean",
            "description": "Copy every input column into the output row next to the answer.",
            "default": true
          },
          "webSearch": {
            "title": "Web search",
            "type": "boolean",
            "description": "Let the model search the web first (adds the provider's search fee, about $0.005-0.014 per answer, and citations).",
            "default": false
          },
          "maxRows": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Safety limit: the run stops before starting if the data has more rows. Every row also costs the model's own price.",
            "default": 1000
          },
          "temperature": {
            "title": "Temperature",
            "type": "string",
            "description": "Optional, 0-2. Lower is more consistent."
          },
          "maxAnswerTokens": {
            "title": "Max answer length (tokens)",
            "minimum": 16,
            "maximum": 2000,
            "type": "integer",
            "description": "Longer answers cost more.",
            "default": 1000
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Requests at the same time.",
            "default": 8
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}