Welcome to the Semantic Ink API. Convert documents to HTML or create charts from CSV data.
Convert a document file to semantic HTML format.
Send a multipart/form-data request with the following parameters:
file
: The document file to convert (required, formats: PDF, DOCX, ODT)target_format
: Set to "semantic_html" (optional, default: "semantic_html")start_page
: Starting page number (optional, PDF only, default: 1)end_page
: Ending page number (optional, PDF only){
"status": "success",
"result": "HTML content",
"task_id": 123
}
Convert CSV data into chart format.
Send a multipart/form-data request with the following parameters:
file
: The CSV file to convert (required)chart_type
: Type of chart (optional, default: "line")color_scheme
: Color scheme to use (optional, default: "default"){
"labels": ["Column1", "Column2", ...],
"data": [[1, 2, 3], [4, 5, 6], ...],
"chart_type": "line",
"color_scheme": "default"
}
curl -X POST \
-F "file=@data.csv" \
-F "chart_type=bar" \
-F "color_scheme=warm" \
http://your-domain/api/chart
Convert plain text citations into structured formats using various citation styles.
Send a JSON request with the following parameters:
{
"citations": "Citation text here...",
"style": "american-psychological-association",
"format": "text"
}
{
"status": "success",
"citations": "Formatted citations..."
}
curl -X POST \
-H "Content-Type: application/json" \
-d '{"citations": "Author, A. (2023). Title...", "style": "apa", "format": "text"}' \
http://your-domain/api/citations
The API uses standard HTTP status codes:
200
: Success400
: Bad Request (invalid input)404
: Not Found500
: Internal Server ErrorError responses include a JSON object with an error message:
{
"error": "Error description"
}