{
  "openapi": "3.0.1",
  "info": {
    "title": "Chinese Social Media Dataset Translator to English",
    "description": "Translate supplied Chinese social media datasets to English while preserving hashtags, mentions and emoji. Export pinyin and script variants with row status.",
    "version": "0.1",
    "x-build-id": "24fW2cCnPCnLg2vXK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zinin~chinese-social-media-dataset-translator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zinin-chinese-social-media-dataset-translator",
        "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/zinin~chinese-social-media-dataset-translator/runs": {
      "post": {
        "operationId": "runs-sync-zinin-chinese-social-media-dataset-translator",
        "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/zinin~chinese-social-media-dataset-translator/run-sync": {
      "post": {
        "operationId": "run-sync-zinin-chinese-social-media-dataset-translator",
        "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": {
          "rows": {
            "title": "Supplied rows",
            "maxItems": 500,
            "type": "array",
            "description": "Inline buyer export, at most 500 objects. Prefill rows are explicitly synthetic demos. Dataset URLs and collection from social platforms are unsupported. Opaque buyer record. Runtime: 64 KiB per row, depth 8, nested arrays at most 100 entries. Unsafe property paths and secret fields are rejected or removed. Runtime object limit: 200 properties.",
            "items": {
              "type": "object"
            }
          },
          "datasetId": {
            "title": "Buyer dataset ID",
            "pattern": "^[a-zA-Z0-9]{17}$",
            "maxLength": 17,
            "type": "string",
            "description": "Optional 17-character dataset ID read through your SDK permissions. Omit the inline items/rows property entirely when using this field. No dataset URLs. Pages <=100; total <=5000 rows and 10 MiB. Pick the dataset with the resource picker: under the Actor's limited permissions only a dataset referenced through this field is readable (a dataset ID typed elsewhere fails with dataset_read_failed)."
          },
          "fields": {
            "title": "Text fields to translate",
            "maxItems": 20,
            "type": "array",
            "description": "Every selected dotted path must be a string. One complete Translated row requires all selected fields and protected spans. No more than 20 paths.",
            "items": {
              "type": "string",
              "maxLength": 80,
              "minLength": 1
            }
          },
          "targetLanguage": {
            "title": "Target language",
            "maxLength": 20,
            "type": "string",
            "description": "Language code or short label passed to the model, such as en, zh or de. Validate suitability with your selected provider on representative data.",
            "default": "en"
          },
          "glossary": {
            "title": "Protected glossary",
            "maxProperties": 100,
            "type": "object",
            "description": "At most 100 source-to-output mappings, each key and value <=100 characters. Longest source terms win. Protected spans are restored to the mapped value.",
            "default": {}
          },
          "batchSize": {
            "title": "Rows per LLM call",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "At most 10. Batches shrink before requests to fit byte/token units and the number of rows the current buyer budget can cover.",
            "default": 5
          },
          "includePinyin": {
            "title": "Include source pinyin",
            "type": "boolean",
            "description": "Generate pinyin locally from the original Chinese text. Names, polyphonic characters and regional usage can need human review.",
            "default": true
          },
          "scriptMode": {
            "title": "Source script conversion",
            "enum": [
              "none",
              "traditional",
              "simplified"
            ],
            "type": "string",
            "description": "Convert original source strings to traditional or simplified Chinese using OpenCC, or choose none. These fields describe source text, not the translated answer.",
            "default": "traditional"
          },
          "detectLanguage": {
            "title": "Include language heuristics",
            "type": "boolean",
            "description": "Use visible script to label zh, en, zh+en or und. Dialect markers are explicitly heuristic with null confidence; no identity or origin inference.",
            "default": true
          },
          "maxItems": {
            "title": "Maximum processed source rows",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Count of source rows considered in this run, including free failures. Platform maximum 20; dataset ingestion independently caps at 5000 rows and 10 MiB.",
            "default": 5
          },
          "apiKey": {
            "title": "Buyer API key (optional)",
            "type": "string",
            "description": "Optional buyer credential for the selected endpoint. Never copied to results. Empty uses the platform key only with OpenRouter. Buyer credentials are never replaced after a provider error. Runtime limit: 512 characters."
          },
          "baseUrl": {
            "title": "OpenAI-compatible base URL",
            "maxLength": 300,
            "type": "string",
            "description": "HTTPS base path, without /chat/completions. Only documented host/path pairs are accepted. Custom native endpoints require apiKey. Search supports OpenRouter only. No query, credentials, fragments or redirects.",
            "default": "https://openrouter.ai/api/v1"
          },
          "model": {
            "title": "Model ID",
            "maxLength": 100,
            "type": "string",
            "description": "Keyless: deepseek/deepseek-v4-flash or z-ai/glm-5.3-flash only. Qwen, Kimi and other model IDs require BYOK. The provider must support this model and operation.",
            "default": "deepseek/deepseek-v4-flash"
          },
          "reasoningMode": {
            "title": "Thinking mode (OpenRouter)",
            "enum": [
              "off",
              "low",
              "provider"
            ],
            "type": "string",
            "description": "OpenRouter only: off disables thinking, or uses low effort for z-ai/ models. Off-mode HTTP 400 retries with low effort, then provider defaults, within run caps. Direct endpoints retain provider thinking settings.",
            "default": "off"
          },
          "maxOutputTokens": {
            "title": "Maximum completion tokens",
            "minimum": 1,
            "maximum": 4096,
            "type": "integer",
            "description": "Upper completion allowance per call, including reasoning tokens. Default 768; platform hard maximum 1024; BYOK hard maximum 4096. Length-truncated answers are free incomplete results.",
            "default": 768
          },
          "maxTotalTokens": {
            "title": "Run token-unit limit",
            "minimum": 1,
            "maximum": 2000000,
            "type": "integer",
            "description": "UTF-8 message bytes plus completion reserve before each attempt, reconciled with valid usage afterward. Platform hard maximum 40000; BYOK 2000000. Unknown usage consumes full reserve.",
            "default": 40000
          },
          "temperature": {
            "title": "Temperature",
            "minimum": 0,
            "maximum": 2,
            "type": "number",
            "description": "Sampling temperature passed to the provider. Repeated runs can differ even at a low value. Does not establish factual correctness.",
            "default": 0.2
          },
          "maxConcurrency": {
            "title": "Concurrent LLM calls",
            "minimum": 1,
            "maximum": 1,
            "type": "integer",
            "description": "Version 1 processes one call at a time. Billing and delivery are serialized. Schedule citation comparisons without overlapping runs.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}