# Test

{% openapi src="<https://3672136931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW0dwcUm6OW6GS8mkEbZT%2Fuploads%2FJUBM5LaeZTuP49Qr1JaU%2Fswagger.json?alt=media&token=229f23d5-922f-43d7-94a1-9b6537bca813>" path="/" method="get" %}
[swagger.json](https://3672136931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW0dwcUm6OW6GS8mkEbZT%2Fuploads%2FJUBM5LaeZTuP49Qr1JaU%2Fswagger.json?alt=media\&token=229f23d5-922f-43d7-94a1-9b6537bca813)
{% endopenapi %}

## Home

<mark style="color:blue;">`GET`</mark> `https://api.fluxpoint.dev/`

Test if the API works.

#### Headers

| Name                                            | Type | Description                                           |
| ----------------------------------------------- | ---- | ----------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> |      | Your API token here <https://fluxpoint.dev/api/token> |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "success": true,
    "code": 200,
    "message": "Hello API user - 12345",
    "website": "https://fluxpoint.dev",
    "discord": "https://discord.gg/fluxpoint",
    "docs": "https://docs.fluxpoint.dev/api",
    "twitter": "https://twitter.com/FluxpointDev",
    "email": "support@fluxpoint.dev",
    "donate": "https://patreon.com/fluxpointdev",
    "revolt": "https://app.revolt.chat/invite/J5Ras1J3"
}
```

{% endtab %}
{% endtabs %}

## Test Gallery Image

<mark style="color:blue;">`GET`</mark> `https://api.fluxpoint.dev/test/gallery`

Get a test gallery file response

#### Headers

| Name                                            | Type | Description                                           |
| ----------------------------------------------- | ---- | ----------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> |      | Your API token here <https://fluxpoint.dev/api/token> |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "success": true,
    "code": 200,
    "message": "",
    "id": "22706878647631872",
    "file": "https://img.fluxpoint.dev/22706878647631872.png"
}
```

{% endtab %}
{% endtabs %}

## Test Image Generation

<mark style="color:blue;">`GET`</mark> `https://api.fluxpoint.dev/test/image`

Get a test image data (raw bytes) to use with image generation.\
This will show a blue square.

#### Query Parameters

| Name | Type       | Description                                   |
| ---- | ---------- | --------------------------------------------- |
| type | (png/webp) | Optional image type to use, defaults to jpeg. |

#### Headers

| Name                                            | Type | Description                                           |
| ----------------------------------------------- | ---- | ----------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> |      | Your API token here <https://fluxpoint.dev/api/token> |

{% tabs %}
{% tab title="200: OK " %}
This will send you raw image data (bytes) of a jpge image for a blue square.\
You can also use ?type=png or ?type=webp to test image formats.\
![](https://3672136931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FW0dwcUm6OW6GS8mkEbZT%2Fuploads%2FjEkLSyeqTqdPQiZ8QXsn%2Fimage.png?alt=media\&token=6cf09a73-47e1-4145-a540-697a112aa068)
{% endtab %}
{% endtabs %}

## Test Error

<mark style="color:blue;">`GET`</mark> `https://api.fluxpoint.dev/test/error`

Get a test error response to handle errors.

#### Headers

| Name                                            | Type | Description                                           |
| ----------------------------------------------- | ---- | ----------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> |      | Your API token here <https://fluxpoint.dev/api/token> |

{% tabs %}
{% tab title="400: Bad Request " %}

```javascript
{
    "success": false,
    "code": 400,
    "message": "This is a bad request test"
}
```

{% endtab %}
{% endtabs %}

## Test Json

<mark style="color:green;">`POST`</mark> `https://api.fluxpoint.dev/test/json`

Respond back with the json content you have given to test API clients and placeholder formats

#### Headers

| Name                                            | Type | Description                                           |
| ----------------------------------------------- | ---- | ----------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> |      | Your API token here <https://fluxpoint.dev/api/token> |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "key": "value",
    
}
```

{% endtab %}
{% endtabs %}
