获取 API KEY
API KEY 可用于开发者调用平台提供的各个 API 接口,包括大模型 API(通义千问、豆包大模型、DeepSeek、文本向量模型等)、文档解析 API(PDF、Word、PPT等)、二维码生成 API...等所有的付费版和免费版接口。
!!!重要提示:请务必妥善保管通过以下方式获取到的 API_KEY,避免外传导致损失。!!!
✅️方式一(推荐),微信扫一扫获取:

✅️方式二,联系客服获取:
联系客服

🔗相关链接:
- API_KEY 余额查询:https://wcode.net/check-balance
- API_KEY 费用充值:https://wcode.net/apikey-recharge
API_KEY 使用方法示例:
API_KEY 通常用于 API 接口鉴权(Authentication),以下以 Bearer 鉴权为例:
Bearer 鉴权是一种基于令牌的身份验证方式,客户端在请求头中通过
Authorization: Bearer <token>
的格式携带令牌,用于访问受保护的资源,服务器通过验证令牌的有效性和权限来决定是否允许访问。Bearer 鉴权广泛应用于 API 接口和微服务中。
示例 1,使用 Python Requests 调用通义千问 Qwen-LLM 系列大模型:
import requests
import json
url = "https://wcode.net/api/gpt/v1/chat/completions"
payload = json.dumps({
"model": "qwen2.5-14b-instruct",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "你好,请介绍一下你自己"
}
]
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY' # <-------- TODO: 替换这里的 API_KEY
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
通义(Qwen)系列模型调用请参考: https://wcode.net/qwen-llm-api
示例 2,使用 Java OkHttp 调用豆包 Doubao-LLM 系列大模型:
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"model\":\"doubao-lite-32k\",\"messages\":[{\"role\":\"system\",\"content\":\"You are a helpful assistant.\"},{\"role\":\"user\",\"content\":\"你好,请介绍一下你自己\"}]}");
Request request = new Request.Builder()
.url("https://wcode.net/api/gpt/v1/chat/completions")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer API_KEY") // <-------- TODO: 替换这里的 API_KEY
.build();
Response response = client.newCall(request).execute();
豆包(Doubao)系列模型调用请参考: https://wcode.net/doubao-llm-api
示例 3,使用 PHP Guzzle 调用 DeepSeek-LLM 系列大模型:
<?php
$client = new Client();
$headers = [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer API_KEY', // <-------- TODO: 替换这里的 API_KEY
];
$body = '{
"model": "deepseek-chat",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "你好,请介绍一下你自己"
}
]
}';
$request = new Request('POST', 'https://wcode.net/api/gpt/v1/chat/completions', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
DeepSeek 系列模型调用请参考: https://wcode.net/deepseek-llm-api