---
title: "AI Icon generation"
method: POST
path: "/v1/ai/text-to-icon"
tags: ["Text to icon"]
---

# AI Icon generation

`POST /v1/ai/text-to-icon`

## Request

- Base URL: `https://api.magnific.com`
- URL: `https://api.magnific.com/v1/ai/text-to-icon`
- Auth: API key in header `x-magnific-api-key`

Create stunning icons in different styles and formats (png, svg) from text prompts using our advanced AI models.

## Request body

- TextToIconRequest
  - `prompt` string, required: The prompt to generate the icon
  - `webhook_url` string, uri, required: The webhook URL to receive the result
  - `style` 'solid' | 'outline' | 'color' | 'flat' | 'sticker': The style to use for the icon
  - `num_inference_steps` integer: The number of inference steps to use for the generation
  - `guidance_scale` number: The guidance scale to use for the generation

## Response `200`

Success - The request has succeeded and the Text to Icon process has started.

- GetStyleTransferTaskStatus200Response
  - `data` TaskDetail, required
    - `task_id` string, uuid, required: Task identifier
    - `status` 'CREATED' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED', required: Task status
    - `generated` string[], required

## Other responses

- `400`: Bad Request - The server could not understand the request due to invalid syntax.
- `401`: Unauthorized - The client must authenticate itself to get the requested response.
- `500`: Internal Server Error - The server has encountered a situation it doesn't know how to handle.
- `503`: Service Unavailable

---

[API](https://skmtc.dev/magnific/apis/magnific-api.md) · [All operations](https://skmtc.dev/magnific/apis/magnific-api/llms.txt) · [OpenAPI document](https://skmtc.dev/magnific/apis/magnific-api/revisions/60711fb082c7?raw)
