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

# Retexture

> Keep an image's composition and restyle it per the prompt; supports V7 (default) and V6, use Edit for V8.

> [!TIP]
>
> You can also submit through the unified task endpoint `POST /v1/task/submit` with `model` set to `midjourney-retexture` and the parameters inside `input`. Both behave and bill the same.

The response carries a task ID. Fetch the result with [Get Task](https://docs.rixapi.com/docs/en/api-reference/midjourney/task.md), or pass `notify_hook` when submitting. When the task succeeds, `actions` in the result lists what you can do next through [Image Actions](https://docs.rixapi.com/docs/en/api-reference/midjourney/action.md).


## OpenAPI

````yaml en/openapi/midjourney.json POST /midjourney/retexture
openapi: 3.1.0
info:
  title: Midjourney API
  version: 1.0.0
  description: Midjourney
servers:
  - url: https://api.ephone.ai
security:
  - bearerAuth: []
paths:
  /midjourney/retexture:
    post:
      summary: Retexture
      description: >-
        Keep an image's composition and restyle it per the prompt; supports V7
        (default) and V6, use Edit for V8.
      operationId: midjourney_retexture
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                image:
                  type: string
                  description: >-
                    **Image**: The structure reference. An image URL (publicly
                    reachable) or a base64 data URI, up to 20 MB each.
                prompt:
                  type: string
                  maxLength: 6000
                  description: >-
                    **Prompt**: The new style, e.g. `oil painting,
                    impressionist`.
                speed:
                  type: string
                  enum:
                    - relax
                    - fast
                    - turbo
                  default: fast
                  description: >-
                    **Speed**: relax is cheapest but queues longer; turbo is
                    fastest at 2x price. You can also write --relax / --fast /
                    --turbo in the prompt; this field wins. Defaults to fast.
                notify_hook:
                  type: string
                  format: uri
                  description: >-
                    **Notify hook**: when the task ends, the same content as the
                    fetch result is POSTed to this URL (a public http / https
                    URL). Omit it to poll instead.
              required:
                - image
                - prompt
            example:
              image: https://example.com/photo.png
              prompt: oil painting, impressionist --v 7
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
              example:
                task_id: mj-6f1c2b0e9a7d4e2fb1c3d5e7f9a1b2c3
                action: retexture
                status: submitted
                created_at: 1792000000
        '400':
          description: invalid_request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: invalid_request
                  message: index must be between 1 and 4
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: unauthorized
                  message: Invalid API key
        '402':
          description: insufficient_quota
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: insufficient_quota
                  message: Insufficient balance
        '429':
          description: queue_full
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: queue_full
                  message: Queue is full, please try again later
        '500':
          description: upstream_error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: upstream_error
                  message: The service is temporarily unavailable, please retry
components:
  schemas:
    SubmitResponse:
      type: object
      properties:
        task_id:
          type: string
          description: Task ID.
        action:
          type: string
          description: Action name, e.g. `imagine`, `upscale`.
        status:
          type: string
          description: Task status, see the table above.
          enum:
            - submitted
            - in_progress
            - success
            - failure
        created_at:
          type: integer
          description: Created at (Unix seconds).
      required:
        - task_id
        - action
        - status
        - created_at
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Send your API key in the `Authorization: Bearer YOUR_API_KEY` header.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.