Query Package Quota
curl --request GET \
--url https://api.textin.ai/user/finance/package \
--header 'x-ti-app-id: <api-key>' \
--header 'x-ti-secret-code: <api-key>'import requests
url = "https://api.textin.ai/user/finance/package"
headers = {
"x-ti-app-id": "<api-key>",
"x-ti-secret-code": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-ti-app-id': '<api-key>', 'x-ti-secret-code': '<api-key>'}
};
fetch('https://api.textin.ai/user/finance/package', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.textin.ai/user/finance/package",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-ti-app-id: <api-key>",
"x-ti-secret-code: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.textin.ai/user/finance/package"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-ti-app-id", "<api-key>")
req.Header.Add("x-ti-secret-code", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.textin.ai/user/finance/package")
.header("x-ti-app-id", "<api-key>")
.header("x-ti-secret-code", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.textin.ai/user/finance/package")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-ti-app-id"] = '<api-key>'
request["x-ti-secret-code"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": {
"list": [
{
"id": 294361,
"service_list": [
"docflow"
],
"total_count": 10,
"remain_count": 10,
"use_count": 0,
"create_time": "2026-09-08 18:05:49",
"start_time": "2026-09-08 18:05:49",
"end_time": "2026-09-23 23:59:59"
}
]
}
}Finance API
Query Package Quota
Returns the service packages of the account, including total / remaining / used counts and their validity windows.
The endpoint does not directly return an “expired / exhausted” status — the caller determines it from end_time (earlier than now means expired) and remain_count (0 means exhausted).
GET
/
user
/
finance
/
package
Query Package Quota
curl --request GET \
--url https://api.textin.ai/user/finance/package \
--header 'x-ti-app-id: <api-key>' \
--header 'x-ti-secret-code: <api-key>'import requests
url = "https://api.textin.ai/user/finance/package"
headers = {
"x-ti-app-id": "<api-key>",
"x-ti-secret-code": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-ti-app-id': '<api-key>', 'x-ti-secret-code': '<api-key>'}
};
fetch('https://api.textin.ai/user/finance/package', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.textin.ai/user/finance/package",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-ti-app-id: <api-key>",
"x-ti-secret-code: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.textin.ai/user/finance/package"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-ti-app-id", "<api-key>")
req.Header.Add("x-ti-secret-code", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.textin.ai/user/finance/package")
.header("x-ti-app-id", "<api-key>")
.header("x-ti-secret-code", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.textin.ai/user/finance/package")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-ti-app-id"] = '<api-key>'
request["x-ti-secret-code"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": {
"list": [
{
"id": 294361,
"service_list": [
"docflow"
],
"total_count": 10,
"remain_count": 10,
"use_count": 0,
"create_time": "2026-09-08 18:05:49",
"start_time": "2026-09-08 18:05:49",
"end_time": "2026-09-23 23:59:59"
}
]
}
}Authorizations
Please Sign in to TextIn and navigate to "Console - API Keys" to view x-ti-app-id
Please Sign in to TextIn and navigate to "Console - API Keys" to view x-ti-secret-code
Query Parameters
The service path to query. Missing this parameter returns "Invalid params".
- xParse:
/ai/service/v1/pdf_to_markdown - DocFlow:
/docflow
Example:
"/ai/service/v1/pdf_to_markdown"
Whether to include expired packages.
0(default): only packages currently in effect1: all packages, including expired ones
Available options:
0, 1 Response
200 - application/json
Package list
Status code
- 200: Success
- 40101: x-ti-app-id or x-ti-secret-code is empty
- 40102: x-ti-app-id or x-ti-secret-code is invalid, authentication failed
- 40004: Parameter error, please check the technical documentation and verify the parameters
- 500: Internal server error
Example:
200
Status message
Example:
"success"
Show child attributes
Show child attributes

