Skip to content
Docs menu

List supported conversions

Every supported pair of input and output format with its minimum credits. No API key needed.

GEThttps://api.switchfile.io/v2/convert/formats

No API key needed.

Example

curl -g "https://api.switchfile.io/v2/convert/formats?filter[input_format]=docx"

Parameters

Query parameters

  • filter[input_format]string

    Only pairs with this input format

    example: docx

  • filter[output_format]string

    Only pairs with this output format

  • filter[engine]string

    Only pairs with this engine value (internal identifier, may change)

  • includestring

    options: add the options of each pair (name, type, default, description)

Responses

  • 200OK
    • dataobject[]required
    • data[].creditsstring (integer) | integerrequired

      Minimum credits per file

    • data[].enginestringrequired

      Internal identifier, may change. Do not rely on its value

    • data[].input_formatstringrequired
    • data[].metaobjectrequired
    • data[].meta.groupstringrequired

      Group of the output format as in CloudConvert: audio, video, image, document, spreadsheet, presentation, vector, ebook, archive, font or cad

    • data[].operationstringrequired

      one of "convert"

    • data[].optionsFormatOption[]

      Only with include=options

    • data[].options[].defaultstring | number | booleanrequired
    • data[].options[].descriptionstringrequired
    • data[].options[].namestringrequired
    • data[].options[].possible_valuesstring[]

      Only for type enum

    • data[].options[].typestringrequired

      one of "string", "integer", "float", "boolean", "enum"

    • data[].output_formatstringrequired
    200 application/json
    {
      "data": [
        {
          "operation": "convert",
          "input_format": "docx",
          "output_format": "pdf",
          "engine": "office",
          "credits": 1,
          "meta": {
            "group": "document"
          }
        },
        {
          "operation": "convert",
          "input_format": "docx",
          "output_format": "png",
          "engine": "chain",
          "credits": 1,
          "meta": {
            "group": "image"
          }
        }
      ]
    }
  • 422Invalid data. errors names the fields
    422 application/json
    {
      "message": "id: Expected string to match 'uuid' format",
      "code": "INVALID_DATA",
      "errors": {
        "id": [
          "Expected string to match 'uuid' format"
        ]
      }
    }
  • 429Too many requests or a daily quota is used up. See Retry-After
    429 application/json
    {
      "message": "Too many requests. Try again in 12 seconds.",
      "code": "RATE_LIMIT_EXCEEDED"
    }

Error bodies and codes are explained in Errors.