页面简介
Generate raster images and editable SVG vectors with the Recraft API, then edit, vectorize, and upscale them. OpenAI-compatible, from $0.007 per image.
正文摘录
The Recraft API is a REST API for generating and editing images with Recraft’s own models. It returns raster images and editable SVG vectors, and it also vectorizes, upscales, and removes backgrounds. It works with any HTTP client or the OpenAI Python library, and you pay per image from $0.007, with no subscription. Building with an AI agent? Give Claude, Cursor, or ChatGPT this one link. It has every model, parameter, and a working request:https://www.recraft.ai/docs/api-reference/agents.md Using Claude Code? Install the Recraft skill once and ask for what you need. Your first image Create a token in API tokens and set it once per terminal session: export RECRAFT_API_TOKEN=your_token Then send a prompt: cURLPythonPython (OpenAI SDK)JavaScriptcurl https://external.api.recraft.ai/v1/images/generations \ -H "Authorization: Bearer $RECRAFT_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{"prompt": "a red fox in a snowy forest, flat vector", "model": "recraftv4_1_vector"}' You get a link to an SVG file, valid for about 24 hours: { "created": 1759140000, "credits": 80, "data": [{ "image_id": "0e6a1b8c-5b1f-4a8e-9f3a-2c7d4e8b9a10", "url": "https://..." }] } New to the API? The Quickstart walks through each step. Models V4.1 Flash V2About 1.1 s and $0.007 per image, quality close to V4.1.RasterFastestV4.1The default. Photorealism, illustration, and strong short prompts. From $0.035.RasterVectorStylesV4 StylesMatch any style from 1 to 10 reference images. From $0.035.RasterVectorStyle matchV4Design taste and production-grade vectors. From $0.04.RasterVectorStylesV3Previous generation: curated styles, negative prompts, and text layout, and the only line with inpainting, outpainting, and background operations. From $0.04.InpaintOutpaintText layoutV2The cheapest vector option, for icons and simple illustration. From $0.022.RasterVectorIcons Not sure which to pick? Compare them in All models. What else you can do EditImage to image, inpaint, outpaint, and erase region.BackgroundRemove, replace, or generate a background.VectorizePNG, JPG or WEBP to SVG from $0.01, or $0.04 with Vectorizer Pro.UpscaleCrisp or creative upscale, and enhance details.StylesSave your brand look once, reuse it in every request.Enhance promptExpand a short prompt into a detailed one. Reference Endpoints: every operation with its parameters. Pricing and Limits and sizes: prices, sizes, prompt limits, and rate limits. Clients and SDKs: plain HTTP or the OpenAI Python library. Use with AI tools: llms.txt, Markdown pages, and the Claude Code skill.