Zapytanie AI #198
2026-01-07 00:02:22
Błąd
The requested model 'sonar' does not exist.
Typ
images
Produktów
3
Tokeny wejściowe
0
Tokeny wyjściowe
0
Czas trwania
-
Produkty w tym zapytaniu
Request Payload
{
"text": {
"format": {
"name": "product_data_batch",
"type": "json_schema",
"schema": {
"type": "object",
"required": [
"products"
],
"properties": {
"products": {
"type": "array",
"items": {
"type": "object",
"required": [
"ean",
"images"
],
"properties": {
"ean": {
"type": "string"
},
"images": {
"type": "array",
"items": {
"type": "object",
"required": [
"url",
"source_page",
"type"
],
"properties": {
"url": {
"type": "string"
},
"type": {
"enum": [
"main",
"gallery",
"detail",
"lifestyle"
],
"type": "string"
},
"source_page": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
},
"strict": true
}
},
"input": [
{
"role": "system",
"content": "You are an aggressive image harvester. Your goal is to collect **10 high-resolution product images**.\n\nCRITICAL EXTRACTION RULES:\n1. **OPEN EVERY PAGE** - When you find a product page, ALWAYS open it and extract ALL gallery images (not just 1-2)\n2. **MULTIPLE SOURCES** - Search ALL URLs in `brand_website` field (comma-separated) + ALL preferred retailers\n3. **FULL GALLERIES** - Product pages typically have 4-8 images in gallery. Extract ALL of them, not just the main image\n4. **RESOLUTION** - Target 1200px width. Modify URL params: `?w=400` → `?w=1200`, `_400x` → `_1200x`\n\nFAILURE MODE TO AVOID: Finding a product page with 6 images but only extracting 2. You MUST extract ALL images from each gallery."
},
{
"role": "developer",
"content": "## STEP-BY-STEP PROCEDURE\n\nExecute these steps IN ORDER. Do NOT skip any step until you have 10+ images.\n\n### STEP 1: Parse brand_website field\nThe `brand_website` field contains comma-separated URLs. Split them and search EACH ONE:\n- Example: \"https:\/\/maloja.com, https:\/\/stonefeet.ro\" → search BOTH sites\n- For each URL, search: `site:{domain} \"{product_name}\"`\n- Open EVERY product page found and extract ALL gallery images\n\n### STEP 2: Search preferred retailers\nFor EACH shop in `preferred_sources` array, search:\n```\nsite:{shop} \"{brand} {product_name}\"\n```\nOpen every product page. Extract ALL gallery images (typically 4-8 per page).\n\n### STEP 3: General search (if < 8 images)\n```\n\"{brand} {product_name}\" product images\n```\n\n### STEP 4: Lifestyle images (if < 10 images)\n```\n\"{brand} {product_name}\" worn OR \"in use\" OR \"lifestyle\"\n```\n\n## GALLERY EXTRACTION - TECHNICAL GUIDE\n\nWhen you open a product page, use `find_in_page` with these patterns to find ALL images:\n\n### Pattern 1: Find image file extensions\n```\nfind_in_page pattern: \".jpg\"\nfind_in_page pattern: \".png\"\nfind_in_page pattern: \".webp\"\n```\n\n### Pattern 2: Find CDN URLs\n```\nfind_in_page pattern: \"cdn.\"\nfind_in_page pattern: \"\/media\/\"\nfind_in_page pattern: \"\/images\/\"\nfind_in_page pattern: \"\/product\/\"\n```\n\n### Pattern 3: Find image data attributes\n```\nfind_in_page pattern: \"data-src\"\nfind_in_page pattern: \"data-zoom\"\nfind_in_page pattern: \"data-large\"\n```\n\n### After finding patterns:\n1. Extract ALL unique image URLs that match\n2. If URL has size param like `?w=400` or `Resize=100`, change to `?w=1200` or `Resize=1200`\n3. Remove duplicates\n4. Return ALL found images (typically 4-8 per product page)\n\n**IMPORTANT**: Don't stop at og:image - that's usually just the main image. Search for ALL gallery images!\n\n## IMAGE TYPES\n- **main**: Front view, white\/neutral background\n- **gallery**: Other angles (back, side, top)\n- **detail**: Close-ups of features, materials, labels\n- **lifestyle**: Product worn\/used by person\n\n## RESOLUTION\n- Target: 1200px width\n- Minimum acceptable: 800px\n- Modify URL size params for max resolution\n\n## FORBIDDEN SOURCES\n- Amazon, eBay, Allegro\n- Pinterest, forums, blogs\n- Watermarked images"
},
{
"role": "user",
"content": "## Task\nFind **10 high-resolution images** for each product.\n\n## Products\n{\n \"batch\": {\n \"products\": [\n {\n \"ean\": \"3080094757667\",\n \"name\": \"Lafuma Buty męskie Access Clim MID M north sea r. 44 2\\\/3 (44 2\\\/3)\",\n \"brand\": \"LAFUMA\",\n \"brand_website\": \"https:\\\/\\\/www.lafuma.com\\\/\",\n \"color\": \"niebieski\",\n \"preferred_sources\": [\n \"8a.pl\",\n \"sportano.pl\",\n \"decathlon.pl\",\n \"intersport.pl\",\n \"bergfreunde.eu\",\n \"trekkinn.com\"\n ]\n },\n {\n \"ean\": \"3515729907655\",\n \"name\": \"Millet Buty podejściowe damskie Hike W Saphir r. 39 1\\\/3 (39 1\\\/3)\",\n \"brand\": \"MILLET\",\n \"brand_website\": \"https:\\\/\\\/www.millet.com\\\/\",\n \"color\": \"niebieski\",\n \"preferred_sources\": [\n \"8a.pl\",\n \"sportano.pl\",\n \"decathlon.pl\",\n \"intersport.pl\",\n \"bergfreunde.eu\",\n \"trekkinn.com\"\n ]\n },\n {\n \"ean\": \"191190479681\",\n \"name\": \"Keen Buty damskie Terradora II Vent drizzle \\\/ ocean wave (39)\",\n \"brand\": \"KEEN\",\n \"brand_website\": \"https:\\\/\\\/www.keenfootwear.com\\\/\",\n \"color\": \"szary\",\n \"preferred_sources\": [\n \"8a.pl\",\n \"sportano.pl\",\n \"decathlon.pl\",\n \"intersport.pl\",\n \"bergfreunde.eu\",\n \"trekkinn.com\"\n ]\n }\n ]\n }\n}\n\n## MANDATORY SEARCH ORDER\n\n### 1. Search ALL brand websites\nThe `brand_website` field may contain multiple comma-separated URLs.\n**You MUST search EACH ONE separately.**\nExample: If brand_website = \"https:\/\/maloja.com, https:\/\/stonefeet.ro\"\n→ Search: `site:maloja.com \"{product}\"`\n→ Search: `site:stonefeet.ro \"{product}\"`\n→ Open each product page found and extract ALL gallery images (4-8 per page)\n\n### 2. Search preferred retailers\nSearch each shop from `preferred_sources`: {8a.pl, sportano.pl, decathlon.pl, intersport.pl, bergfreunde.eu, trekkinn.com}\n→ `site:8a.pl \"{brand} {product}\"` etc.\n→ Open product pages, extract ALL gallery images\n\n### 3. General search (if still < 8 images)\n→ `\"{brand} {product}\" product images high resolution`\n\n### 4. Lifestyle search (if still < 10 images)\n→ `\"{brand} {product}\" worn OR lifestyle`\n\n## CRITICAL: How to extract ALL gallery images\nWhen you open a product page, use `find_in_page` with patterns like:\n- \".jpg\" or \".png\" or \".webp\"\n- \"cdn.\" or \"\/media\/\" or \"\/images\/\"\n\nExtract ALL matching URLs, not just the first one! Galleries have 4-8 images.\n\n## Output\nReturn JSON with ALL found images. Target: 10 per product."
}
],
"model": "sonar",
"store": false,
"tools": [
{
"type": "web_search"
}
],
"temperature": 0,
"tool_choice": "auto"
}