# Describe image

### NodeJS

```javascript
const src = await getImageAddress("http://www.cloudbrowser.ai", "img");

if (!src) return;

const ai = new AIService(cloudBrowserToken, {
    openAIConfiguration: { apiKey: openAiToken },
});

const rpai = await ai.describe({
    // base64Image: downloadImage(src), // You can send bytes instead of the image URL
    imageUrl: src,
    question: "Is the image red?",
    responseFormat: {
        properties: {
            response: { type: "boolean" },
        },
    },
});

console.log("The lowest price is:", JSON.parse(rpai.response).response);
```

### .NET

```csharp
var src = await GetImageAddress("http://www.cloudbrowser.ai","img").ConfigureAwait(false);

if (src == null) return;

using AIService ai = new(cloudBrowserToken, openAiToken);

var rpai = await ai.Describe<bool>(new() {
  //Base64Image = DownloadImage(src) //You can send bytes instead of the iamge url
  ImageUrl= src,
  Question="Is the image red?"
}).ConfigureAwait(false);

Console.WriteLine("The lowest price is: {0}", rpai);
```

### **/api/v1/ai/Describe – Answer Questions or Describe an Image**

**Method**:\
`POST`

**Parameters**:

* `question`: *(string)* – The question or task related to the image.
* `base64Image`: *(string)* – The base64-encoded image. *(optional)*
* `imageUrl`: *(string)* – The URL of the image. *(optional)*
* `responseFormat`: *(string)* – The format of the response (e.g., `text`, `json`).

**Notes**:

* Either `base64Image` or `imageUrl` must be provided, but not both.

**Request Example**:

```bash
curl -X POST https://production.cloudbrowser.ai/api/v1/ai/Describe \
-H "Content-Type: application/json" \
-d '{
  "question": "What objects are in this image?",
  "imageUrl": "https://example.com/image.jpg",
  "responseFormat": "text"
}'
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cloudbrowser.gitbook.io/docs/configurations/ai-functions/describe-image.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
