{
  "openapi": "3.0.1",
  "info": {
    "title": "OpenAI API Pricing Scraper",
    "description": "Collects pricing tables from OpenAI’s public API documentation and returns records with model labels, sections, tiers, and available price fields. Includes input, cached input, output, and long-context rates; non-token prices are retained as notes instead of being converted.",
    "version": "0.1",
    "x-build-id": "FaqnJhw6Vpe2kiyKS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/axiomworks~openai-pricing-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-axiomworks-openai-pricing-scraper",
        "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/axiomworks~openai-pricing-scraper/runs": {
      "post": {
        "operationId": "runs-sync-axiomworks-openai-pricing-scraper",
        "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/axiomworks~openai-pricing-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-axiomworks-openai-pricing-scraper",
        "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": {
          "sections": {
            "title": "Pricing sections to include",
            "type": "array",
            "description": "Sections to include, e.g. [\"Flagship models\", \"Finetuning\"]. Choose the listed section names; an empty list or omitted field includes all sections. Filters combine with tiers and modelFilter. The prefill selects Flagship models.",
            "items": {
              "type": "string",
              "enum": [
                "Flagship models",
                "Cyber models",
                "Realtime and audio generation models",
                "Image generation models",
                "Transcription models",
                "Specialized models",
                "Finetuning"
              ]
            },
            "default": []
          },
          "tiers": {
            "title": "Processing tiers to include",
            "type": "array",
            "description": "Tiers to include, e.g. [\"Standard\", \"Batch\"]. Choose Standard, Batch, Flex, Fast or Ultrafast. Empty or omitted includes all tiers. Tables without tier headings match Standard but retain tier: null in output. Applies within sections.",
            "items": {
              "type": "string",
              "enum": [
                "Standard",
                "Batch",
                "Flex",
                "Fast",
                "Ultrafast"
              ]
            },
            "default": []
          },
          "modelFilter": {
            "title": "Model name substring or regex",
            "type": "string",
            "description": "Case-insensitive model-name filter, e.g. \"gpt-5\" or \"^gpt-4o\". Matches model and modelLabel as a regular expression; invalid regex is treated as literal text. Empty or omitted keeps all models. If no rows match, the run succeeds with zero items; clear or broaden this filter.",
            "default": ""
          },
          "trackChanges": {
            "title": "Compare with previous tracked run",
            "type": "boolean",
            "description": "Set true to compare returned rows with the previous tracked run, e.g. true. Default false leaves change fields null. Uses changeStoreName (default openai-pricing-previous); baseline is the first tracked run, then new, changed or unchanged. Compares inputPer1M and outputPer1M only.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum total pricing rows",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Total result limit across all selected sections, tiers and models, e.g. 20. Use 1-1000; default 250. Stops at this shared limit or when matching rows run out. Use 1 for a small sample; each row is a separately charged result.",
            "default": 250
          },
          "proxyConfiguration": {
            "title": "Proxy settings for pricing page",
            "type": "object",
            "description": "Proxy configuration object, e.g. {\"useApifyProxy\": false}. Default uses no proxy. Set {\"useApifyProxy\": true} to retry through Apify Proxy if the public page is blocked. A source that stays unavailable returns zero items with a status message; retry later or check proxy settings.",
            "default": {
              "useApifyProxy": false
            }
          },
          "models": {
            "title": "Exact model IDs",
            "type": "array",
            "description": "Exact model IDs or full model labels to include, e.g. [\"gpt-6-astra\"]. Case-insensitive; empty or omitted includes all models. Combines with sections, tiers and modelFilter. Unknown IDs produce zero results; use an empty list to discover current IDs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "changeStoreName": {
            "title": "Change history store",
            "type": "string",
            "description": "Named key-value store for trackChanges, default openai-pricing-previous. Keep the name stable across scheduled runs; use different names for independent monitoring jobs. Ignored when trackChanges is false. Changing the name starts a new baseline.",
            "default": "openai-pricing-previous"
          },
          "modalities": {
            "title": "Modalities to include",
            "type": "array",
            "description": "Exact modality values from the source, e.g. [\"Audio\", \"Text\"]. Case-insensitive; empty (default) includes all rows, including rows with modality null. Nonempty excludes null modalities. Combines with sections, tiers and model filters; no matches succeeds with zero items.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort matching rows",
            "enum": [
              "source",
              "model",
              "inputPer1M",
              "outputPer1M",
              "blendedPer1M",
              "cachedInputPer1M"
            ],
            "type": "string",
            "description": "Order matching rows before maxItems is applied. Default source preserves page order. Model sorts alphabetically; numeric options sort ascending with null values last. Use inputPer1M, outputPer1M or blendedPer1M to return the cheapest matching token-price rows first.",
            "default": "source"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}