> For the complete documentation index, see [llms.txt](https://docs.fluxpoint.dev/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fluxpoint.dev/api/client/lib-developers.md).

# Lib Developers

{% hint style="info" %}
This page is only for library developers.\
API users need to use the endpoints listed in the sidebar.
{% endhint %}

Here is what an API client lib should look like.

The http client should always include an `Authorization` header for every request and an optional header for `User-Agent` to show the library name or project/bot name.

![](/files/kgXxaT0n70NsIslixDtP)\
The base class should be FluxpointClient with a category for each types of endpoints to use.\
So this should be used by users like `Client.Test.GetTestImage()` or `Client.Sfw.GetNeko()`\
\
You should also include a TestAuthentication() method so the user can check if they are authenticated properly.

### Send Request Method

You should create a main SendRequest() method that can be used for all endpoints.\
![](/files/Ga1M11XSIlA4HLaLzr5P)\
This will include the HttpMethod (get/post) ApiType (Fluxpoint/Gallery) Path (Endpoint to use) Content (Optional body content this should include string/json support.\
\
The output response you recieve should include the default response of success, code and message and any optional data from the endpoint you use.

### Image Gen Method

This should be the same as Send Request but the response you get will contain raw image data (bytes) that you should handle.

{% hint style="info" %}
Some http clients/libs may require sending a <mark style="color:yellow;">POST</mark> request to use json body.
{% endhint %}

### Endpoints

All endpoints need to have a category so that users can find them easily.\
\
You can use the `SendRequest()` method to send a <mark style="color:green;">GET</mark> request to `https://api.fluxpoint.dev/me`\
![](/files/IGcoOBH4Gz2D9fqp9v6o)\
Users should then be able to use this with `Client.Misc.GetMeAsync()`
