DigitalCoding API
Programmatic access to SSL analysis, security scanning, media conversion, and more.
Overview
The DigitalCoding API provides programmatic access to our suite of developer tools. Submit jobs for SSL certificate analysis, security header checks, image conversion, and more through simple REST endpoints.
Free Tier: Every API key includes 500 free credits per month, automatically reset on the 1st of each month. No credit card required.
Authentication
All API requests require authentication using an API key. You can authenticate using either method:
Bearer Token (Recommended)
Authorization: Bearer dc_live_your_api_key_here X-API-Key Header
X-API-Key: dc_live_your_api_key_here Security: Keep your API key secret. Never expose it in client-side code or public repositories. Use environment variables in production.
Base URL
https://api.digitalcoding.com/v1 All endpoints are relative to this base URL.
Endpoints
/api/jobs Submit a new job for processing.
Request Body
{
"toolType": "ssl-metrics",
"options": {
"domain": "example.com"
}
} Response
{
"success": true,
"jobId": "job_abc123def456",
"status": "QUEUED",
"creditsUsed": 1,
"creditsRemaining": {
"free": 499,
"paid": 0
}
} /api/jobs/{jobId} Get the status and results of a job.
Response (Completed)
{
"success": true,
"job": {
"jobId": "job_abc123def456",
"toolType": "ssl-metrics",
"status": "COMPLETED",
"createdAt": "2024-01-15T10:30:00Z",
"completedAt": "2024-01-15T10:30:05Z",
"result": {
"domain": "example.com",
"grade": "A+",
"certificate": { "..." : "..." },
"protocols": [ "..." ]
}
}
} Job Statuses
QUEUED- Job is waiting to be processedPROCESSING- Job is currently runningCOMPLETED- Job finished successfullyFAILED- Job encountered an error
Credit Costs
Each API call consumes credits based on the tool's computational requirements:
| Tool | Credits | Description |
|---|---|---|
ssl-metrics | 1 | SSL certificate analysis |
security-headers | 1 | HTTP security headers check |
favicon-generator | 2 | Generate favicons from image |
file-metadata | 2 | Extract file metadata |
image-converter | 3 | Convert images between formats |
image-recovery | 3 | Recover corrupted image files |
metadata-stripper | 3 | Remove metadata from files |
url-screenshot | 5 | Capture website screenshot |
web-screenshot | 5 | Website screenshot with options |
web-vitals | 5 | Core Web Vitals analysis |
network-analyzer | 5 | Network performance analysis |
prompt-enhancer | 5 | Enhance AI prompts |
audio-converter | 8 | Convert audio files |
humanize-ai | 10 | Rewrite AI text naturally |
video-converter | 15 | Convert video files |
Credit Deduction Order
Free credits are always used first. Paid credits are only consumed after free credits are exhausted. Credits are deducted when a job is submitted, not when it completes.
Rate Limits
API requests are rate-limited to ensure fair usage. Limits are applied per API key:
| Tier | Per Minute | Per Hour | Per Day |
|---|---|---|---|
| Free | 10 requests | 100 requests | 500 requests |
| Starter | 30 requests | 500 requests | 5,000 requests |
| Pro | 100 requests | 2,000 requests | 20,000 requests |
Rate limit headers are included in API responses:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1705312800 Error Handling
The API uses standard HTTP status codes and returns structured error responses:
{
"success": false,
"error": "INSUFFICIENT_CREDITS",
"message": "Not enough credits to process this request",
"details": {
"required": 5,
"available": 2
}
} Common Error Codes
INVALID_API_KEY API key is missing, invalid, or revoked
IP_NOT_WHITELISTED Request IP is not in the API key's whitelist
INSUFFICIENT_CREDITS Not enough credits available for this request
RATE_LIMIT_EXCEEDED Too many requests, please slow down
INVALID_TOOL_TYPE The specified tool type doesn't exist
Code Examples
cURL
# Submit a job
curl -X POST https://api.digitalcoding.com/v1/api/jobs \
-H "Authorization: Bearer dc_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"toolType": "ssl-metrics", "options": {"domain": "example.com"}}'
# Check job status
curl https://api.digitalcoding.com/v1/api/jobs/job_abc123 \
-H "Authorization: Bearer dc_live_your_api_key" Python
import requests
import time
API_KEY = "dc_live_your_api_key"
BASE_URL = "https://api.digitalcoding.com/v1"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
# Submit a job
response = requests.post(
f"{BASE_URL}/api/jobs",
headers=headers,
json={
"toolType": "ssl-metrics",
"options": {"domain": "example.com"}
}
)
job = response.json()
job_id = job["jobId"]
print(f"Job submitted: {job_id}")
# Poll for results
while True:
status_response = requests.get(
f"{BASE_URL}/api/jobs/{job_id}",
headers=headers
)
result = status_response.json()
if result["job"]["status"] == "COMPLETED":
print("Results:", result["job"]["result"])
break
elif result["job"]["status"] == "FAILED":
print("Job failed:", result["job"]["error"])
break
time.sleep(2) # Wait 2 seconds before polling again JavaScript / Node.js
const API_KEY = 'dc_live_your_api_key';
const BASE_URL = 'https://api.digitalcoding.com/v1';
async function analyzeSSL(domain) {
// Submit job
const submitResponse = await fetch(`${BASE_URL}/api/jobs`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
toolType: 'ssl-metrics',
options: { domain }
})
});
const { jobId } = await submitResponse.json();
console.log('Job submitted:', jobId);
// Poll for results
while (true) {
const statusResponse = await fetch(
`${BASE_URL}/api/jobs/${jobId}`,
{ headers: { 'Authorization': `Bearer ${API_KEY}` } }
);
const { job } = await statusResponse.json();
if (job.status === 'COMPLETED') {
return job.result;
} else if (job.status === 'FAILED') {
throw new Error(job.error);
}
await new Promise(resolve => setTimeout(resolve, 2000));
}
}
// Usage
analyzeSSL('example.com')
.then(result => console.log('SSL Grade:', result.grade))
.catch(error => console.error('Error:', error)); Tool Reference
Detailed options for each available tool. Tools that accept files require uploading
first via the tool's web interface to obtain a fileKey.
Domain & URL Analysis
ssl-metrics
1 creditAnalyze SSL/TLS certificates and security configuration.
{
"domain": "example.com" // Required: domain to analyze
} security-headers
1 creditCheck HTTP security headers configuration.
{
"url": "https://example.com" // Required: URL to check
} web-vitals
5 creditsAnalyze Core Web Vitals and performance metrics with Lighthouse.
{
"url": "https://example.com" // Required: URL to analyze
} network-analyzer
5 creditsAnalyze all network requests, performance metrics, and identify broken resources.
{
"url": "https://example.com" // Required: URL to analyze
} Screenshots
url-screenshot
5 creditsCapture a screenshot of any webpage.
{
"url": "https://example.com", // Required: URL to capture
"width": 1280, // Optional: viewport width (default: 1280)
"height": 720, // Optional: viewport height (default: 720)
"fullPage": false // Optional: capture full page scroll
} web-screenshot
5 creditsCapture website screenshots with format and quality options.
{
"url": "https://example.com", // Required: URL to capture
"width": 1440, // Optional: viewport width (default: 1440)
"height": 900, // Optional: viewport height (default: 900)
"format": "png", // Optional: "png" or "jpeg" (default: "png")
"quality": 90, // Optional: JPEG quality 1-100 (default: 90)
"fullPage": false // Optional: capture full page scroll
} Image Processing
image-converter
3 creditsConvert images between formats (JPEG, PNG, WebP, AVIF, HEIC, etc.).
{
"fileKey": "uploads/abc123.png", // Required: S3 key from upload
"outputFormat": "webp", // Required: target format
"quality": 85 // Optional: 1-100 (default: 85)
} image-recovery
3 creditsAttempt to recover corrupted or partially downloaded image files. Supports JPG, PNG, GIF, WebP, BMP, TIFF, HEIC.
{
"fileKey": "uploads/abc123.jpg" // Required: S3 key from upload
} favicon-generator
2 creditsGenerate a complete favicon package from any image (PNG, JPG, SVG, WebP).
{
"fileKey": "uploads/abc123.png" // Required: S3 key from upload
} File Processing
file-metadata
2 creditsExtract comprehensive metadata from any file using ExifTool. Supports images, audio, video, documents, and archives.
{
"fileKey": "uploads/abc123.pdf" // Required: S3 key from upload
// OR
"url": "https://example.com/photo.jpg" // Alternative: URL to analyze
} metadata-stripper
3 creditsRemove EXIF, GPS coordinates, and personal metadata from images, videos, and audio files.
{
"fileKey": "uploads/abc123.jpg" // Required: S3 key from upload
} Media Conversion
audio-converter
8 creditsConvert audio between formats (MP3, AAC, WAV, FLAC, OGG, WMA).
{
"fileKey": "uploads/abc123.wav", // Required: S3 key from upload
"outputFormat": "mp3", // Required: target format
"bitrate": 192 // Optional: kbps (default: 192)
} video-converter
15 creditsConvert videos between formats (MP4, AVI, MOV, WebM, MKV). Max file size: 500 MB.
{
"fileKey": "uploads/abc123.avi", // Required: S3 key from upload
"outputFormat": "mp4", // Required: target format
"quality": "medium" // Optional: "low", "medium", "high"
} AI-Powered
humanize-ai
10 creditsRewrite AI-generated text to sound naturally human-written. Character limits vary by tier (free: 10k, starter: 20k, pro: 100k).
{
"text": "Your AI-generated text here..." // Required: text to humanize
} prompt-enhancer
5 creditsTransform basic prompts into structured, high-precision AI instructions. Character limits vary by tier (free: 5k, starter: 10k, pro: 50k).
{
"text": "Write a blog post about AI", // Required: prompt to enhance
"framework": "expert" // Optional: enhancement framework
} For interactive usage and more details, visit the individual tool pages.
Need Help?
If you have questions or run into issues, we're here to help: