Image API
Text-to-image generation with style presets from photorealism to 3D glass, plus 4K upscaling and mask-based edits. Images are returned as signed URLs valid for 24 hours.
Generate images
POST
/v1/images/generationsGeneration is synchronous for single images (typically 2–4 seconds) and asynchronous for batches — batch requests return a job you can poll or subscribe to via webhooks.
curl https://api.tapotik.ai/v1/images/generations \
-H "Authorization: Bearer $TAPOTIK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "tapotik-image-3",
"prompt": "Isometric glass workstation floating in deep navy space, soft violet rim light",
"size": "1536x1024",
"style": "render_3d",
"n": 1
}'const result = await client.images.generate({
model: "tapotik-image-3",
prompt:
"Isometric glass workstation floating in deep navy space, soft violet rim light",
size: "1536x1024",
style: "render_3d",
n: 1,
});
console.log(result.data[0].url); // signed URL, 24h TTL
console.log(result.data[0].revised_prompt); // prompt after safety/quality rewriteRequest parameters
| Parameter | Type | Description |
|---|---|---|
model | string · required | tapotik-image-3 (flagship) or tapotik-image-3-fast. |
prompt | string · required | Description of the image, up to 4,000 characters. |
size | string · default 1024x1024 | 1024x1024, 1536x1024, 1024x1536 or 2048x2048. |
style | string | Style preset — see the table below. Omit for the model default. |
n | integer · 1–8 · default 1 | Number of variations. n > 1 runs as an async batch job. |
negative_prompt | string | Elements to avoid, e.g. "text, watermark, extra fingers". |
seed | integer | Fix the seed for reproducible generations. |
Style presets
| Preset | Look |
|---|---|
photoreal | Natural light photography, accurate skin and materials. |
render_3d | Glossy 3D renders — glass, chrome, soft studio lighting. |
illustration | Editorial flat illustration with bold shapes. |
anime | Clean line art with cel shading. |
pixel | Retro pixel art, fixed 1:1 grid. |
Upscaling
POST
/v1/images/upscaleUpscale any generated image to 4K. Pass the image_id from a previous generation — source files never need to be re-uploaded.
const upscaled = await client.images.upscale({
image_id: "img_9f3b2c",
factor: 4, // 2 or 4
});Credits
A standard 1024×1024 image costs 1 credit; 2048x2048 and 4× upscales cost 3 credits. Failed generations are never billed, and safety-filtered prompts return 422 content_policy_violation without consuming credits.
Generated images are yours: every plan grants full commercial usage rights to outputs, per our Terms of Service.