Specifications
- Input
- text, images, documents
- Output
- text, images
import OpenAI from 'openai';
const openai = new OpenAI({
apiKey: '<your bothub access token>',
baseURL: 'https://openai.bothub.chat/v1'
});
// Sync - Text generation
async function main() {
const chatCompletion = await openai.chat.completions.create({
messages: [{ role: 'user', content: 'Say this is a test' }],
model: 'recraft',
});
}
// Async - Text generation
async function main() {
const stream = await openai.chat.completions.create({
messages: [{ role: 'user', content: 'Say this is a test' }],
model: 'recraft',
stream: true
});
for await (const chunk of stream) {
const part: string | null = chunk.choices[0].delta?.content ?? null;
}
}
main();
How it works Recraft?
Frequently asked questions about Recraft
You can use generated results for commercial purposes. You own all rights to the content you create. The only restriction: make sure your prompt does not include copyrighted third-party material. You are responsible for respecting the rights to any input data.
Recraft creates images from text descriptions and uploaded samples, edits them, and can output results in vector format. It is most often used for icons, illustrations, logos, mockups, and advertising graphics where a consistent style and neat typography are important. Through BotHub, the model is accessible from Russia and can be paid for with Russian cards.
Recraft produces raster images in common aspect ratios, and for logos, icons, and printing, the vector output format is convenient. The size is set during generation, and the image can be upscaled if necessary. The finished file is suitable for both the web and further work in layouts.
No, Recraft does not have a separate reasoning step: it does not show its thought process but immediately assembles the image based on the description. If the scene is complex, a detailed, structured prompt helps — including the composition of objects, their placement, style, and details.
In our data, function calling and structured JSON output are not noted for Recraft. It works as a generative image model: the input is a text description, document, or image, and the result is an image, not a response for calling tools.
Images and documents — yes, they are accepted as input: you can get similar images based on a sample and edit existing ones. Audio and video are not supported; for such tasks, other models in the BotHub catalog are suitable.
We do not have data on which language is best for formulating descriptions for this model, so we cannot promise confident understanding of Russian. Test it with your task: start with a short, simple description and gradually refine the style, composition, and details.