# Image Gen

## List Image Gen Templates

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

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="200: OK " %}
This will send you raw image data (bytes)
{% endtab %}
{% endtabs %}

## Generate Image Template

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

Generate a image template type with parameters.

#### 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)
{% endtab %}
{% endtabs %}

{% content-ref url="/pages/g7Zax5iY8kkbxIYDMvVJ" %}
[Templates](/api/endpoints/image-gen/templates.md)
{% endcontent-ref %}

## Custom Image Generation

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

Generate a custom image with json body format.

#### Headers

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

{% tabs %}
{% tab title="200: OK Test" %}
This will send you raw image data (bytes)
{% endtab %}

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

```json
{
    "success": false,
    "code": 400,
    "message": "Failed to parse request json. ( IG-7 )"
}
```

{% endtab %}
{% endtabs %}

{% content-ref url="/pages/PCT1XlYJZYZov5nKpkxL" %}
[Custom Image](/api/endpoints/image-gen/custom-image.md)
{% endcontent-ref %}


---

# 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/image-gen.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.
