Blip 2

From awesome-genmedia/skills · View interactive version

Blip 2 is an AI agent skill from the GitHub repository awesome-genmedia/skills. Blip 2 | Image Captioning and Visual Q&A. Generate captions and answer questions about images using BLIP-2. Triggers: blip, image caption, visual qa, image description, image question

How to use this skill

Skill file

Blip 2

Generate captions and answer questions about images using BLIP-2. Supports image captioning, visual question answering, and context-aware image analysis.

Quick Start

Requires an each::labs API key. Get one at eachlabs.ai.

curl -X POST https://api.eachlabs.ai/v1/prediction \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "model": "blip-2",
    "version": "0.0.1",
    "input": {
      "image": "https://example.com/photo.jpg",
      "question": "What is happening in this image?",
      "temperature": 0.5
    }
  }'

Parameters

| Parameter | Type | Default | Description |

|-----------|------|---------|-------------|

| caption | boolean | false | Generate a descriptive caption for the image |

| context | string | - | Background information to help generate better responses |

| image | string | - | Image to analyze |

| question | string | - | Question to answer about the image |

| temperature | number | 0.5 | Controls creativity (higher = more creative, lower = more conservative) |

| use_nucleus_sampling | boolean | false | Use top-p sampling for more diverse responses |

Examples

Generate image caption:

curl -X POST https://api.eachlabs.ai/v1/prediction \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "model": "blip-2",
    "version": "0.0.1",
    "input": {
      "image": "https://example.com/landscape.jpg",
      "caption": true,
      "temperature": 0.7,
      "use_nucleus_sampling": true
    }
  }'

Visual Q&A with context:

curl -X POST https://api.eachlabs.ai/v1/prediction \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "model": "blip-2",
    "version": "0.0.1",
    "input": {
      "image": "https://example.com/product-shelf.jpg",
      "question": "How many items are on the top shelf?",
      "context": "This is a retail store display",
      "temperature": 0.3
    }
  }'

Related Models

Documentation

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.