GET /v1/tools/barcodehttps://api.cludz.net/v1/tools/barcode
Generate a barcode image (PNG).
Query Parameters:
| Parameter | Required | Description | Type |
|---|---|---|---|
text | Yes | The text to encode. | string |
type | No | Barcode type (e.g., code128, ean13). Defaults to code128. | string |
show_text | No | Set to true to include the human-readable text below the barcode. | boolean |
scale | No | Scaling factor. Defaults to 3. | number |
height | No | Bar height in millimeters. Defaults to 10. | number |
curl "https://api.cludz.net/v1/tools/barcode?text=123456789&show_text=true" \
-H "Authorization: Bearer YOUR_API_KEY" \
--output barcode.png
const res = await fetch('https://api.cludz.net/v1/tools/barcode?text=123456789&show_text=true', {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
const blob = await res.blob();
const res = await fetch('https://api.cludz.net/v1/tools/barcode?text=123456789&show_text=true', {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
const blob = await res.blob();
import requests
url = "https://api.cludz.net/v1/tools/barcode"
params = {"text": "123456789", "show_text": "true"}
headers = {"Authorization": "Bearer YOUR_API_KEY"}
response = requests.get(url, headers=headers, params=params)
with open("barcode.png", "wb") as f:
f.write(response.content)
Returns a image/png file directly.