Blame

3d2dbf Donovan_DMC 2026-07-09 19:39:02
Add ImageGen
1
# ImageGen
2
3
An [[API Key|YiffyAPI/APIKey]] <span style="color: red;">is</span> required for this service (it must have the "ImageGen" service flag). See [[Shared Responses|YiffyAPI/Shared Responses]] for common error responses.
4
5
<p>Meme and image generation - avatar compositing, text overlays, and a handful of video/gif effects. Successful requests return the generated file directly (as <code>image/png</code>, <code>image/jpeg</code>, <code>image/gif</code>, or <code>video/mp4</code> depending on the endpoint) rather than a JSON envelope.</p>
6
7
<hr>
8
9
## List Endpoints
10
> <code><span style="color: rgb(52, 141, 248);">GET</span></code> `https://imgen.yiff.rest/endpoints.json`
11
12
<p>Returns every currently available endpoint and its parameters. This is the authoritative, always-up-to-date list - the table further down this page is a convenience snapshot and can drift out of date.</p>
13
14
::: success
15
# 200 OK: Success
16
```json
17
{
18
"endpoints": [
19
{
20
"name": "dab",
21
"parameters": ["avatar0"]
22
}
23
]
24
}
25
```
26
:::
27
28
<hr>
29
30
## Generate
31
> <code><span style="color: rgb(52, 141, 248);">GET</span></code> <code><span style="color: rgb(0, 136, 71);">POST</span></code> `https://imgen.yiff.rest/api/{endpoint}`
32
33
<p>Endpoint-specific parameters (see the table below) are on top of the common ones listed here. GET requests take everything as query string parameters; POST requests take a JSON body instead, and use array keys (<code>avatars</code>/<code>usernames</code>) rather than numbered ones.</p>
34
35
::: none
36
# Path Parameters
37
| Name | Type | Description |
38
|-------------------------------------------------------------|--------|---------------------------------------------------------------------------------------------|
39
| endpoint <span style="color: red" title="required">*</span> | String | The name of the endpoint to use. See [List Endpoints](#list-endpoints), or the table below. |
40
:::
41
42
::: none
43
# Query Parameters (GET)
44
| Name | Type | Description |
45
|-----------|--------|----------------------------------------------------------------------------------------------------------|
46
| avatar1 | String | Image URL. Usually a Discord avatar. Supports at least JPG, PNG, GIF, and BMP. Also accepted as `image`. |
47
| avatar2 | String | Image URL, for endpoints involving two users. |
48
| username1 | String | Username for the first user. |
49
| username2 | String | Username for the second user. |
50
| text | String | Text to render on the generated image. |
51
:::
52
53
::: none
54
# Body Parameters (POST)
55
| Name | Type | Description |
56
|-----------|---------------|-----------------------------------------------------------------------------------|
57
| avatars | Array<String> | Image URLs, in order (`avatars[0]` is `avatar1`, etc). Also accepted as `images`. |
58
| usernames | Array<String> | Usernames, in order. |
59
| text | String | Text to render on the generated image. |
60
:::
61
62
::: success
63
# 200 OK: Success
55d839 DonovanDMC 2026-07-10 02:13:49
64
<p>The raw generated file is returned, with an appropriate <code>Content-Type</code>. Standard rate limit headers are also present.</p>
3d2dbf Donovan_DMC 2026-07-09 19:39:02
Add ImageGen
65
:::
66
67
::: danger
68
# 404 Not Found: Unknown Endpoint
69
```json
70
{
71
"success": false,
72
"code": 1090,
73
"error": "Endpoint whatever not found!"
74
}
75
```
76
:::
77
78
::: danger
79
# 400 Bad Request: Bad Request
80
<p>Returned for both malformed/missing parameters and endpoint-specific validation (e.g. an endpoint that expects `text` to contain a comma-separated pair of strings).</p>
81
```json
82
{
83
"success": false,
84
"code": 1091,
85
"error": "index 0 outside of array bounds: 0...0. Are you missing a parameter?"
86
}
87
```
88
:::
89
90
::: danger
91
# 500 Internal Server Error: Generation Error
92
```json
93
{
94
"success": false,
95
"code": 1092,
96
"error": "..."
97
}
98
```
99
:::
100
101
<hr>
102
103
## Endpoints
104
105
> [!NOTE]
106
> This list is a snapshot and can drift out of date - use [List Endpoints](#list-endpoints) for the authoritative list. `avatar1`/`avatar2`/`username1`/`username2`/`text` are the common parameters described above; anything else listed is specific to that endpoint.
107
108
| Endpoint | Parameters |
109
|------------------------|---------------------------------------------------------|
110
| `abandon` | `text` |
111
| `aborted` | `avatar1` |
112
| `affect` | `avatar1` |
113
| `airpods` | `avatar1` |
114
| `america` | `avatar1` |
115
| `armor` | `text` |
116
| `balloon` | `text` |
117
| `bed` | `avatar1`, `avatar2` |
118
| `bongocat` | `avatar1` |
119
| `boo` | `text` |
120
| `brain` | `text` |
121
| `brazzers` | `avatar1` |
122
| `byemom` | `avatar1`, `username1`, `text` |
123
| `cancer` | `avatar1` |
124
| `changemymind` | `text` |
125
| `cheating` | `text` |
126
| `citation` | `text` |
127
| `communism` | `avatar1` |
128
| `confusedcat` | `text` |
129
| `corporate` | `avatar1`, `avatar2` |
130
| `crab` | `text` (two comma-separated strings) |
131
| `cry` | `text` |
132
| `dab` | `avatar1` |
133
| `dank` | `avatar1` |
134
| `deepfry` | `avatar1` |
135
| `delete` | `avatar1` |
136
| `disability` | `avatar1` |
137
| `doglemon` | `text` |
138
| `door` | `avatar1` |
139
| `egg` | `avatar1` |
140
| `emergencymeeting` | `text` |
141
| `excuseme` | `text` |
142
| `expanddong` | `text` |
143
| `expandingwwe` | `text` |
144
| `facts` | `text` |
145
| `failure` | `avatar1` |
146
| `fakenews` | `avatar1` |
147
| `farmer` | `text` (two comma-separated strings) |
148
| `fedora` | `avatar1` |
149
| `floor` | `avatar1`, `text` |
150
| `fuck` | `text` |
151
| `garfield` | `text`, `avatar1` |
152
| `gay` | `avatar1` |
153
| `godwhy` | `text` |
154
| `goggles` | `avatar1` |
155
| `hitler` | `avatar1` |
156
| `humansgood` | `text` |
157
| `inator` | `text` |
158
| `invert` | `avatar1` |
159
| `ipad` | `avatar1` |
160
| `jail` | `avatar1` |
161
| `justpretending` | `text` |
162
| `keepurdistance` | `text` |
163
| `kimborder` | `avatar1` |
164
| `knowyourlocation` | `text` |
165
| `kowalski` | `text` |
166
| `laid` | `avatar1` |
167
| `letmein` | `text` |
168
| `lick` | `text` |
169
| `madethis` | `avatar1`, `avatar2` |
170
| `magik`<sup>[^1]</sup> | `avatar1` |
171
| `master` | `text` |
172
| `meme` | `avatar1`, `top_text`, `bottom_text`, `color`, `font` |
173
| `note` | `text` |
174
| `nothing` | `text` |
175
| `obama` | `text` |
176
| `ohno` | `text` |
177
| `piccolo` | `text` |
178
| `plan` | `text` |
179
| `presentation` | `text` |
180
| `quote` | `avatar1`, `username1`, `text` |
181
| `radialblur` | `avatar1` |
182
| `rip` | `avatar1` |
183
| `roblox` | `avatar1` |
184
| `salty` | `avatar1` |
185
| `satan` | `avatar1` |
186
| `savehumanity` | `text` |
187
| `screams` | `avatar1`, `avatar2` |
188
| `shit` | `text` |
189
| `sickban` | `avatar1` |
190
| `slap` | `avatar1`, `avatar2` |
191
| `slapsroof` | `text` |
192
| `sneakyfox` | `text` |
193
| `spank` | `avatar1`, `avatar2` |
194
| `stroke` | `text` |
195
| `surprised` | `text` |
196
| `sword` | `text`, `username1` |
197
| `theoffice` | `text` |
198
| `thesearch` | `text` |
199
| `trash` | `avatar1` |
200
| `trigger` | `avatar1` |
201
| `tweet` | `avatar1`, `username1`, `text`, `username2`, `altstyle` |
202
| `ugly` | `avatar1` |
203
| `unpopular` | `avatar1`, `text` |
204
| `violence` | `text` |
205
| `violentsparks` | `text` |
206
| `vr` | `text` |
207
| `walking` | `text` |
208
| `wanted` | `avatar1` |
209
| `warp` | `avatar1` |
210
| `whodidthis` | `avatar1` |
211
| `whothisis` | `avatar1`, `text` |
212
| `yomomma` | *(none, returns JSON instead of an image)* |
213
| `youtube` | `avatar1`, `username1`, `text` |
214
215
[^1]: Currently non-functional - the liquid-rescale effect it depends on needs an ImageMagick build with `liblqr` support, which isn't available in production yet. Returns a 500 Generation Error.