{"openapi":"3.0.2","info":{"title":"recraft/recraftv3","description":"The request body Comfy Router accepts for the model \"recraft/recraftv3\", and the response body it returns. The INPUT schema is the same schema the server validates a call against before it reaches the provider, so what is published and what is enforced cannot differ. `x-comfy-router-input-modalities` records the media kinds the model is documented to accept; the request schema is shared across sibling models and may admit media kinds this model ignores. The OUTPUT schema describes the provider's native result document exactly as Router returns it: Router does not validate, narrow or re-envelope the response, so the output schema is descriptive rather than enforced, and Comfy owns no output shape of its own.","version":"3ff3e2bd6d0b"},"paths":{"/v2/models/recraft/recraftv3":{"post":{"operationId":"runRouterModel","summary":"Run recraft/recraftv3 synchronously.","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"The Recraft image-generation fields, shared by the v1 `POST /proxy/recraft/image_generation` request body and the Comfy Router input schema for the `recraft/*` models. See the note above this component for why the two surfaces share properties but not `required`.\n`required` here is the ROUTER-SAFE floor: `model` is absent from it because Router writes the path's model into the body after routervalidate.Guard has already validated the caller's bytes. The v1 wrapper `RecraftImageGenerationRequest` re-adds it.","example":{"n":1,"prompt":"A single red maple leaf on a plain white background."},"properties":{"controls":{"description":"The controls for the generated image","properties":{"artistic_level":{"description":"Defines artistic tone of your image. At a simple level, the person looks straight at the camera in a static and clean style. Dynamic and eccentric levels introduce movement and creativity.","maximum":5,"minimum":0,"nullable":true,"type":"integer"},"background_color":{"$ref":"#/components/schemas/RGBColor"},"colors":{"description":"An array of preferable colors","items":{"$ref":"#/components/schemas/RGBColor"},"type":"array"},"no_text":{"description":"Do not embed text layouts","type":"boolean"}},"type":"object"},"model":{"description":"The model to use for generation (e.g., \"recraftv3\"). This field is NOT constrained to an enum: the proxy forwards whatever the caller sends. The spellings Comfy ships — the set Comfy Router addresses as `recraft/\u003cmodel\u003e` — are recraftv2, recraftv3, recraftv4, recraftv4_pro, recraftv4_1, recraftv4_1_flash_v2, recraftv4_1_utility, recraftv4_1_pro, recraftv4_1_utility_pro, recraftv4_styles, recraftv4_styles_pro, recraftv4_1_vector, recraftv4_1_utility_vector, recraftv4_1_pro_vector, recraftv4_1_utility_pro_vector, recraftv4_styles_vector and recraftv4_styles_pro_vector. They are written out here rather than named by reference because the RecraftGenerationModel component that declares them is `$ref`-ed by nothing and is therefore pruned from the spec served at GET /openapi, so a pointer to it would dangle in the served document. The four `recraftv4_styles*` spellings additionally require `style_id` — see that field.","nullable":true,"type":"string"},"n":{"description":"The number of images to generate. Recraft accepts 1-6.","maximum":6,"minimum":1,"type":"integer"},"prompt":{"description":"The text prompt describing the image to generate","type":"string"},"response_format":{"$ref":"#/components/schemas/RecraftResponseFormat"},"size":{"description":"The size of the generated image (e.g., \"1024x1024\")","type":"string"},"style":{"description":"The style to apply to the generated image (e.g., \"digital_illustration\")","type":"string"},"style_id":{"description":"The style ID to apply to the generated image (e.g., \"123e4567-e89b-12d3-a456-426614174000\"). If style_id is provided, style should not be provided. REQUIRED by the four `recraftv4_styles*` models: Recraft rejects those without a style_id or style reference. Mint one with `POST /proxy/recraft/styles`, which this same proxy serves under the same credentials. Nothing on this route enforces the pairing — the body is forwarded to Recraft unchanged, so a `recraftv4_styles*` call without it reaches the partner and comes back 4xx.","type":"string"}},"required":["prompt"],"type":"object"}}}},"responses":{"200":{"description":"OK - the model's native JSON output, returned unchanged; the schema describes the provider's terminal result document as Router returns it.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RecraftImageGenerationResponse"}],"description":"Comfy Router output schema for the Recraft generation models: Recraft's own image-generation response, forwarded unchanged. The operation is direct-return (`routerresult/classification.go` classifies `recraft /image_generation` as ReturnModeDirect), so the body a caller receives is this finished document from the one call — there is no task handle and no poll.\nThe generated images are in `data`, each with Recraft's identifier at `data[].image_id` and the image itself at `data[].url` — or, when the request set `response_format: b64_json`, inline at `data[].b64_json` with no `url`. `created` is the generation's Unix timestamp, and `credits` is Recraft's own cost figure for the call — Recraft's number, not the Comfy charge.","example":{"created":1767225600,"credits":1,"data":[{"image_id":"3f7a1b28-5c0d-4e91-8a6f-1b2c3d4e5f60","url":"https://example.invalid/recraft/recraftv3/generated.png"}]}}}}}}}}},"components":{"schemas":{"RGBColor":{"description":"RGB color values","example":{"rgb":[255,0,0]},"properties":{"rgb":{"items":{"maximum":255,"minimum":0,"type":"integer"},"maxItems":3,"minItems":3,"type":"array"}},"required":["rgb"],"type":"object"},"RecraftImageGenerationResponse":{"description":"Response from the Recraft image generation API.","properties":{"created":{"description":"Unix timestamp when the generation was created","type":"integer"},"credits":{"description":"Number of credits used for the generation","type":"integer"},"data":{"description":"Array of generated image information","items":{"properties":{"b64_json":{"description":"Base64-encoded image data (present instead of `url` when the request set `response_format: b64_json`)","type":"string"},"image_id":{"description":"Unique identifier for the generated image","type":"string"},"url":{"description":"URL to access the generated image (present when `response_format` is `url`, the default)","type":"string"}},"type":"object"},"type":"array"},"style_id":{"description":"The resolved style id, returned by Recraft when style references are used (notably required-input models recraftv4_styles*); reusable as `style_id` in later requests.","type":"string"}},"required":["created","credits","data"],"type":"object"},"RecraftResponseFormat":{"enum":["url","b64_json"],"type":"string"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"x-comfy-router-model-id":"recraft/recraftv3","x-comfy-input-schema-authored":true,"x-comfy-output-schema-authored":true,"x-comfy-router-input-modalities":["text"],"x-comfy-router-output-modalities":["image"]}
