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

# convertImage

> Queues a new conversion job for the uploaded original, with a preset or with parameters, and returns it. Read the job with `imageConversionJob` until it's completed or failed.



**mutation** `convertImage(input: ConvertImageInput!): ConvertImagePayload!`

## Arguments

**`input`**: `ConvertImageInput!` (required)

## Returns

`ConvertImagePayload!`

**`conversionJob`**: `ConversionJob`

---

**`errors`**: `[ConvertImageError!]`

## Examples

```graphql Mutation
mutation ConvertImage($input: ConvertImageInput!) {
  convertImage(input: $input) {
    conversionJob {
      error
      id
      position
      queuedAt
      result {
        contentType
        expiresAt
        filename
        size
        url
      }
      status
    }
    errors {
      __typename
      ... on GraphQlError {
        code
        details {
          __typename
        }
        message
      }
    }
  }
}
```

```json Variables
{
  "input": {
    "conversionId": "value",
    "options": {}
  }
}
```

```json Response
{
  "data": {
    "convertImage": {
      "conversionJob": {
        "error": "string",
        "id": "value",
        "position": 1,
        "queuedAt": "value",
        "result": {
          "contentType": "string",
          "expiresAt": "value",
          "filename": "string",
          "size": "value",
          "url": "string"
        },
        "status": "QUEUED"
      },
      "errors": [
        {
          "__typename": "GraphQlError",
          "code": "string",
          "details": [
            {
              "__typename": "KeyValuePairOfStringAndString"
            }
          ],
          "message": "string"
        }
      ]
    }
  }
}
```


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