📋 Table of Contents
- Public Endpoints
- Authenticated Endpoints
🔐 Authentication
ImageFlow uses Bearer Token authentication. All endpoints that require authentication must include the following header:Getting an API Key
The API Key is configured via theAPI_KEY
environment variable. Contact the administrator to obtain it.
🌐 Public Endpoints
Random Image Endpoint
Endpoint:GET /api/random
Purpose: Fetch a random image with advanced filtering and intelligent format selection.
Basic Usage
Advanced Filtering Parameters
Param | Type | Description | Example |
---|---|---|---|
tag | string | Single tag filter | ?tag=nature |
tags | string | Multi-tag filter (AND) | ?tags=nature,sunset,mountain |
exclude | string | Exclude tags | ?exclude=nsfw,private |
orientation | string | Force orientation | ?orientation=landscape |
format | string | Preferred format | ?format=webp |
Examples
Based on your backend and tag:
- Base URL:
https://imageflow-backend.catcat.blog
- Tag:
鬼针草
(Chinese; URL-encode recommended in CLI)
0) Basic usage (no filter)
1) Tag filters (single / multi)
2) Force orientation (landscape / portrait)
3) Preferred format (AVIF / WebP)
4) Orientation × Format combinations (matrix)
5) Content negotiation via Accept (recommended)
6) Excluding tags (when applicable)
- When using HTML
<img>
, writing Chinese directly is fine; browsers auto-encode. - In CLI/SDK calls, URL-encode Chinese (“鬼针草” →
%E9%AC%BC%E9%92%88%E8%8D%89
). format
is a preference; if unsupported, the service negotiates and falls back.