接口列表
大约 4 分钟
/auth/preauth
1. - 接口描述: 获取登录预授权,具体见:https://zhile.io/2023/05/19/how-to-get-chatgpt-access-token-via-pkce.html
- HTTP方法:
GET
- 频率控制: 无
注意
因为现在用苹果批量登录会封设备,甚至封号,此接口已废弃,不再提供支持
/auth/login
2. - 接口描述: 使用账号信息登录,获取供 ChatGPT 使用的
Access Token
等信息 - HTTP方法:
POST
- 请求类型:
application/x-www-form-urlencoded
- 请求字段:
username
:ChatGPT
账号password
:ChatGPT
密码mfa_code
:开启二次验证,需要提供否则不需要
- 返回字段: 返回
Access Token
和Session Token
等信息 - 频率控制: 根据IP地址
6/1m
限制,被限制时返回429
错误码 - 特别说明: 可直接调用,无需先调用获取登录预授权接口也无需支持国家的梯子
Curl
curl --location 'https://ai.fakeopen.com/auth/login' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'username=' \
--data-urlencode 'password='
javascript
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
var urlencoded = new URLSearchParams();
urlencoded.append("username", "");
urlencoded.append("password", "");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: urlencoded,
redirect: 'follow'
};
fetch("https://ai.fakeopen.com/auth/login", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
nodejs
const axios = require('axios');
const qs = require('qs');
let data = qs.stringify({
'username': '',
'password': ''
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://ai.fakeopen.com/auth/login',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Python
import requests
url = "https://ai.fakeopen.com/auth/login"
payload = 'username=&password='
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
/auth/refresh
3. - 接口描述: 使用
Refresh Token
获取供 ChatGPT 使用的Access Token
等信息 - HTTP方法:
POST
- 请求类型:
application/x-www-form-urlencoded
- 请求字段:
refresh_token
:ChatGPT
的Refresh Token
- 返回字段: 返回
Access Token
等信息 - 频率控制: 无
Curl
curl --location 'https://ai.fakeopen.com/auth/refresh' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'refresh_token='
javascript
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
var urlencoded = new URLSearchParams();
urlencoded.append("refresh_token", "");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: urlencoded,
redirect: 'follow'
};
fetch("https://ai.fakeopen.com/auth/refresh", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
nodejs
const axios = require('axios');
const qs = require('qs');
let data = qs.stringify({
'refresh_token': ''
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://ai.fakeopen.com/auth/refresh',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Python
import requests
url = "https://ai.fakeopen.com/auth/refresh"
payload = 'refresh_token='
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
/auth/platform/login
4. - 接口描述: 使用账号信息登录,获取供 Platform 使用的
Access Token
等信息,用做获取用度、账单等信息 - HTTP方法:
POST
- 请求类型:
application/x-www-form-urlencoded
- 请求字段:
username
:ChatGPT
账号password
:ChatGPT
密码mfa_code
:开启二次验证,需要提供否则不需要
- 返回字段: 返回
Access Token
和Refresh Token
等信息 - 频率控制: 根据IP地址
6/1m
限制,被限制时返回429
错误码
Curl
curl --location 'https://ai.fakeopen.com/auth/platform/login' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'username=' \
--data-urlencode 'password='
javascript
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
var urlencoded = new URLSearchParams();
urlencoded.append("username", "");
urlencoded.append("password", "");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: urlencoded,
redirect: 'follow'
};
fetch("https://ai.fakeopen.com/auth/platform/login", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
nodejs
const axios = require('axios');
const qs = require('qs');
let data = qs.stringify({
'username': '',
'password': ''
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://ai.fakeopen.com/auth/platform/login',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Python
import requests
url = "https://ai.fakeopen.com/auth/platform/login"
payload = 'username=&password='
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
/auth/platform/refresh
5. - 接口描述: 使用
Refresh Token
获取供 Platform 使用的Access Token
等信息,用做获取用度、账单等信息 - HTTP方法:
POST
- 请求类型:
application/x-www-form-urlencoded
- 请求字段:
refresh_token
:Platform
的Refresh Token
- 返回字段: 返回
Access Token
等信息 - 频率控制: 无
Curl
curl --location 'https://ai.fakeopen.com/auth/platform/refresh' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'refresh_token='
javascript
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
var urlencoded = new URLSearchParams();
urlencoded.append("refresh_token", "");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: urlencoded,
redirect: 'follow'
};
fetch("https://ai.fakeopen.com/auth/platform/refresh", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
nodejs
const axios = require('axios');
const qs = require('qs');
let data = qs.stringify({
'refresh_token': ''
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://ai.fakeopen.com/auth/platform/refresh',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Python
import requests
url = "https://ai.fakeopen.com/auth/platform/refresh"
payload = 'refresh_token='
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
/auth/session
6. - 接口描述: 使用
Session Token
获取供 ChatGPT 使用的Access Token
等信息 - HTTP方法:
POST
- 请求类型:
application/x-www-form-urlencoded
- 请求字段:
session_token
:ChatGPT
的Session Token
- 返回字段: 返回
Access Token
等信息 - 频率控制: 无
- 特别说明:
Session Token
有效期为3
个月
Curl
curl --location 'https://ai.fakeopen.com/auth/session' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'session_token='
javascript
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
var urlencoded = new URLSearchParams();
urlencoded.append("session_token", "");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: urlencoded,
redirect: 'follow'
};
fetch("https://ai.fakeopen.com/auth/session", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
nodejs
const axios = require('axios');
const qs = require('qs');
let data = qs.stringify({
'session_token': ''
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://ai.fakeopen.com/auth/session',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Python
import requests
url = "https://ai.fakeopen.com/auth/session"
payload = 'session_token='
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)