Back to Primitives
2 actions · from $0.004 / image
Image generation
NaiveTool
Generate an image from a prompt, or change one you already have. Billed per image.
Part of AI models
Actions
Every action: POST /v1/tools/runs { "tool": "<name>", "input": { … } }
- Image generation
Generate image
image.generate
An image from a prompt.
Parameters Parameter Description promptstring · requiredDescribe the image you want: subject, setting, style, light. aspect"1:1" | "4:5" | "16:9" | "9:16"Shape of the image: square, portrait, wide or tall. characterstringDraw a character you trained (its chr_ id or name), so the face stays the same across images. character_strengthnumber0.5-1: how strictly the character's face is held. Only with character. Example response
{ "object": "image", "prompt": "a ceramic mug on a walnut desk, morning light", "aspect": "1:1", "url": "https://files.usenaive.ai/img_01JDX7.png", "width": 2048, "height": 2048 }$0.004 / image - Image generation
Edit image
image.edit
Change an image from a prompt.
Parameters Parameter Description imagestring · requiredLink to the image to change (https), or the file id (fil_…) of an image you made. promptstring · requiredWhat to change, in plain words. Example response
{ "object": "image", "url": "https://files.usenaive.ai/img_01JDX9.png" }$0.04 / image
Pricing
from $0.004 / image
Billed per call to one prepaid balance. No vendor accounts, no subscription.
Code
import { createNaive } from "@usenaive-sdk/naive"; const naive = createNaive(); // reads NAIVE_API_KEYconst run = await naive.tools.run("image.generate", {"prompt":"a ceramic mug on a walnut desk, morning light","aspect":"1:1"}, { wait: true });console.log(run.output);
Related tools
- Naive
Text or image to video with sound, 5–15 s.
1 action$0.05per second - Naive
Text to speech, dialogue, voice changer and voice isolation.
5 actionsfrom $0.002per second - Naive
Instrumental tracks and sound effects.
1 action$0.0025per second