Legacy API (v1)

Amaxwebhu e-API

Ukwenza izicelo eziphumeleleyo ze-API, ufuna iakhawunti eqinisekisiweyo cofa apha ukuze ubhalise ukuba awunayo iakhawunti.

Unokwenza isitshixo sakho se-API kwiLizwi lakho kwi-dashboard phantsi kwecandelo laBaphuhlisi.

DOCX kwiifayile

I-DOCX kwiPDF

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'pdf'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.pdf', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'pdf',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'pdf'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'pdf', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "pdf"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.pdf
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "pdf", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"pdf\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.pdf", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"pdf\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: pdf
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

I-DOCX ukuya kwiJPG

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'jpg'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.jpg', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'jpg',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'jpg'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'jpg', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "jpg"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.jpg
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "jpg", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"jpg\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.jpg", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"jpg\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: jpg
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

DOCX ukuya kwiPNG

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'png'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.png', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'png',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'png'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'png', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "png"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.png
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "png", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"png\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.png", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"png\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: png
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

I-DOCX ukuya kwi-XLS

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'xls'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.xls', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'xls',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'xls'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'xls', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "xls"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.xls
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "xls", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"xls\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.xls", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"xls\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: xls
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

I-DOCX ukuya kwi-XLSX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'xlsx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.xlsx', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'xlsx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'xlsx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'xlsx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "xlsx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.xlsx
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "xlsx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"xlsx\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.xlsx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"xlsx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: xlsx
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

I-DOCX ukuya kwi-ICO

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'ico'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.ico', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'ico',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'ico'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'ico', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "ico"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.ico
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "ico", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"ico\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.ico", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"ico\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: ico
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

DOCX ukuya kwi-BMP

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'bmp'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.bmp', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'bmp',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'bmp'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'bmp', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "bmp"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.bmp
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "bmp", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"bmp\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.bmp", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"bmp\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: bmp
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

I-DOCX kwi-SVG

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'svg'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.svg', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'svg',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'svg'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'svg', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "svg"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.svg
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "svg", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"svg\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.svg", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"svg\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: svg
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

I-DOCX kwiWebhu

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'webp'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.webp', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'webp',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'webp'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'webp', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "webp"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.webp
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "webp", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"webp\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.webp", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"webp\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: webp
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

I-DOCX kwi-GIF

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'gif'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.gif', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'gif',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'gif'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'gif', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "gif"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.gif
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "gif", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"gif\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.gif", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"gif\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: gif
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

I-DOCX ukuya kwi-TIFF

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'tiff'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.tiff', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'tiff',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'tiff'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'tiff', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "tiff"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.tiff
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "tiff", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"tiff\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.tiff", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"tiff\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: tiff
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

I-DOCX kwiPSD

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'psd'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.psd', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'psd',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'psd'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'psd', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "psd"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.psd
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "psd", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"psd\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.psd", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"psd\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: psd
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

I-DOCX ukuya kwiJPEG

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'jpeg'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.jpeg', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'jpeg',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'jpeg'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'jpeg', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "jpeg"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.jpeg
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "jpeg", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"jpeg\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.jpeg", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"jpeg\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: jpeg
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

DOCX ukuya kwi-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.docx', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.docx' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.docx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: doc
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

DOC kwiifayile

DOC kwiPDF

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'pdf'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.pdf', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'pdf',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'pdf'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'pdf', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "pdf"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.pdf
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "pdf", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"pdf\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.pdf", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"pdf\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: pdf
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

DOC ukuya kwiJPG

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'jpg'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.jpg', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'jpg',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'jpg'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'jpg', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "jpg"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.jpg
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "jpg", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"jpg\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.jpg", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"jpg\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: jpg
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

DOC ukuya kwiPNG

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'png'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.png', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'png',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'png'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'png', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "png"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.png
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "png", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"png\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.png", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"png\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: png
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

DOC ukuya kwiXLS

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'xls'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.xls', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'xls',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'xls'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'xls', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "xls"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.xls
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "xls", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"xls\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.xls", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"xls\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: xls
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

DOC ukuya kwiXLSX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'xlsx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.xlsx', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'xlsx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'xlsx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'xlsx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "xlsx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.xlsx
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "xlsx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"xlsx\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.xlsx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"xlsx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: xlsx
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

DOC ukuya kwi-ICO

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'ico'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.ico', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'ico',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'ico'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'ico', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "ico"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.ico
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "ico", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"ico\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.ico", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"ico\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: ico
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

DOC ukuya kwi-BMP

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'bmp'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.bmp', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'bmp',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'bmp'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'bmp', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "bmp"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.bmp
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "bmp", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"bmp\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.bmp", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"bmp\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: bmp
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

I-DOC kwi-SVG

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'svg'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.svg', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'svg',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'svg'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'svg', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "svg"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.svg
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "svg", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"svg\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.svg", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"svg\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: svg
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

DOC kwiWebhu

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'webp'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.webp', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'webp',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'webp'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'webp', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "webp"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.webp
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "webp", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"webp\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.webp", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"webp\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: webp
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

DOC kwi-GIF

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'gif'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.gif', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'gif',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'gif'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'gif', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "gif"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.gif
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "gif", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"gif\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.gif", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"gif\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: gif
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

DOC ukuya kwi-TIFF

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'tiff'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.tiff', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'tiff',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'tiff'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'tiff', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "tiff"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.tiff
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "tiff", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"tiff\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.tiff", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"tiff\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: tiff
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

DOC kwiPSD

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'psd'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.psd', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'psd',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'psd'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'psd', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "psd"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.psd
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "psd", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"psd\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.psd", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"psd\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: psd
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

