接口大厅/二维码生成
返回接口大厅
09 API Endpoint GET

二维码生成

正常

可以将文字或链接转成二维码

Status
正常
Total Calls
197
Created
2025-07-12
Updated
2026-06-25
Response
IMAGE
01

Request Info

请求信息
Endpoint GET http://cyapi.top/API/qrcode.php
Example http://cyapi.top/API/qrcode.php?text=欢迎使用迟言API&size=250
02

Parameters

2 params
Name Type Required Description
text string 内容
size string 大小
03

Status Codes

状态码
Code Meaning
200请求成功
403无权限或密钥无效
404接口不存在或参数错误
429请求过于频繁,已达限额
500服务器内部错误
04

Online Test

在线测试
请求参数
Response Format: IMAGE
响应结果
output
点击「立即测试」查看接口返回结果
05

Code Examples

调用示例
<?php
$url = 'http://cyapi.top/API/qrcode.php?text=' . urlencode($params['text']) . '&size=' . urlencode($params['size'])';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
import requests

url = 'http://cyapi.top/API/qrcode.php'
params = {
    'text': 'YOUR_VALUE',
    'size': 'YOUR_VALUE'
}

response = requests.get(url, params=params)
print(response.text)
const url = new URL('http://cyapi.top/API/qrcode.php');
const params = new URLSearchParams();
params.append('text', 'YOUR_VALUE');
params.append('size', 'YOUR_VALUE');
url.search = params.toString();

fetch(url)
  .then(res => res.text())
  .then(data => console.log(data));