xuan
Published on 2024-11-25 / 57 Visits
0

Overview of API Interface

1. Request structure

1.1 Service address

https://txapi-usa.lbai.ai

1.2 Communication protocols

All interfaces of the API communicate via HTTPS, providing a highly secure communication channel.

1.3 Method of request

  • POST

  • GET

The type of Content-Type supported by the POST request:

  • application/json(recommended)

  • multipart/form-data(supported on some interfaces only)

The request packet size for GET requests must not exceed 32 KB. 100 MB for POST requests.

2. Character encoding

All use UTF-8 encoding.

3. Public parameters

Public parameters need to be standardized in the HTTP Header request header

Parameter name

Typology

Merchant Interface Required

The user interface must

Description

Authorization

String

Yes

Yes

HTTP Standard Authentication header field. all API requests should include your API key in the authorization HTTP header.Authorization: Bearer XIAOMEI_TOKEN.

Example:

Bearer user-xxxxxxxxxxxxxxxxxxxxx (user token )

Bearer cpn-xxxxxxxxxxxxxxxxxxxxx (corporate token, contact customer service to get it)

Language

String

No

No

Controls the AI to return the specified language.

4. Choice of language

Select the language in which the AI returns. The default is Chinese.

Language

Language code

Chinese

zh-CN

English

en-US

Arabic

ar

Azerbaijani

az

Bulgarian

bg

Bosnian

bs-BA

Czech

cs

Ukrainian

uk

Irish

ie

Nepali

np

Welsh

cy

Danish

da

German

de

Byelorussian

be

Greek

el

Spanish

es

Estonian

et

Basque

eu

Farsi

fa

Finnish

fi

Faroese

fo

French

fr

Galician

gl

Gujarati

gu

Hebrew

he

Hindi

hi

Croatian

hr

Hungarian

hu

Armenian

hy

Indonesian

id

Icelandic

is

Italian

it

Japenese

ja

Georgian

ka

Kazakh

kk

Kanarese

kn

Korean

ko

Konkani

kok

Kyrgyz

ky

Lithuanian

lt

latvian

lv

Maori

mi

Macedonian

mk

Mongolian

mn

Marathi

mr

Malay

ms

Maltese

mt

Norwegian

nb

Dutch

nl

Northern Sotho

ns

Punjabi

pa

Polish

pl

Portuguese

pt

Quechua

qu

Romanian

ro

Russian

ru

Sanskrit

sa

North Samos

se

Slovak

sk

Slovenian

sl

Albanian

sq

Serbian

sr-BA

Swedish

sv

Swahili

sw

Syriac

syr

Tamil

ta

Telugu

te

Thai

th

Tagalog

tl

tswana

tn

Turkish

tr

Zonga

ts

Tatar

tt

Ukrainian

uk

Urdu

ur

Uzbek

uz

Vietnamese

vi

Bantu

xh

Zulu

zu

Korean

kr

afrikaans

af

5. Error code

Error code

Description

9000

The balance is insufficient.

9002

Input content or file content is too long

9003

system anomaly

9004

Content non-compliance

9005

File not legal/file not parsed

4003

Unauthorized(request header Authorization is invalid)

9527

Invalid token

7041

Account does not exist

7040

Missing parameters

7042

Data not available

7043

Request Failed

7044

Data already exists