DOC ukuya kwiJPEG

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'jpeg'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.jpeg', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'jpeg',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'jpeg'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'jpeg', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "jpeg"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.jpeg
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "jpeg", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"jpeg\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.jpeg", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"jpeg\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: jpeg
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

DOC ukuya kwi-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.doc', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.doc' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.doc")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: docx
  • Ukufumana ifayile ye-ZIP ungadlula zip: true

Iifayile eziya kwi-DOCX

I-PDF kwi-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.pdf', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.pdf', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.pdf' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.pdf' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.pdf")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.pdf")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: docx
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

IJPG iye kwi-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.jpg', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.jpg', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.jpg' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.jpg' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.jpg")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.jpg")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: docx
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

JPEG ukuya kwi-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.jpeg', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.jpeg', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.jpeg' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.jpeg' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.jpeg")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.jpeg")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: docx
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

I-PNG ukuya kwi-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.png', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.png', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.png' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.png' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.png")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.png")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: docx
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

ICO ukuya kwi-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.ico', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.ico', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.ico' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.ico' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.ico")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.ico")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: docx
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

I-BMP ukuya kwi-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.bmp', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.bmp', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.bmp' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.bmp' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.bmp")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.bmp")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: docx
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

I-SVG ukuya kwi-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.svg', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.svg', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.svg' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.svg' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.svg")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.svg")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: docx
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

IWebhu kwi-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.webp', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.webp', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.webp' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.webp' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.webp")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.webp")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: docx
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

I-GIF kwi-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.gif', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.gif', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.gif' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.gif' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.gif")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.gif")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: gif
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

I-TIFF ukuya kwi-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.tiff', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.tiff', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.tiff' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.tiff' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.tiff")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.tiff")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: tiff
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

I-PSD kwi-DOCX

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.psd', 'rb')}
params = {
    'convert_to': 'docx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.psd', 'rb')}
params = {
    'convert_to': 'docx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'docx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.psd' \
-F 'data={"convert_to": "docx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.docx
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.psd' \
-F 'data={"convert_to": "docx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\"}",
        "file_contents" => curl_file_create("testing.psd")
    );
    $fp = fopen("file.docx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"docx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.psd")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: psd
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

I-PDF kwi-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.pdf', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.pdf', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.pdf' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.pdf' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.pdf")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.pdf")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: doc
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

IJPG ukuya kwi-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.jpg', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.jpg', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.jpg' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.jpg' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.jpg")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.jpg")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: doc
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

JPEG kwi-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.jpeg', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.jpeg', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.jpeg' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.jpeg' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.jpeg")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.jpeg")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: doc
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

PNG ukuya kwi-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.png', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.png', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.png' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.png' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.png")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.png")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: doc
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

ICO ukuya kwi-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.ico', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.ico', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.ico' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.ico' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.ico")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.ico")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: doc
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

I-BMP ukuya kwi-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.bmp', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.bmp', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.bmp' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.bmp' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.bmp")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.bmp")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: doc
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

I-SVG kwi-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.svg', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.svg', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.svg' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.svg' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.svg")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.svg")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: doc
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

IWebhu kwi-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.webp', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.webp', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.webp' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.webp' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.webp")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.webp")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: doc
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

I-GIF kwi-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.gif', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.gif', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.gif' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.gif' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.gif")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.gif")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: doc
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

TIFF ukuya kwi-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.tiff', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.tiff', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.tiff' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.tiff' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.tiff")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.tiff")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: doc
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

I-PSD kwi-DOC

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.psd', 'rb')}
params = {
    'convert_to': 'doc'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.doc', 'wb') as f:
    f.write(r.content)
# Guqula ifayile kwaye ufumane i-ZIP
import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.psd', 'rb')}
params = {
    'convert_to': 'doc',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});
// Guqula ifayile kwaye ufumane i-ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'doc', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.psd' \
-F 'data={"convert_to": "doc"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.doc
// Guqula ifayile kwaye ufumane i-ZIP
curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.psd' \
-F 'data={"convert_to": "doc", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\"}",
        "file_contents" => curl_file_create("testing.psd")
    );
    $fp = fopen("file.doc", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Guqula ifayile kwaye ufumane i-ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"doc\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.psd")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
Ipharamitha Inkcazo
file Kuya kufuneka ulayishe ifayile yeLizwi ofuna ukuyiguqula.
data
  • convert_to: doc
  • Ukufumana ifayile ye-ZIP ungadlula:
    zip: true
  • Ukuguqula usebenzisa i-OCR kufuneka upase::
    ocr: true

Izixhobo ze-API

POST https://word.to/v1/api

Python :

import requests
import json

url = 'https://word.to/v1/api'
files = {'file': open('testing.pdf', 'rb')}
params = {'tool': 'organize'}
data = {
    'data': json.dumps(params)
}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.docx', 'wb') as f:
    f.write(r.content)

CURL :

curl -POST 'https://word.to/v1/api' \
-F 'data=@/testing.pdf' \
-F 'data={"tool": "organize"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.pdf

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://word.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'tool': 'organize', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

PHP :

<?php
    $post_data = array(
        "data" => "{\"tool\": \"organize\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.pdf")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://word.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

Ungasusa iifayile zakho zeempendulo kuso nasiphi na isicelo ngokudlula i-Zip: inyani kulwazi lwedatha.

Ipharamitha Inkcazo
file
data

Le parameter kufuneka iqulethe ulwazi lwezixhobo oza kuzisebenzisa kunye namaphepha ukuze uguqule njenge:

  • zip: true