ConvertaCoal
File conversion API supporting CSV, Excel, HTML, PDF, and JSON. Upload a file, specify the output format, and download the converted result — all programmatically via a single endpoint.
Base URL
https://coals.ai/api/v1/convertacoal
Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /convert | Upload and convert a file to the specified output format |
| GET | /download/{id} | Download a previously converted file by its ID |
| GET | /formats | List all supported input and output format combinations |
| GET | /logs | Retrieve paginated conversion history for your account |
| GET | /account | View plan details, quota usage, and account limits |
Required Scopes
Your API key must include the appropriate scope for each operation. Scopes are configured when creating an API key.
convertacoal:convert
Required for POST /convert
convertacoal:read
Required for GET endpoints
Quick Example
Convert a CSV file to Excel with a single request:
curl -X POST https://coals.ai/api/v1/convertacoal/convert \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@data.csv" \ -F "output_format=xlsx"
// Using Guzzle $response = $client->post('https://coals.ai/api/v1/convertacoal/convert', [ 'headers' => ['Authorization' => 'Bearer YOUR_API_KEY'], 'multipart' => [ ['name' => 'file', 'contents' => fopen('data.csv', 'r')], ['name' => 'output_format', 'contents' => 'xlsx'], ] ]); $data = json_decode($response->getBody(), true);
# Using requests import requests response = requests.post( "https://coals.ai/api/v1/convertacoal/convert", headers={"Authorization": "Bearer YOUR_API_KEY"}, files={"file": open("data.csv", "rb"), "output_format": (None, "xlsx")} ) data = response.json()
# Using net/http require "net/http" require "json" uri = URI("https://coals.ai/api/v1/convertacoal/convert") req = Net::HTTP::Post.new(uri) req["Authorization"] = "Bearer YOUR_API_KEY" res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) } data = JSON.parse(res.body)
// Using fetch (Node 18+) const response = await fetch("https://coals.ai/api/v1/convertacoal/convert", { method: "POST", headers: { "Authorization": "Bearer YOUR_API_KEY" } }); const data = await response.json();