# creative-static-analyzer (`luteous_freezer/creative-static-analyzer`) Actor

- **URL**: https://apify.com/luteous\_freezer/creative-static-analyzer.md
- **Developed by:** [Jérôme Spiell](https://apify.com/luteous_freezer) (community)
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## Creative Static Analyzer

Analyse une publicité static (ou un carrousel) via Gemini Vision et renvoie une décomposition **zone par zone**, prête à transposer sur une autre marque.

C'est le pendant de `creative-video-analyzer` pour les images fixes. Même principe : Apify télécharge le média, Gemini l'analyse, Claude reçoit du **texte**.

***

### Pourquoi cet actor existe

Claude ne peut pas voir une image hébergée sur un domaine externe — ni via `web_fetch`, ni depuis son conteneur. Les URLs TrendTrack (`medias.trendtrack.io`) sont inaccessibles des deux côtés.

Cet actor contourne le problème : les serveurs Apify n'ont aucune de ces restrictions. Ils téléchargent l'image, l'envoient à Gemini, et renvoient une analyse textuelle que Claude peut exploiter.

***

### Déploiement

**1. Créer l'actor**
Sur [console.apify.com](https://console.apify.com) → Actors → Development → **Create new** → Node.js empty project.

**2. Remplacer les fichiers**
Copier le contenu de ce dossier dans l'éditeur web (ou pousser via `apify push` si tu utilises la CLI) :

```
.actor/actor.json
.actor/input_schema.json
.actor/dataset_schema.json
src/main.js
package.json
Dockerfile
```

**3. Build**
Bouton **Build** dans la console. Compter 1-2 minutes.

**4. Tester**
Onglet Input, coller :

```json
{
  "imageUrl": "https://medias.trendtrack.io/facebook/image/962a0e2e5e6074f859f50a691d46a7b9b85f74b115b528d71066cde97f0ed9eb.jpg",
  "geminiApiKey": "<ta clé Google AI Studio>"
}
```

Puis **Start**. L'analyse arrive dans le dataset, champ `analysis`.

**5. Publier** (optionnel)
Settings → Publication, pour pouvoir l'appeler depuis le MCP Apify comme `<ton-username>/creative-static-analyzer`.

***

### Appel depuis Claude

```
call-actor("<username>/creative-static-analyzer", {
  imageUrl: "<URL de la static>",
  geminiApiKey: "<clé du Coffre-fort Notion>"
})
```

Pour un carrousel :

```
call-actor("<username>/creative-static-analyzer", {
  imageUrls: ["<slide 1>", "<slide 2>", "<slide 3>"],
  geminiApiKey: "<clé>"
})
```

***

### Ce que renvoie l'analyse

Neuf sections, calquées sur l'Étape 2 de la skill Génération de Statics :

1. **Structure d'ensemble** — type de composition
2. **Zones dans l'ordre de lecture** — position, fonction, contenu, poids visuel
3. **Texte verbatim** — tout le texte visible, recopié mot pour mot
4. **Traitement du produit** — détouré, en situation, tenu en main…
5. **Codes visuels** — couleurs, contraste, typographie, éléments graphiques
6. **Ce qui porte la performance** — ce qui accroche et pourquoi
7. **Mécanique probable** — le format nommé en une ligne
8. **Ce qui est transposable** — et ce qui ne l'est pas
9. **Points de vigilance** — les actifs requis pour la reproduire honnêtement

Sur un carrousel, chaque slide est analysée séparément, plus une section **Flux narratif** sur la progression.

***

### Coût

Une static en `gemini-3.8-flash` ≈ 0,002 $. Négligeable même sur un gros batch.

Passer sur `gemini-3.1-pro-preview` uniquement si le texte de l'image est dense ou mal rendu — c'est environ 10× plus cher pour un gain qui ne se justifie pas sur une static ordinaire.

***

### Limites

- **10 slides maximum** par carrousel
- **18 Mo par image** (limite de l'envoi inline à Gemini)
- L'URL doit être **publiquement accessible** — pas de lien signé expiré, pas de contenu derrière authentification

***

### Messages d'erreur

| Erreur | Cause |
|---|---|
| `Cle API Gemini invalide` | Vérifier la valeur dans le Coffre-fort Notion, entrée « Google AI Studio (Gemini) » |
| `Quota Gemini depasse` | Attendre quelques minutes, ou vérifier le plan Google AI Studio |
| `Telechargement impossible (403)` | L'URL a expiré ou nécessite une authentification |
| `L'URL ne renvoie pas une image` | Le lien pointe vers une page HTML, pas vers le fichier image |

# Actor input Schema

## `imageUrl` (type: `string`):

L'URL directe de la static a analyser. Pour un carrousel, utilise plutot imageUrls.

## `imageUrls` (type: `array`):

Les slides d'un carrousel, dans l'ordre. Maximum 10. Prioritaire sur imageUrl si renseigne.

## `geminiApiKey` (type: `string`):

Cle Google AI Studio. A recuperer dans le Coffre-fort Notion, entree 'Google AI Studio (Gemini)'.

## `model` (type: `string`):

Flash suffit pour une static. Pro si le texte de l'image est dense ou difficile a lire.

## `language` (type: `string`):

Langue dans laquelle Gemini rend son analyse.

## `customPrompt` (type: `string`):

Remplace entierement le prompt d'analyse par defaut. A laisser vide dans le workflow normal.

## `timeoutSeconds` (type: `integer`):

Au-dela, le run s'arrete avec une erreur au lieu de tourner indefiniment.

## Actor input object example

```json
{
  "imageUrl": "https://medias.trendtrack.io/facebook/image/abc123.jpg",
  "model": "gemini-3.5-flash",
  "language": "fr",
  "timeoutSeconds": 120
}
```

# Actor output Schema

## `analyses` (type: `string`):

No description

## `analysesJson` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("luteous_freezer/creative-static-analyzer").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("luteous_freezer/creative-static-analyzer").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 '{}' |
apify call luteous_freezer/creative-static-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,luteous_freezer/creative-static-analyzer"
        }
    }
}
```

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/5TJMXY94gLjLZikXr/builds/Bu8fKrs4W6WSGAQYf/openapi.json
