> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mountsea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Image

> Standalone Suno image generation from a text prompt

Submit a standalone image generation job. Poll [Get Task Status](/api-reference/suno/task) until `success`.

## Credits

| `image_gen_category` | Cost                                                                            |
| -------------------- | ------------------------------------------------------------------------------- |
| `basic`              | 0 credits per image                                                             |
| `advanced`           | Per policy (`conf_task_policy[image_generate].cost`, e.g. 20 credits per image) |

Total cost = **credits per image × quantity**. Quantity is fixed at **2** internally and is not exposed in the API.

## Result

When the task completes, `result` includes a batch with two items:

```json theme={null}
{
  "taskId": "f45b6bd0-...",
  "result": {
    "batch_id": "xxx",
    "items": [
      { "status": "complete", "image_url": "https://..." },
      { "status": "complete", "image_url": "https://..." }
    ]
  }
}
```

<Info>
  The service polls the Suno batch internally until items are `complete`, so the task result already contains `image_url` values.
</Info>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.mountsea.ai/suno/v2/image/generate \
    -H "Authorization: Bearer your-api-key" \
    -H "Content-Type: application/json" \
    -d '{
      "prompt": "a futuristic city at sunset",
      "image_gen_category": "advanced"
    }'
  ```

  ```bash Poll theme={null}
  curl "https://api.mountsea.ai/suno/v2/status?taskId=YOUR_TASK_ID" \
    -H "Authorization: Bearer your-api-key"
  ```
</CodeGroup>


## OpenAPI

````yaml POST /suno/v2/image/generate
openapi: 3.0.0
info:
  title: Suno AI
  description: API documentation for Suno AI
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.mountsea.ai
    description: API Gateway
security: []
tags:
  - name: suno
    description: ''
  - name: suno/studio
    description: Studio Song Editor（与 audio/crop|fade|reverse 独立）
paths:
  /suno/v2/image/generate:
    post:
      tags:
        - suno
      summary: generate standalone image
      description: |-
        Submit an image generation task. Returns taskId to poll via /status.
        Credit deduction is parameter-based:
          - image_gen_category=basic  → 0 credits/image
          - image_gen_category=advanced → 20 credits/image
        Total cost = credits_per_image × quantity.
      operationId: ApiPublicController_generateImage
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateImageDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskIdDto'
      security:
        - bearerAuth: []
components:
  schemas:
    GenerateImageDto:
      type: object
      properties:
        prompt:
          type: string
          description: 图片生成提示词
        image_gen_category:
          enum:
            - basic
            - advanced
          type: string
          description: basic = 0 积分；advanced = 按 conf_task_policy[image_generate].cost 扣减
          default: basic
      required:
        - prompt
        - image_gen_category
    TaskIdDto:
      type: object
      properties:
        taskId:
          type: string
          description: task id. Use this id to query task status.
          example: 15c257ff-43f7-4678-bd41-202ad6b8488b
      required:
        - taskId
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````