# Test

{% openapi src="/files/exy307bPYvQgQ4CthIEk" 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.\
![](/files/N8T314217f6SCwWOy1KN)
{% 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 %}


---

# 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.fluxpoint.dev/api/endpoints/test.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.
