# Free File Host

{% hint style="info" %}
**NOTE:** All files are uploaded to secure S3 storage and will be deleted after 24 hours.
{% endhint %}

API Endpoint:

```
https://api.hyprlab.io/v1/uploads
```

### Image Upload Examples

{% tabs %}
{% tab title="via Upload" %}
{% code lineNumbers="true" %}

```bash
curl -X POST https://api.hyprlab.io/v1/uploads \
  -H "Authorization: Bearer $HYPRLAB_API_KEY" \
  -F "file=@/path/to/your/image.jpg" \
  -F "output_format=webp"
```

{% endcode %}
{% endtab %}

{% tab title="via URL" %}
{% code lineNumbers="true" %}

```bash
curl -X POST https://api.hyprlab.io/v1/uploads \
  -H "Authorization: Bearer $HYPRLAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://example/image.webp",
    "output_format": "png"
  }'
```

{% endcode %}
{% endtab %}

{% tab title="via Base64" %}
{% code lineNumbers="true" %}

```bash
curl -X POST https://api.hyprlab.io/v1/uploads \
  -H "Authorization: Bearer $HYPRLAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...",
    "output_format": "png"
  }'
```

{% endcode %}
{% endtab %}

{% tab title="via Raw Base64" %}
{% code lineNumbers="true" %}

```bash
curl -X POST https://api.hyprlab.io/v1/uploads \
  -H "Authorization: Bearer $HYPRLAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "iVBORw0KGgoAAAANSUhEUgAAAAUA.....",
    "output_format": "jpg"
  }'
```

{% endcode %}
{% endtab %}
{% endtabs %}

***

Sample Response:

{% code lineNumbers="true" %}

```json
{
  "imageUrl": "https://example.com/image.png"
}
```

{% endcode %}

***

### Video Upload Examples

{% tabs %}
{% tab title="via Upload" %}
{% code lineNumbers="true" %}

```bash
curl -X POST https://api.hyprlab.io/v1/uploads \
  -H "Authorization: Bearer $HYPRLAB_API_KEY" \
  -F "file=@/path/to/your/video.mp4"
```

{% endcode %}
{% endtab %}

{% tab title="via URL" %}
{% code lineNumbers="true" %}

```bash
curl -X POST https://api.hyprlab.io/v1/uploads \
  -H "Authorization: Bearer $HYPRLAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video": "http://example.com/video.mp4"
  }'
```

{% endcode %}
{% endtab %}

{% tab title="via Base64" %}
{% code lineNumbers="true" %}

```bash
curl -X POST https://api.hyprlab.io/v1/uploads \
  -H "Authorization: Bearer $HYPRLAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video": "data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAAC..."
  }'
```

{% endcode %}
{% endtab %}

{% tab title="via Raw Base64" %}
{% code lineNumbers="true" %}

```bash
curl -X POST https://api.hyprlab.io/v1/uploads \
  -H "Authorization: Bearer $HYPRLAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video": "AAAAHGZ0eXBNNFYgAAAC...."
  }'
```

{% endcode %}
{% endtab %}
{% endtabs %}

***

Sample Response:

```json
{
  "videoUrl": "https://example.com/video.mp4"
}
```


---

# 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://docs.hyprlab.io/endpoint/free-file-host.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.
