CoreViz
SDK

sdk.describe()

Generate detailed descriptions and captions for images using AI

sdk.describe()

Generate a detailed text description, caption, or alt text for any image using CoreViz's vision models.

Interactive Demo

Try it out ↓

Signature

sdk.describe(image: string, options?: DescribeOptions): Promise<string>

Parameters

ParameterTypeRequiredDescription
imagestringYesImage URL or base64 data URI
options.promptstringNoCustom prompt to guide the description (e.g. "Describe only the clothing")

Returns

Promise<string> — the description text.

Examples

import { CoreViz } from '@coreviz/sdk';

const sdk = new CoreViz({ apiKey: process.env.COREVIZ_API_KEY });

// Basic description
const description = await sdk.describe('https://example.com/photo.jpg');
console.log(description);
// "A red sports car is parked on a cobblestone street in front of a brick building..."

// Custom prompt
const altText = await sdk.describe('https://example.com/photo.jpg', {
  prompt: 'Write a short, accessible alt text for this image (under 120 characters)',
});

// From a local file (browser)
const file = event.target.files[0];
const resized = await sdk.resize(file);
const description2 = await sdk.describe(resized);

Use Cases

  • Accessibility — generate alt text for <img> elements
  • CMS automation — auto-fill image descriptions on upload
  • Social media — generate captions for posts
  • Search indexing — create text metadata from visual content

Raw API Endpoint

This method calls POST /api/ai/describe. See the Vision API Reference for raw HTTP details.