# Image to Text > This endpoint enables you to generate descriptive captions for images. By submitting an image to the endpoint, it analyzes the visual content and returns a concise, human-like caption that summarizes what’s depicted in the image. ## Overview - **Model ID**: `Image-Caption` - **Category**: image - **Provider**: modelslab - **Status**: active - **Screenshot**: `https://assets.modelslab.com/generations/fa3a8899-a3aa-4506-b7f9-0b1a5ab645b9.png` ## API Information This model can be used via our HTTP API. See the API documentation and usage examples below. ### Endpoint - **URL**: `https://modelslab.com/api/v6/image_editing/caption` - **Method**: POST ### Parameters - **`init_image`** (required): Initial Image - Type: file - Example: Enter Url - **`length`** (required): Specifies the desired length of the generated image caption. - Type: select (options: Short, Normal, Long) ## Usage Examples ### cURL ```bash curl --request POST \ --url https://modelslab.com/api/v6/image_editing/caption \ --header "Content-Type: application/json" \ --data '{ "key": "YOUR_API_KEY", "model_id": "Image-Caption", "init_image": "https://assets.modelslab.com/generations/ec9074fa-6046-4da5-a911-bbb62c7e6c80.jpg", "length": "short" }' ``` ### Python ```python import requests response = requests.post( "https://modelslab.com/api/v6/image_editing/caption", headers={ "Content-Type": "application/json" }, json={ "key": "YOUR_API_KEY", "model_id": "Image-Caption", "init_image": "https://assets.modelslab.com/generations/ec9074fa-6046-4da5-a911-bbb62c7e6c80.jpg", "length": "short" } ) print(response.json()) ``` ### JavaScript ```javascript fetch("https://modelslab.com/api/v6/image_editing/caption", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "key": "YOUR_API_KEY", "model_id": "Image-Caption", "init_image": "https://assets.modelslab.com/generations/ec9074fa-6046-4da5-a911-bbb62c7e6c80.jpg", "length": "short" }) }) .then(response => response.json()) .then(data => console.log(data)); ``` ## Links - [Model Playground](https://modelslab.com/models/Image-Caption/Image-Caption) - [API Documentation](https://docs.modelslab.com) - [ModelsLab Platform](https://modelslab.com)