# Blocks

Below are example representations of all currently supported block types in the API.

### Text

```javascript
{"sentence": "A random sentence"}
```

### Email

```javascript
{"an_email": "joe@example.com"}
```

### Number

```javascript
{"a_number": 42}
```

### Date

```javascript
{"a_date": "2021-01-31"}
```

### Link

```javascript
{"a_link": "https://example.com"}
```

### Image

```javascript
{"some_image": "https://example.com/logo.png"}
```

### PDF

```javascript
{"a_pdf": "https://example.com/file.pdf"}
```

### Embed

```javascript
{"website": "https://example.com"}
```

### Video

```javascript
{"a_video": "https://example.com/video.mp4"}
```

### Audio

```javascript
{"a_song": "https://example.com/song.mp3"}
```

### Binary

```javascript
{"true_or_false": true}
```

### Single Selection

```javascript
{"choose_a_color": "red"}
```

### Multiple Selection

```javascript
{"choose_few_colors": ["red", "blue", "green"]}
```

### Form

```javascript
{
  "form_sequence": {
    "question_1": true,
    "question_2": "this is a random answer",
    "question_3": "option-2"  
  }
}
```

### Rich Text

```javascript
{
  "some_text": "This can be **Markdown** or <b>HTML</b> formatted depending on the block's configuration."
}
```

### Text Highlighting

```javascript
{
  "ner_data": {
    "text": "This is a paragraph of text",
    "entities": [{
      "start": 5,
      "end": 7,
      "category": "verb"
    }]
  }
}
```

### Bounding Boxes

```javascript
{
  "bounding_boxes_id": {
      "image": "https://i2.wp.com/oohtoday.com/wp-content/uploads/2018/08/formetco-photo-digital-unit-in-canada.jpg?fit=1995%2C1125&ssl=1",
      "objects": [
        {
          "w": 0.274, // 27.4%
          "h": 0.2955, // 29.55%
          "y": 0.1051, // 10.51%
          "x": 0.2067, // 20.67%
          "category": "billboard"
        },
        {
          "w": 0.2244,
          "h": 0.2585,
          "y": 0.5852,
          "x": 0.6571,
          "category": "vehicle"
        }
      ]
    }
}
```

{% hint style="info" %}
Coordinates are expressed in relative terms with respect to the image in question to accommodate for responsiveness in terms of users' varying window dimensions and screen resolutions. With that, Bounding Box blocks can change in size without disrupting how past tasks are displayed.
{% endhint %}

### Text Sequence

```javascript
{
  "sentences": [
    "Foo",
    "Bar"
  ]
}
```


---

# 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://bernatf.gitbook.io/human-lambdas-documentation/api/blocks.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.
