# AI Translator, Summarizer & Rewriter (`jungle_synthesizer/ai-content-translator-summarizer`) Actor

Transform any URL or text — translate, summarize, rewrite, extract key points, or TL;DR. URL inputs auto-extract to clean text. No API key needed. Token + cost accounting in every dataset row. Local cache for repeat inputs.

- **URL**: https://apify.com/jungle_synthesizer/ai-content-translator-summarizer.md
- **Developed by:** [BowTiedRaccoon](https://apify.com/jungle_synthesizer) (community)
- **Categories:** AI, Automation
- **Features:** Limited permissions
- **Stats:** 5 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $16.00 / 1,000 record scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## AI Translator & Summarizer - OpenRouter BYO Key, Bulk URL & Text Processing

Transform any URL or raw text through five AI-powered modes: translate, summarize, rewrite, extract key points, and TL;DR. Bring your own OpenRouter API key to select from GPT-4o, Claude Sonnet, Gemini Flash, Mistral, and other models. URL inputs are automatically fetched and extracted to clean article text before processing. Every dataset row includes token counts and vendor cost in USD.

### What does it do?

- **Translate** — Render text in any language. Supply an ISO 639-1 code (e.g. `es`) or a language name (e.g. `French`).
- **Summarize** — Condense content in formal, casual, technical, marketing, or SEO style.
- **Rewrite** — Reword content in a chosen style while preserving length and meaning.
- **Extract key points** — Produce a bulleted list of the core ideas from any content.
- **TL;DR** — One-paragraph summary regardless of input length.

URL inputs go through a full fetch and article extraction pipeline that strips navigation, ads, and boilerplate before the AI call. Raw text inputs are processed directly.

### What data does it return?

Each input item produces one dataset row:

| Field | Type | Description |
|-------|------|-------------|
| `input` | object | Original input object `{url?, text?}` |
| `mode` | string | Operation mode: `translate`, `summarize`, `rewrite`, `extract-key-points`, `tldr` |
| `model` | string | OpenRouter model ID used |
| `output` | string | Transformed content |
| `inputTokens` | number | Tokens consumed by the prompt |
| `outputTokens` | number | Tokens consumed by the completion |
| `costUsd` | number | Vendor cost in USD for this record |
| `cached` | boolean | True when served from local cache (no LLM call made) |
| `extractedFromUrl` | boolean | True when a URL was fetched and extracted to text |
| `sourceLanguage` | string | Detected or declared source language |
| `targetLanguage` | string | Target language (translate mode only) |
| `status` | string | `success`, `timeout`, or `error` |
| `errorMsg` | string | Error detail on failure |

#### Sample output: translate mode

```json
{
  "input": { "url": "https://example.com/article" },
  "mode": "translate",
  "model": "openai/gpt-4o-mini",
  "output": "El rápido zorro marrón salta sobre el perro perezoso.",
  "inputTokens": 312,
  "outputTokens": 298,
  "costUsd": 0.00000918,
  "cached": false,
  "extractedFromUrl": true,
  "sourceLanguage": "en",
  "targetLanguage": "es",
  "status": "success"
}
```

#### Sample output: extract-key-points mode

```json
{
  "input": { "text": "Long article text here..." },
  "mode": "extract-key-points",
  "model": "openai/gpt-4o-mini",
  "output": "- The study examined 1,200 participants over 5 years\n- Primary finding: sleep duration below 6 hours correlates with 23% higher cardiovascular risk\n- Confounders: age, BMI, and exercise frequency were controlled",
  "costUsd": 0.00001240,
  "status": "success"
}
```

### How to use it

| Field | Required | Description |
|-------|----------|-------------|
| `inputs` | Yes | Array of `{url?, text?}` objects. Each item can have a URL, raw text, or both. |
| `mode` | No | `translate` (default), `summarize`, `rewrite`, `extract-key-points`, `tldr` |
| `targetLanguage` | Required for translate | ISO 639-1 code or language name |
| `style` | No | `formal` (default), `casual`, `technical`, `marketing`, `seo` — applies to summarize and rewrite |
| `model` | No | OpenRouter model ID. Default: `openai/gpt-4o-mini` |
| `maxOutputTokens` | No | Cap on response length per input. Default: 1024 |
| `useCache` | No | Cache results by input hash (7-day TTL). Default: `true` |
| `maxItems` | No | Cap on number of inputs to process. Default: 15 |

#### Example: bulk translate URLs to Spanish

```json
{
  "inputs": [
    { "url": "https://example.com/article-1" },
    { "url": "https://example.com/article-2" }
  ],
  "mode": "translate",
  "targetLanguage": "es",
  "model": "openai/gpt-4o-mini",
  "openrouterApiKey": "sk-or-your-key"
}
```

#### Example: extract key points from raw text

```json
{
  "inputs": [
    { "text": "Your long document text here..." }
  ],
  "mode": "extract-key-points",
  "model": "openai/gpt-4o-mini",
  "openrouterApiKey": "sk-or-your-key"
}
```

### Model selection

| Model | Best for |
|-------|----------|
| `openai/gpt-4o-mini` | General translation and summarization; most tasks at lowest cost |
| `google/gemini-flash-1.5` | Fastest option for high-volume batch jobs |
| `mistralai/mistral-small` | European language translation |
| `anthropic/claude-3.5-haiku` | Nuanced rewrites and tone matching |
| `openai/gpt-4o` | Highest quality; recommended for documents over 10,000 words or complex technical/legal text |
| `anthropic/claude-3.5-sonnet` | Complex content requiring careful reasoning or multi-step extraction |

For documents over 10,000 words or for technical, legal, or domain-specific content where accuracy matters, consider upgrading from `gpt-4o-mini` to `gpt-4o` or `claude-3.5-sonnet`.

### Use cases

- **Content localization** — translate web pages or documents into multiple target languages at batch scale
- **Newsletter or article digests** — summarize a list of URLs into TL;DR cards for digest emails or dashboards
- **Knowledge base preparation** — extract key points from long documents before importing into Confluence, Notion, or a RAG pipeline
- **SEO content rewriting** — rewrite existing articles in SEO style to avoid duplication penalties
- **Research synthesis** — extract structured bullet points from academic papers or reports for comparison

### FAQ

**Where are API keys stored?**
Your OpenRouter key is passed directly to the OpenRouter API for each call. It also appears in run logs.

**What is the caching behavior?**
When `useCache` is enabled (default), results are cached using a hash of the input text, mode, target language, model, and style. Cache TTL is 7 days. A cache hit returns the stored output with zero token consumption.

**What happens when an input fails?**
Failed inputs produce a row with `status: "error"` and an `errorMsg`. The actor continues processing remaining inputs. Common causes: invalid API key, unreachable URL, or missing `targetLanguage` when mode is `translate`.

Output is available in JSON, CSV, and Excel via the Apify dataset export panel.

***

**Further reading:** [Technical Data Utilities: DNS Audits, SSL Checks, Satellite Elements, and Bulk Parsing](https://orbtop.com/articles/technical-data-utilities-dns-ssl-satellites/)

# Actor input Schema

## `sp_intended_usage` (type: `string`):

What will this data feed? E.g. lead lists, KYB checks, price tracking.

## `sp_improvement_suggestions` (type: `string`):

Provide any feedback or suggestions for improvements.

## `sp_contact` (type: `string`):

We'll personally help with your use case. No spam.

## `inputs` (type: `array`):

Array of objects with either url or text field (or both). Example: \[{"url": "https://example.com"}, {"text": "Hello world"}]

## `mode` (type: `string`):

No description

## `targetLanguage` (type: `string`):

ISO 639-1 code or language name (e.g. 'es', 'French'). Required when mode is translate.

## `style` (type: `string`):

No description

## `maxOutputTokens` (type: `integer`):

Cap on response length per input.

## `useCache` (type: `boolean`):

Cache results by input hash. Identical inputs return instantly on re-run without consuming tokens.

## `maxItems` (type: `integer`):

Maximum number of inputs to process. Set to limit costs on large batches.

## Actor input object example

```json
{
  "sp_contact": "Share your email here...",
  "inputs": [
    {
      "url": "https://apify.com/about"
    }
  ],
  "mode": "translate",
  "targetLanguage": "es",
  "style": "formal",
  "maxOutputTokens": 1024,
  "useCache": true,
  "maxItems": 5
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "sp_contact": "Share your email here...",
    "inputs": [
        {
            "url": "https://apify.com/about"
        }
    ],
    "mode": "translate",
    "targetLanguage": "es",
    "style": "formal",
    "maxOutputTokens": 1024,
    "useCache": true,
    "maxItems": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("jungle_synthesizer/ai-content-translator-summarizer").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "sp_contact": "Share your email here...",
    "inputs": [{ "url": "https://apify.com/about" }],
    "mode": "translate",
    "targetLanguage": "es",
    "style": "formal",
    "maxOutputTokens": 1024,
    "useCache": True,
    "maxItems": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("jungle_synthesizer/ai-content-translator-summarizer").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "sp_contact": "Share your email here...",
  "inputs": [
    {
      "url": "https://apify.com/about"
    }
  ],
  "mode": "translate",
  "targetLanguage": "es",
  "style": "formal",
  "maxOutputTokens": 1024,
  "useCache": true,
  "maxItems": 5
}' |
apify call jungle_synthesizer/ai-content-translator-summarizer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jungle_synthesizer/ai-content-translator-summarizer"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ECrHcEMoaguZerD3I/builds/TKNnizQhYgAxk6wJz/openapi.json
