swagger.yaml 175 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296
  1. definitions:
  2. adaptor.ConfigTemplate:
  3. properties:
  4. description:
  5. type: string
  6. example: {}
  7. name:
  8. type: string
  9. required:
  10. type: boolean
  11. type:
  12. $ref: '#/definitions/adaptor.ConfigType'
  13. type: object
  14. adaptor.ConfigTemplates:
  15. additionalProperties:
  16. $ref: '#/definitions/adaptor.ConfigTemplate'
  17. type: object
  18. adaptor.ConfigType:
  19. enum:
  20. - string
  21. - number
  22. - bool
  23. - object
  24. type: string
  25. x-enum-varnames:
  26. - ConfigTypeString
  27. - ConfigTypeNumber
  28. - ConfigTypeBool
  29. - ConfigTypeObject
  30. adaptors.AdaptorMeta:
  31. properties:
  32. config:
  33. $ref: '#/definitions/adaptor.ConfigTemplates'
  34. defaultBaseUrl:
  35. type: string
  36. fetures:
  37. items:
  38. type: string
  39. type: array
  40. keyHelp:
  41. type: string
  42. name:
  43. type: string
  44. type: object
  45. controller.AddChannelRequest:
  46. properties:
  47. base_url:
  48. type: string
  49. config:
  50. $ref: '#/definitions/model.ChannelConfig'
  51. key:
  52. type: string
  53. model_mapping:
  54. additionalProperties:
  55. type: string
  56. type: object
  57. models:
  58. items:
  59. type: string
  60. type: array
  61. name:
  62. type: string
  63. priority:
  64. type: integer
  65. sets:
  66. items:
  67. type: string
  68. type: array
  69. status:
  70. type: integer
  71. type:
  72. $ref: '#/definitions/model.ChannelType'
  73. type: object
  74. controller.AddTokenRequest:
  75. properties:
  76. expiredAt:
  77. type: integer
  78. models:
  79. items:
  80. type: string
  81. type: array
  82. name:
  83. type: string
  84. quota:
  85. type: number
  86. subnets:
  87. items:
  88. type: string
  89. type: array
  90. type: object
  91. controller.BuiltinModelConfig:
  92. properties:
  93. config:
  94. additionalProperties: {}
  95. type: object
  96. created_at:
  97. type: string
  98. exclude_from_tests:
  99. type: boolean
  100. force_save_detail:
  101. type: boolean
  102. image_prices:
  103. additionalProperties:
  104. type: number
  105. description: map[size]price_per_image
  106. type: object
  107. image_quality_prices:
  108. additionalProperties:
  109. additionalProperties:
  110. type: number
  111. type: object
  112. description: map[size]map[quality]price_per_image
  113. type: object
  114. max_error_rate:
  115. type: number
  116. model:
  117. type: string
  118. owner:
  119. $ref: '#/definitions/model.ModelOwner'
  120. plugin:
  121. additionalProperties:
  122. items:
  123. type: integer
  124. type: array
  125. type: object
  126. price:
  127. $ref: '#/definitions/model.Price'
  128. retry_times:
  129. type: integer
  130. rpm:
  131. type: integer
  132. timeout:
  133. type: integer
  134. tpm:
  135. type: integer
  136. type:
  137. $ref: '#/definitions/mode.Mode'
  138. updated_at:
  139. type: string
  140. type: object
  141. controller.CreateGroupRequest:
  142. properties:
  143. available_sets:
  144. items:
  145. type: string
  146. type: array
  147. balance_alert_enabled:
  148. type: boolean
  149. balance_alert_threshold:
  150. type: number
  151. rpm_ratio:
  152. type: number
  153. tpm_ratio:
  154. type: number
  155. type: object
  156. controller.EmbedMCP:
  157. properties:
  158. config_templates:
  159. $ref: '#/definitions/controller.EmbedMCPConfigTemplates'
  160. embed_config:
  161. $ref: '#/definitions/model.MCPEmbeddingConfig'
  162. enabled:
  163. type: boolean
  164. github_url:
  165. type: string
  166. id:
  167. type: string
  168. name:
  169. type: string
  170. name_cn:
  171. type: string
  172. readme:
  173. type: string
  174. readme_cn:
  175. type: string
  176. readme_cn_url:
  177. type: string
  178. readme_url:
  179. type: string
  180. tags:
  181. items:
  182. type: string
  183. type: array
  184. type: object
  185. controller.EmbedMCPConfigTemplate:
  186. properties:
  187. description:
  188. type: string
  189. example:
  190. type: string
  191. name:
  192. type: string
  193. required:
  194. type: boolean
  195. type: object
  196. controller.EmbedMCPConfigTemplates:
  197. additionalProperties:
  198. $ref: '#/definitions/controller.EmbedMCPConfigTemplate'
  199. type: object
  200. controller.EnabledModelChannel:
  201. properties:
  202. id:
  203. type: integer
  204. name:
  205. type: string
  206. type:
  207. $ref: '#/definitions/model.ChannelType'
  208. type: object
  209. controller.GetModelConfigsByModelsContainsRequest:
  210. properties:
  211. models:
  212. items:
  213. type: string
  214. type: array
  215. type: object
  216. controller.GroupMCPResponse:
  217. properties:
  218. created_at:
  219. type: string
  220. description:
  221. type: string
  222. endpoints:
  223. $ref: '#/definitions/controller.MCPEndpoint'
  224. group_id:
  225. type: string
  226. id:
  227. type: string
  228. name:
  229. type: string
  230. openapi_config:
  231. $ref: '#/definitions/model.MCPOpenAPIConfig'
  232. proxy_config:
  233. $ref: '#/definitions/model.GroupMCPProxyConfig'
  234. status:
  235. $ref: '#/definitions/model.GroupMCPStatus'
  236. type:
  237. $ref: '#/definitions/model.GroupMCPType'
  238. update_at:
  239. type: string
  240. type: object
  241. controller.GroupModel:
  242. properties:
  243. config:
  244. additionalProperties: {}
  245. type: object
  246. created_at:
  247. type: integer
  248. enabled_plugins:
  249. items:
  250. type: string
  251. type: array
  252. image_prices:
  253. additionalProperties:
  254. type: number
  255. description: map[size]price_per_image
  256. type: object
  257. image_quality_prices:
  258. additionalProperties:
  259. additionalProperties:
  260. type: number
  261. type: object
  262. description: map[size]map[quality]price_per_image
  263. type: object
  264. model:
  265. type: string
  266. owner:
  267. $ref: '#/definitions/model.ModelOwner'
  268. price:
  269. $ref: '#/definitions/model.Price'
  270. rpm:
  271. type: integer
  272. tpm:
  273. type: integer
  274. type:
  275. $ref: '#/definitions/mode.Mode'
  276. updated_at:
  277. type: integer
  278. type: object
  279. controller.GroupPublicMCPDetailResponse:
  280. properties:
  281. created_at:
  282. type: string
  283. description:
  284. type: string
  285. description_cn:
  286. type: string
  287. embed_config:
  288. $ref: '#/definitions/model.MCPEmbeddingConfig'
  289. endpoints:
  290. $ref: '#/definitions/controller.MCPEndpoint'
  291. github_url:
  292. type: string
  293. hosted:
  294. type: boolean
  295. id:
  296. type: string
  297. logo_url:
  298. type: string
  299. name:
  300. type: string
  301. name_cn:
  302. type: string
  303. openapi_config:
  304. $ref: '#/definitions/model.MCPOpenAPIConfig'
  305. params:
  306. additionalProperties:
  307. type: string
  308. type: object
  309. price:
  310. $ref: '#/definitions/model.MCPPrice'
  311. proxy_config:
  312. $ref: '#/definitions/model.PublicMCPProxyConfig'
  313. readme:
  314. type: string
  315. readme_cn:
  316. type: string
  317. readme_cn_url:
  318. type: string
  319. readme_url:
  320. type: string
  321. reusing:
  322. additionalProperties:
  323. $ref: '#/definitions/model.ReusingParam'
  324. type: object
  325. status:
  326. $ref: '#/definitions/model.PublicMCPStatus'
  327. tags:
  328. items:
  329. type: string
  330. type: array
  331. test_config:
  332. allOf:
  333. - $ref: '#/definitions/model.TestConfig'
  334. description: only used by list tools
  335. tools:
  336. items:
  337. $ref: '#/definitions/mcp.Tool'
  338. type: array
  339. type:
  340. $ref: '#/definitions/model.PublicMCPType'
  341. update_at:
  342. type: string
  343. type: object
  344. controller.GroupPublicMCPResponse:
  345. properties:
  346. created_at:
  347. type: string
  348. description:
  349. type: string
  350. description_cn:
  351. type: string
  352. embed_config:
  353. $ref: '#/definitions/model.MCPEmbeddingConfig'
  354. github_url:
  355. type: string
  356. hosted:
  357. type: boolean
  358. id:
  359. type: string
  360. logo_url:
  361. type: string
  362. name:
  363. type: string
  364. name_cn:
  365. type: string
  366. openapi_config:
  367. $ref: '#/definitions/model.MCPOpenAPIConfig'
  368. price:
  369. $ref: '#/definitions/model.MCPPrice'
  370. proxy_config:
  371. $ref: '#/definitions/model.PublicMCPProxyConfig'
  372. readme:
  373. type: string
  374. readme_cn:
  375. type: string
  376. readme_cn_url:
  377. type: string
  378. readme_url:
  379. type: string
  380. status:
  381. $ref: '#/definitions/model.PublicMCPStatus'
  382. tags:
  383. items:
  384. type: string
  385. type: array
  386. test_config:
  387. allOf:
  388. - $ref: '#/definitions/model.TestConfig'
  389. description: only used by list tools
  390. type:
  391. $ref: '#/definitions/model.PublicMCPType'
  392. update_at:
  393. type: string
  394. type: object
  395. controller.GroupResponse:
  396. properties:
  397. accessed_at:
  398. type: string
  399. available_sets:
  400. items:
  401. type: string
  402. type: array
  403. balance_alert_enabled:
  404. type: boolean
  405. balance_alert_threshold:
  406. type: number
  407. created_at:
  408. type: string
  409. id:
  410. type: string
  411. request_count:
  412. type: integer
  413. rpm_ratio:
  414. type: number
  415. status:
  416. type: integer
  417. tpm_ratio:
  418. type: number
  419. used_amount:
  420. type: number
  421. type: object
  422. controller.ImportChannelFromOneAPIRequest:
  423. properties:
  424. dsn:
  425. type: string
  426. type: object
  427. controller.MCPEndpoint:
  428. properties:
  429. host:
  430. type: string
  431. sse:
  432. type: string
  433. streamable_http:
  434. type: string
  435. type: object
  436. controller.OpenAIModelPermission:
  437. properties:
  438. allow_create_engine:
  439. type: boolean
  440. allow_fine_tuning:
  441. type: boolean
  442. allow_logprobs:
  443. type: boolean
  444. allow_sampling:
  445. type: boolean
  446. allow_search_indices:
  447. type: boolean
  448. allow_view:
  449. type: boolean
  450. created:
  451. type: integer
  452. group:
  453. type: string
  454. id:
  455. type: string
  456. is_blocking:
  457. type: boolean
  458. object:
  459. type: string
  460. organization:
  461. type: string
  462. type: object
  463. controller.OpenAIModels:
  464. properties:
  465. created:
  466. type: integer
  467. id:
  468. type: string
  469. object:
  470. type: string
  471. owned_by:
  472. type: string
  473. parent:
  474. type: string
  475. permission:
  476. items:
  477. $ref: '#/definitions/controller.OpenAIModelPermission'
  478. type: array
  479. root:
  480. type: string
  481. type: object
  482. controller.PublicMCPResponse:
  483. properties:
  484. created_at:
  485. type: string
  486. description:
  487. type: string
  488. description_cn:
  489. type: string
  490. embed_config:
  491. $ref: '#/definitions/model.MCPEmbeddingConfig'
  492. endpoints:
  493. $ref: '#/definitions/controller.MCPEndpoint'
  494. github_url:
  495. type: string
  496. id:
  497. type: string
  498. logo_url:
  499. type: string
  500. name:
  501. type: string
  502. name_cn:
  503. type: string
  504. openapi_config:
  505. $ref: '#/definitions/model.MCPOpenAPIConfig'
  506. price:
  507. $ref: '#/definitions/model.MCPPrice'
  508. proxy_config:
  509. $ref: '#/definitions/model.PublicMCPProxyConfig'
  510. readme:
  511. type: string
  512. readme_cn:
  513. type: string
  514. readme_cn_url:
  515. type: string
  516. readme_url:
  517. type: string
  518. status:
  519. $ref: '#/definitions/model.PublicMCPStatus'
  520. tags:
  521. items:
  522. type: string
  523. type: array
  524. test_config:
  525. allOf:
  526. - $ref: '#/definitions/model.TestConfig'
  527. description: only used by list tools
  528. type:
  529. $ref: '#/definitions/model.PublicMCPType'
  530. update_at:
  531. type: string
  532. type: object
  533. controller.SaveEmbedMCPRequest:
  534. properties:
  535. enabled:
  536. type: boolean
  537. id:
  538. type: string
  539. init_config:
  540. additionalProperties:
  541. type: string
  542. type: object
  543. type: object
  544. controller.SaveGroupModelConfigRequest:
  545. properties:
  546. force_save_detail:
  547. type: boolean
  548. image_prices:
  549. additionalProperties:
  550. type: number
  551. type: object
  552. model:
  553. type: string
  554. override_force_save_detail:
  555. type: boolean
  556. override_limit:
  557. type: boolean
  558. override_price:
  559. type: boolean
  560. override_retry_times:
  561. type: boolean
  562. price:
  563. $ref: '#/definitions/model.Price'
  564. retry_times:
  565. type: integer
  566. rpm:
  567. type: integer
  568. tpm:
  569. type: integer
  570. type: object
  571. controller.SaveModelConfigsRequest:
  572. properties:
  573. config:
  574. additionalProperties: {}
  575. type: object
  576. created_at:
  577. type: string
  578. exclude_from_tests:
  579. type: boolean
  580. force_save_detail:
  581. type: boolean
  582. image_prices:
  583. additionalProperties:
  584. type: number
  585. description: map[size]price_per_image
  586. type: object
  587. image_quality_prices:
  588. additionalProperties:
  589. additionalProperties:
  590. type: number
  591. type: object
  592. description: map[size]map[quality]price_per_image
  593. type: object
  594. max_error_rate:
  595. type: number
  596. model:
  597. type: string
  598. owner:
  599. $ref: '#/definitions/model.ModelOwner'
  600. plugin:
  601. additionalProperties:
  602. items:
  603. type: integer
  604. type: array
  605. type: object
  606. price:
  607. $ref: '#/definitions/model.Price'
  608. retry_times:
  609. type: integer
  610. rpm:
  611. type: integer
  612. timeout:
  613. type: integer
  614. tpm:
  615. type: integer
  616. type:
  617. $ref: '#/definitions/mode.Mode'
  618. updated_at:
  619. type: string
  620. type: object
  621. controller.StatusData:
  622. properties:
  623. startTime:
  624. type: integer
  625. type: object
  626. controller.TestResult:
  627. properties:
  628. data:
  629. $ref: '#/definitions/model.ChannelTest'
  630. message:
  631. type: string
  632. success:
  633. type: boolean
  634. type: object
  635. controller.TokenResponse:
  636. properties:
  637. accessed_at:
  638. type: string
  639. created_at:
  640. type: string
  641. expired_at:
  642. type: string
  643. group:
  644. type: string
  645. id:
  646. type: integer
  647. key:
  648. type: string
  649. models:
  650. items:
  651. type: string
  652. type: array
  653. name:
  654. type: string
  655. quota:
  656. type: number
  657. request_count:
  658. type: integer
  659. status:
  660. type: integer
  661. subnets:
  662. items:
  663. type: string
  664. type: array
  665. used_amount:
  666. type: number
  667. type: object
  668. controller.UpdateChannelStatusRequest:
  669. properties:
  670. status:
  671. type: integer
  672. type: object
  673. controller.UpdateGroupMCPStatusRequest:
  674. properties:
  675. status:
  676. $ref: '#/definitions/model.GroupMCPStatus'
  677. type: object
  678. controller.UpdateGroupRPMRatioRequest:
  679. properties:
  680. rpm_ratio:
  681. type: number
  682. type: object
  683. controller.UpdateGroupStatusRequest:
  684. properties:
  685. status:
  686. type: integer
  687. type: object
  688. controller.UpdateGroupTPMRatioRequest:
  689. properties:
  690. tpm_ratio:
  691. type: number
  692. type: object
  693. controller.UpdateGroupsStatusRequest:
  694. properties:
  695. groups:
  696. items:
  697. type: string
  698. type: array
  699. status:
  700. type: integer
  701. type: object
  702. controller.UpdatePublicMCPStatusRequest:
  703. properties:
  704. status:
  705. $ref: '#/definitions/model.PublicMCPStatus'
  706. type: object
  707. controller.UpdateTokenNameRequest:
  708. properties:
  709. name:
  710. type: string
  711. type: object
  712. controller.UpdateTokenStatusRequest:
  713. properties:
  714. status:
  715. type: integer
  716. type: object
  717. mcp.Tool:
  718. properties:
  719. annotations:
  720. allOf:
  721. - $ref: '#/definitions/mcp.ToolAnnotation'
  722. description: Optional properties describing tool behavior
  723. description:
  724. description: A human-readable description of the tool.
  725. type: string
  726. inputSchema:
  727. allOf:
  728. - $ref: '#/definitions/mcp.ToolInputSchema'
  729. description: A JSON Schema object defining the expected parameters for the
  730. tool.
  731. name:
  732. description: The name of the tool.
  733. type: string
  734. type: object
  735. mcp.ToolAnnotation:
  736. properties:
  737. destructiveHint:
  738. description: If true, the tool may perform destructive updates
  739. type: boolean
  740. idempotentHint:
  741. description: If true, repeated calls with same args have no additional effect
  742. type: boolean
  743. openWorldHint:
  744. description: If true, tool interacts with external entities
  745. type: boolean
  746. readOnlyHint:
  747. description: If true, the tool does not modify its environment
  748. type: boolean
  749. title:
  750. description: Human-readable title for the tool
  751. type: string
  752. type: object
  753. mcp.ToolInputSchema:
  754. properties:
  755. properties:
  756. additionalProperties: {}
  757. type: object
  758. required:
  759. items:
  760. type: string
  761. type: array
  762. type:
  763. type: string
  764. type: object
  765. middleware.APIResponse:
  766. properties:
  767. data: {}
  768. message:
  769. type: string
  770. success:
  771. type: boolean
  772. type: object
  773. mode.Mode:
  774. enum:
  775. - 0
  776. - 1
  777. - 2
  778. - 3
  779. - 4
  780. - 5
  781. - 6
  782. - 7
  783. - 8
  784. - 9
  785. - 10
  786. - 11
  787. - 12
  788. - 13
  789. - 14
  790. - 15
  791. type: integer
  792. x-enum-varnames:
  793. - Unknown
  794. - ChatCompletions
  795. - Completions
  796. - Embeddings
  797. - Moderations
  798. - ImagesGenerations
  799. - ImagesEdits
  800. - AudioSpeech
  801. - AudioTranscription
  802. - AudioTranslation
  803. - Rerank
  804. - ParsePdf
  805. - Anthropic
  806. - VideoGenerationsJobs
  807. - VideoGenerationsGetJobs
  808. - VideoGenerationsContent
  809. model.AnthropicMessageRequest:
  810. properties:
  811. messages:
  812. items:
  813. $ref: '#/definitions/model.Message'
  814. type: array
  815. model:
  816. type: string
  817. type: object
  818. model.Channel:
  819. properties:
  820. balance:
  821. type: number
  822. balance_threshold:
  823. type: number
  824. balance_updated_at:
  825. type: string
  826. base_url:
  827. type: string
  828. channel_tests:
  829. items:
  830. $ref: '#/definitions/model.ChannelTest'
  831. type: array
  832. config:
  833. $ref: '#/definitions/model.ChannelConfig'
  834. created_at:
  835. type: string
  836. enabled_auto_balance_check:
  837. type: boolean
  838. id:
  839. type: integer
  840. key:
  841. type: string
  842. last_test_error_at:
  843. type: string
  844. model_mapping:
  845. additionalProperties:
  846. type: string
  847. type: object
  848. models:
  849. items:
  850. type: string
  851. type: array
  852. name:
  853. type: string
  854. priority:
  855. type: integer
  856. request_count:
  857. type: integer
  858. retry_count:
  859. type: integer
  860. sets:
  861. items:
  862. type: string
  863. type: array
  864. status:
  865. type: integer
  866. type:
  867. $ref: '#/definitions/model.ChannelType'
  868. used_amount:
  869. type: number
  870. type: object
  871. model.ChannelConfig:
  872. properties:
  873. spec:
  874. items:
  875. type: integer
  876. type: array
  877. type: object
  878. model.ChannelTest:
  879. properties:
  880. actual_model:
  881. type: string
  882. channel_id:
  883. type: integer
  884. channel_name:
  885. type: string
  886. channel_type:
  887. $ref: '#/definitions/model.ChannelType'
  888. code:
  889. type: integer
  890. mode:
  891. $ref: '#/definitions/mode.Mode'
  892. model:
  893. type: string
  894. response:
  895. type: string
  896. success:
  897. type: boolean
  898. test_at:
  899. type: string
  900. took:
  901. type: number
  902. type: object
  903. model.ChannelType:
  904. enum:
  905. - 1
  906. - 3
  907. - 4
  908. - 12
  909. - 13
  910. - 14
  911. - 15
  912. - 16
  913. - 17
  914. - 18
  915. - 19
  916. - 20
  917. - 23
  918. - 24
  919. - 25
  920. - 26
  921. - 27
  922. - 28
  923. - 29
  924. - 30
  925. - 31
  926. - 32
  927. - 33
  928. - 34
  929. - 35
  930. - 36
  931. - 37
  932. - 40
  933. - 41
  934. - 42
  935. - 43
  936. - 44
  937. - 45
  938. - 46
  939. - 47
  940. - 48
  941. type: integer
  942. x-enum-varnames:
  943. - ChannelTypeOpenAI
  944. - ChannelTypeAzure
  945. - ChannelTypeAzure2
  946. - ChannelTypeGoogleGeminiOpenAI
  947. - ChannelTypeBaiduV2
  948. - ChannelTypeAnthropic
  949. - ChannelTypeBaidu
  950. - ChannelTypeZhipu
  951. - ChannelTypeAli
  952. - ChannelTypeXunfei
  953. - ChannelTypeAI360
  954. - ChannelTypeOpenRouter
  955. - ChannelTypeTencent
  956. - ChannelTypeGoogleGemini
  957. - ChannelTypeMoonshot
  958. - ChannelTypeBaichuan
  959. - ChannelTypeMinimax
  960. - ChannelTypeMistral
  961. - ChannelTypeGroq
  962. - ChannelTypeOllama
  963. - ChannelTypeLingyiwanwu
  964. - ChannelTypeStepfun
  965. - ChannelTypeAWS
  966. - ChannelTypeCoze
  967. - ChannelTypeCohere
  968. - ChannelTypeDeepseek
  969. - ChannelTypeCloudflare
  970. - ChannelTypeDoubao
  971. - ChannelTypeNovita
  972. - ChannelTypeVertexAI
  973. - ChannelTypeSiliconflow
  974. - ChannelTypeDoubaoAudio
  975. - ChannelTypeXAI
  976. - ChannelTypeDoc2x
  977. - ChannelTypeJina
  978. - ChannelTypeTextEmbeddingsInference
  979. model.ChartData:
  980. properties:
  981. audio_input_tokens:
  982. type: integer
  983. cache_creation_tokens:
  984. type: integer
  985. cached_tokens:
  986. type: integer
  987. exception_count:
  988. type: integer
  989. image_input_tokens:
  990. type: integer
  991. input_tokens:
  992. type: integer
  993. output_tokens:
  994. type: integer
  995. reasoning_tokens:
  996. type: integer
  997. request_count:
  998. type: integer
  999. retry_count:
  1000. type: integer
  1001. status_5xx_count:
  1002. type: integer
  1003. status_400_count:
  1004. type: integer
  1005. status_429_count:
  1006. type: integer
  1007. status_4xx_count:
  1008. type: integer
  1009. status_500_count:
  1010. type: integer
  1011. timestamp:
  1012. type: integer
  1013. total_time_milliseconds:
  1014. type: integer
  1015. total_tokens:
  1016. type: integer
  1017. total_ttfb_milliseconds:
  1018. type: integer
  1019. used_amount:
  1020. type: number
  1021. web_search_count:
  1022. type: integer
  1023. type: object
  1024. model.ChatUsage:
  1025. properties:
  1026. completion_tokens:
  1027. type: integer
  1028. completion_tokens_details:
  1029. $ref: '#/definitions/model.CompletionTokensDetails'
  1030. prompt_tokens:
  1031. type: integer
  1032. prompt_tokens_details:
  1033. $ref: '#/definitions/model.PromptTokensDetails'
  1034. total_tokens:
  1035. type: integer
  1036. web_search_count:
  1037. type: integer
  1038. type: object
  1039. model.CompletionTokensDetails:
  1040. properties:
  1041. accepted_prediction_tokens:
  1042. type: integer
  1043. audio_tokens:
  1044. type: integer
  1045. reasoning_tokens:
  1046. type: integer
  1047. rejected_prediction_tokens:
  1048. type: integer
  1049. type: object
  1050. model.ConditionalPrice:
  1051. properties:
  1052. condition:
  1053. $ref: '#/definitions/model.PriceCondition'
  1054. price:
  1055. $ref: '#/definitions/model.Price'
  1056. type: object
  1057. model.DashboardResponse:
  1058. properties:
  1059. audio_input_tokens:
  1060. type: integer
  1061. cache_creation_tokens:
  1062. type: integer
  1063. cached_tokens:
  1064. type: integer
  1065. channels:
  1066. items:
  1067. type: integer
  1068. type: array
  1069. chart_data:
  1070. items:
  1071. $ref: '#/definitions/model.ChartData'
  1072. type: array
  1073. exception_count:
  1074. type: integer
  1075. image_input_tokens:
  1076. type: integer
  1077. input_tokens:
  1078. type: integer
  1079. max_rpm:
  1080. type: integer
  1081. max_tpm:
  1082. type: integer
  1083. models:
  1084. items:
  1085. type: string
  1086. type: array
  1087. output_tokens:
  1088. type: integer
  1089. reasoning_tokens:
  1090. type: integer
  1091. request_count:
  1092. type: integer
  1093. retry_count:
  1094. type: integer
  1095. rpm:
  1096. type: integer
  1097. status_429_count:
  1098. type: integer
  1099. status_500_count:
  1100. type: integer
  1101. status_5xx_count:
  1102. type: integer
  1103. status_400_count:
  1104. type: integer
  1105. status_4xx_count:
  1106. type: integer
  1107. total_count:
  1108. description: use Count.RequestCount instead
  1109. type: integer
  1110. total_time_milliseconds:
  1111. type: integer
  1112. total_tokens:
  1113. type: integer
  1114. total_ttfb_milliseconds:
  1115. type: integer
  1116. tpm:
  1117. type: integer
  1118. used_amount:
  1119. type: number
  1120. web_search_count:
  1121. type: integer
  1122. type: object
  1123. model.Document:
  1124. properties:
  1125. text:
  1126. type: string
  1127. type: object
  1128. model.EmbeddingPromptTokensDetails:
  1129. properties:
  1130. image_tokens:
  1131. type: integer
  1132. text_tokens:
  1133. type: integer
  1134. type: object
  1135. model.EmbeddingRequest:
  1136. properties:
  1137. dimensions:
  1138. type: integer
  1139. encoding_format:
  1140. type: string
  1141. input:
  1142. type: string
  1143. model:
  1144. type: string
  1145. type: object
  1146. model.EmbeddingResponse:
  1147. properties:
  1148. data:
  1149. items:
  1150. $ref: '#/definitions/model.EmbeddingResponseItem'
  1151. type: array
  1152. model:
  1153. type: string
  1154. object:
  1155. type: string
  1156. usage:
  1157. $ref: '#/definitions/model.EmbeddingUsage'
  1158. type: object
  1159. model.EmbeddingResponseItem:
  1160. properties:
  1161. embedding:
  1162. items:
  1163. type: number
  1164. type: array
  1165. index:
  1166. type: integer
  1167. object:
  1168. type: string
  1169. type: object
  1170. model.EmbeddingUsage:
  1171. properties:
  1172. prompt_tokens:
  1173. type: integer
  1174. prompt_tokens_details:
  1175. $ref: '#/definitions/model.EmbeddingPromptTokensDetails'
  1176. total_tokens:
  1177. type: integer
  1178. type: object
  1179. model.FinishReason:
  1180. enum:
  1181. - stop
  1182. - length
  1183. - content_filter
  1184. - tool_calls
  1185. - function_call
  1186. type: string
  1187. x-enum-varnames:
  1188. - FinishReasonStop
  1189. - FinishReasonLength
  1190. - FinishReasonContentFilter
  1191. - FinishReasonToolCalls
  1192. - FinishReasonFunctionCall
  1193. model.Function:
  1194. properties:
  1195. arguments:
  1196. type: string
  1197. description:
  1198. type: string
  1199. name:
  1200. type: string
  1201. parameters: {}
  1202. type: object
  1203. model.GeneralOpenAIRequest:
  1204. properties:
  1205. frequency_penalty:
  1206. type: number
  1207. function_call: {}
  1208. functions: {}
  1209. input: {}
  1210. logit_bias: {}
  1211. logprobs:
  1212. type: boolean
  1213. max_completion_tokens:
  1214. type: integer
  1215. max_tokens:
  1216. type: integer
  1217. messages:
  1218. items:
  1219. $ref: '#/definitions/model.Message'
  1220. type: array
  1221. metadata: {}
  1222. model:
  1223. type: string
  1224. num_ctx:
  1225. type: integer
  1226. presence_penalty:
  1227. type: number
  1228. prompt: {}
  1229. response_format:
  1230. $ref: '#/definitions/model.ResponseFormat'
  1231. seed:
  1232. type: number
  1233. size:
  1234. type: string
  1235. stop: {}
  1236. stream:
  1237. type: boolean
  1238. stream_options:
  1239. $ref: '#/definitions/model.StreamOptions'
  1240. temperature:
  1241. type: number
  1242. tool_choice: {}
  1243. tools:
  1244. items:
  1245. $ref: '#/definitions/model.Tool'
  1246. type: array
  1247. top_k:
  1248. type: integer
  1249. top_logprobs:
  1250. type: integer
  1251. top_p:
  1252. type: number
  1253. user:
  1254. type: string
  1255. type: object
  1256. model.GetGroupLogsResult:
  1257. properties:
  1258. channels:
  1259. items:
  1260. type: integer
  1261. type: array
  1262. logs:
  1263. items:
  1264. $ref: '#/definitions/model.Log'
  1265. type: array
  1266. models:
  1267. items:
  1268. type: string
  1269. type: array
  1270. token_names:
  1271. items:
  1272. type: string
  1273. type: array
  1274. total:
  1275. type: integer
  1276. type: object
  1277. model.GetLogsResult:
  1278. properties:
  1279. channels:
  1280. items:
  1281. type: integer
  1282. type: array
  1283. logs:
  1284. items:
  1285. $ref: '#/definitions/model.Log'
  1286. type: array
  1287. total:
  1288. type: integer
  1289. type: object
  1290. model.Group:
  1291. properties:
  1292. available_sets:
  1293. items:
  1294. type: string
  1295. type: array
  1296. balance_alert_enabled:
  1297. type: boolean
  1298. balance_alert_threshold:
  1299. type: number
  1300. created_at:
  1301. type: string
  1302. id:
  1303. type: string
  1304. request_count:
  1305. type: integer
  1306. rpm_ratio:
  1307. type: number
  1308. status:
  1309. type: integer
  1310. tpm_ratio:
  1311. type: number
  1312. used_amount:
  1313. type: number
  1314. type: object
  1315. model.GroupDashboardResponse:
  1316. properties:
  1317. audio_input_tokens:
  1318. type: integer
  1319. cache_creation_tokens:
  1320. type: integer
  1321. cached_tokens:
  1322. type: integer
  1323. channels:
  1324. items:
  1325. type: integer
  1326. type: array
  1327. chart_data:
  1328. items:
  1329. $ref: '#/definitions/model.ChartData'
  1330. type: array
  1331. exception_count:
  1332. type: integer
  1333. image_input_tokens:
  1334. type: integer
  1335. input_tokens:
  1336. type: integer
  1337. max_rpm:
  1338. type: integer
  1339. max_tpm:
  1340. type: integer
  1341. models:
  1342. items:
  1343. type: string
  1344. type: array
  1345. output_tokens:
  1346. type: integer
  1347. reasoning_tokens:
  1348. type: integer
  1349. request_count:
  1350. type: integer
  1351. retry_count:
  1352. type: integer
  1353. rpm:
  1354. type: integer
  1355. status_5xx_count:
  1356. type: integer
  1357. status_400_count:
  1358. type: integer
  1359. status_429_count:
  1360. type: integer
  1361. status_4xx_count:
  1362. type: integer
  1363. status_500_count:
  1364. type: integer
  1365. token_names:
  1366. items:
  1367. type: string
  1368. type: array
  1369. total_count:
  1370. description: use Count.RequestCount instead
  1371. type: integer
  1372. total_time_milliseconds:
  1373. type: integer
  1374. total_tokens:
  1375. type: integer
  1376. total_ttfb_milliseconds:
  1377. type: integer
  1378. tpm:
  1379. type: integer
  1380. used_amount:
  1381. type: number
  1382. web_search_count:
  1383. type: integer
  1384. type: object
  1385. model.GroupMCP:
  1386. properties:
  1387. created_at:
  1388. type: string
  1389. description:
  1390. type: string
  1391. group_id:
  1392. type: string
  1393. id:
  1394. type: string
  1395. name:
  1396. type: string
  1397. openapi_config:
  1398. $ref: '#/definitions/model.MCPOpenAPIConfig'
  1399. proxy_config:
  1400. $ref: '#/definitions/model.GroupMCPProxyConfig'
  1401. status:
  1402. $ref: '#/definitions/model.GroupMCPStatus'
  1403. type:
  1404. $ref: '#/definitions/model.GroupMCPType'
  1405. update_at:
  1406. type: string
  1407. type: object
  1408. model.GroupMCPProxyConfig:
  1409. properties:
  1410. headers:
  1411. additionalProperties:
  1412. type: string
  1413. type: object
  1414. querys:
  1415. additionalProperties:
  1416. type: string
  1417. type: object
  1418. url:
  1419. type: string
  1420. type: object
  1421. model.GroupMCPStatus:
  1422. enum:
  1423. - 1
  1424. - 2
  1425. type: integer
  1426. x-enum-varnames:
  1427. - GroupMCPStatusEnabled
  1428. - GroupMCPStatusDisabled
  1429. model.GroupMCPType:
  1430. enum:
  1431. - mcp_proxy_sse
  1432. - mcp_proxy_streamable
  1433. - mcp_openapi
  1434. type: string
  1435. x-enum-varnames:
  1436. - GroupMCPTypeProxySSE
  1437. - GroupMCPTypeProxyStreamable
  1438. - GroupMCPTypeOpenAPI
  1439. model.GroupModelConfig:
  1440. properties:
  1441. force_save_detail:
  1442. type: boolean
  1443. group_id:
  1444. type: string
  1445. image_prices:
  1446. additionalProperties:
  1447. type: number
  1448. type: object
  1449. model:
  1450. type: string
  1451. override_force_save_detail:
  1452. type: boolean
  1453. override_limit:
  1454. type: boolean
  1455. override_price:
  1456. type: boolean
  1457. override_retry_times:
  1458. type: boolean
  1459. price:
  1460. $ref: '#/definitions/model.Price'
  1461. retry_times:
  1462. type: integer
  1463. rpm:
  1464. type: integer
  1465. tpm:
  1466. type: integer
  1467. type: object
  1468. model.ImageData:
  1469. properties:
  1470. b64_json:
  1471. type: string
  1472. revised_prompt:
  1473. type: string
  1474. url:
  1475. type: string
  1476. type: object
  1477. model.ImageInputTokensDetails:
  1478. properties:
  1479. image_tokens:
  1480. description: The number of image tokens in the input prompt.
  1481. type: integer
  1482. text_tokens:
  1483. description: The number of text tokens in the input prompt.
  1484. type: integer
  1485. type: object
  1486. model.ImageRequest:
  1487. properties:
  1488. background:
  1489. type: string
  1490. model:
  1491. type: string
  1492. moderation:
  1493. type: string
  1494. "n":
  1495. type: integer
  1496. output_compression:
  1497. type: integer
  1498. output_format:
  1499. description: png, jpeg, webp
  1500. type: string
  1501. prompt:
  1502. type: string
  1503. quality:
  1504. description: auto, high, medium, low, hd, standard
  1505. type: string
  1506. response_format:
  1507. description: url, b64_json
  1508. type: string
  1509. size:
  1510. description: 1024x1024, 1536x1024, 1024x1536, auto, 256x256, 512x512, 1792x1024,
  1511. 1024x1792
  1512. type: string
  1513. style:
  1514. description: vivid, natural
  1515. type: string
  1516. user:
  1517. type: string
  1518. type: object
  1519. model.ImageResponse:
  1520. properties:
  1521. created:
  1522. type: integer
  1523. data:
  1524. items:
  1525. $ref: '#/definitions/model.ImageData'
  1526. type: array
  1527. usage:
  1528. allOf:
  1529. - $ref: '#/definitions/model.ImageUsage'
  1530. description: For gpt-image-1 only, the token usage information for the image
  1531. generation.
  1532. type: object
  1533. model.ImageUsage:
  1534. properties:
  1535. input_tokens:
  1536. description: The number of tokens (images and text) in the input prompt.
  1537. type: integer
  1538. input_tokens_details:
  1539. allOf:
  1540. - $ref: '#/definitions/model.ImageInputTokensDetails'
  1541. description: The input tokens detailed information for the image generation.
  1542. output_tokens:
  1543. description: The number of image tokens in the output image.
  1544. type: integer
  1545. total_tokens:
  1546. description: The total number of tokens (images and text) used for the image
  1547. generation.
  1548. type: integer
  1549. type: object
  1550. model.JSONSchema:
  1551. properties:
  1552. description:
  1553. type: string
  1554. name:
  1555. type: string
  1556. schema:
  1557. additionalProperties: {}
  1558. type: object
  1559. strict:
  1560. type: boolean
  1561. type: object
  1562. model.Log:
  1563. properties:
  1564. channel:
  1565. type: integer
  1566. code:
  1567. type: integer
  1568. content:
  1569. type: string
  1570. created_at:
  1571. type: string
  1572. endpoint:
  1573. type: string
  1574. group:
  1575. type: string
  1576. id:
  1577. type: integer
  1578. ip:
  1579. type: string
  1580. metadata:
  1581. additionalProperties:
  1582. type: string
  1583. type: object
  1584. mode:
  1585. type: integer
  1586. model:
  1587. type: string
  1588. price:
  1589. $ref: '#/definitions/model.Price'
  1590. request_at:
  1591. type: string
  1592. request_detail:
  1593. $ref: '#/definitions/model.RequestDetail'
  1594. request_id:
  1595. type: string
  1596. retry_at:
  1597. type: string
  1598. retry_times:
  1599. type: integer
  1600. token_id:
  1601. type: integer
  1602. token_name:
  1603. type: string
  1604. ttfb_milliseconds:
  1605. type: integer
  1606. usage:
  1607. $ref: '#/definitions/model.Usage'
  1608. used_amount:
  1609. type: number
  1610. user:
  1611. description: https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids
  1612. type: string
  1613. type: object
  1614. model.MCPEmbeddingConfig:
  1615. properties:
  1616. init:
  1617. additionalProperties:
  1618. type: string
  1619. type: object
  1620. reusing:
  1621. additionalProperties:
  1622. $ref: '#/definitions/model.ReusingParam'
  1623. type: object
  1624. type: object
  1625. model.MCPOpenAPIConfig:
  1626. properties:
  1627. authorization:
  1628. type: string
  1629. openapi_content:
  1630. type: string
  1631. openapi_spec:
  1632. type: string
  1633. server_addr:
  1634. type: string
  1635. v2:
  1636. type: boolean
  1637. type: object
  1638. model.MCPPrice:
  1639. properties:
  1640. default_tools_call_price:
  1641. type: number
  1642. tools_call_prices:
  1643. additionalProperties:
  1644. type: number
  1645. type: object
  1646. type: object
  1647. model.Message:
  1648. properties:
  1649. content: {}
  1650. name:
  1651. type: string
  1652. reasoning_content:
  1653. type: string
  1654. role:
  1655. type: string
  1656. tool_call_id:
  1657. type: string
  1658. tool_calls:
  1659. items:
  1660. $ref: '#/definitions/model.ToolCall'
  1661. type: array
  1662. type: object
  1663. model.ModelConfig:
  1664. properties:
  1665. config:
  1666. additionalProperties: {}
  1667. type: object
  1668. created_at:
  1669. type: string
  1670. exclude_from_tests:
  1671. type: boolean
  1672. force_save_detail:
  1673. type: boolean
  1674. image_prices:
  1675. additionalProperties:
  1676. type: number
  1677. description: map[size]price_per_image
  1678. type: object
  1679. image_quality_prices:
  1680. additionalProperties:
  1681. additionalProperties:
  1682. type: number
  1683. type: object
  1684. description: map[size]map[quality]price_per_image
  1685. type: object
  1686. max_error_rate:
  1687. type: number
  1688. model:
  1689. type: string
  1690. owner:
  1691. $ref: '#/definitions/model.ModelOwner'
  1692. plugin:
  1693. additionalProperties:
  1694. items:
  1695. type: integer
  1696. type: array
  1697. type: object
  1698. price:
  1699. $ref: '#/definitions/model.Price'
  1700. retry_times:
  1701. type: integer
  1702. rpm:
  1703. type: integer
  1704. timeout:
  1705. type: integer
  1706. tpm:
  1707. type: integer
  1708. type:
  1709. $ref: '#/definitions/mode.Mode'
  1710. updated_at:
  1711. type: string
  1712. type: object
  1713. model.ModelOwner:
  1714. enum:
  1715. - openai
  1716. - alibaba
  1717. - tencent
  1718. - xunfei
  1719. - deepseek
  1720. - moonshot
  1721. - minimax
  1722. - baidu
  1723. - google
  1724. - baai
  1725. - funaudiollm
  1726. - doubao
  1727. - fishaudio
  1728. - chatglm
  1729. - stabilityai
  1730. - netease
  1731. - ai360
  1732. - anthropic
  1733. - meta
  1734. - baichuan
  1735. - mistral
  1736. - openchat
  1737. - microsoft
  1738. - defog
  1739. - nexusflow
  1740. - cohere
  1741. - huggingface
  1742. - lingyiwanwu
  1743. - stepfun
  1744. - xai
  1745. - doc2x
  1746. - jina
  1747. type: string
  1748. x-enum-varnames:
  1749. - ModelOwnerOpenAI
  1750. - ModelOwnerAlibaba
  1751. - ModelOwnerTencent
  1752. - ModelOwnerXunfei
  1753. - ModelOwnerDeepSeek
  1754. - ModelOwnerMoonshot
  1755. - ModelOwnerMiniMax
  1756. - ModelOwnerBaidu
  1757. - ModelOwnerGoogle
  1758. - ModelOwnerBAAI
  1759. - ModelOwnerFunAudioLLM
  1760. - ModelOwnerDoubao
  1761. - ModelOwnerFishAudio
  1762. - ModelOwnerChatGLM
  1763. - ModelOwnerStabilityAI
  1764. - ModelOwnerNetease
  1765. - ModelOwnerAI360
  1766. - ModelOwnerAnthropic
  1767. - ModelOwnerMeta
  1768. - ModelOwnerBaichuan
  1769. - ModelOwnerMistral
  1770. - ModelOwnerOpenChat
  1771. - ModelOwnerMicrosoft
  1772. - ModelOwnerDefog
  1773. - ModelOwnerNexusFlow
  1774. - ModelOwnerCohere
  1775. - ModelOwnerHuggingFace
  1776. - ModelOwnerLingyiWanwu
  1777. - ModelOwnerStepFun
  1778. - ModelOwnerXAI
  1779. - ModelOwnerDoc2x
  1780. - ModelOwnerJina
  1781. model.Option:
  1782. properties:
  1783. key:
  1784. type: string
  1785. value:
  1786. type: string
  1787. type: object
  1788. model.Params:
  1789. additionalProperties:
  1790. type: string
  1791. type: object
  1792. model.ParsePdfResponse:
  1793. properties:
  1794. markdown:
  1795. type: string
  1796. pages:
  1797. type: integer
  1798. type: object
  1799. model.Price:
  1800. properties:
  1801. audio_input_price:
  1802. type: number
  1803. audio_input_price_unit:
  1804. type: integer
  1805. cache_creation_price:
  1806. type: number
  1807. cache_creation_price_unit:
  1808. type: integer
  1809. cached_price:
  1810. type: number
  1811. cached_price_unit:
  1812. type: integer
  1813. conditional_prices:
  1814. items:
  1815. $ref: '#/definitions/model.ConditionalPrice'
  1816. type: array
  1817. image_input_price:
  1818. type: number
  1819. image_input_price_unit:
  1820. type: integer
  1821. input_price:
  1822. type: number
  1823. input_price_unit:
  1824. type: integer
  1825. output_price:
  1826. type: number
  1827. output_price_unit:
  1828. type: integer
  1829. per_request_price:
  1830. type: number
  1831. thinking_mode_output_price:
  1832. description: |-
  1833. when ThinkingModeOutputPrice and ReasoningTokens are not 0, OutputPrice and OutputPriceUnit
  1834. will be overwritten
  1835. type: number
  1836. thinking_mode_output_price_unit:
  1837. type: integer
  1838. web_search_price:
  1839. type: number
  1840. web_search_price_unit:
  1841. type: integer
  1842. type: object
  1843. model.PriceCondition:
  1844. properties:
  1845. input_token_max:
  1846. type: integer
  1847. input_token_min:
  1848. type: integer
  1849. output_token_max:
  1850. type: integer
  1851. output_token_min:
  1852. type: integer
  1853. type: object
  1854. model.PromptTokensDetails:
  1855. properties:
  1856. audio_tokens:
  1857. type: integer
  1858. cache_creation_tokens:
  1859. type: integer
  1860. cached_tokens:
  1861. type: integer
  1862. type: object
  1863. model.ProxyParamType:
  1864. enum:
  1865. - url
  1866. - header
  1867. - query
  1868. type: string
  1869. x-enum-varnames:
  1870. - ParamTypeURL
  1871. - ParamTypeHeader
  1872. - ParamTypeQuery
  1873. model.PublicMCP:
  1874. properties:
  1875. created_at:
  1876. type: string
  1877. description:
  1878. type: string
  1879. description_cn:
  1880. type: string
  1881. embed_config:
  1882. $ref: '#/definitions/model.MCPEmbeddingConfig'
  1883. github_url:
  1884. type: string
  1885. id:
  1886. type: string
  1887. logo_url:
  1888. type: string
  1889. name:
  1890. type: string
  1891. name_cn:
  1892. type: string
  1893. openapi_config:
  1894. $ref: '#/definitions/model.MCPOpenAPIConfig'
  1895. price:
  1896. $ref: '#/definitions/model.MCPPrice'
  1897. proxy_config:
  1898. $ref: '#/definitions/model.PublicMCPProxyConfig'
  1899. readme:
  1900. type: string
  1901. readme_cn:
  1902. type: string
  1903. readme_cn_url:
  1904. type: string
  1905. readme_url:
  1906. type: string
  1907. status:
  1908. $ref: '#/definitions/model.PublicMCPStatus'
  1909. tags:
  1910. items:
  1911. type: string
  1912. type: array
  1913. test_config:
  1914. allOf:
  1915. - $ref: '#/definitions/model.TestConfig'
  1916. description: only used by list tools
  1917. type:
  1918. $ref: '#/definitions/model.PublicMCPType'
  1919. update_at:
  1920. type: string
  1921. type: object
  1922. model.PublicMCPProxyConfig:
  1923. properties:
  1924. headers:
  1925. additionalProperties:
  1926. type: string
  1927. type: object
  1928. querys:
  1929. additionalProperties:
  1930. type: string
  1931. type: object
  1932. reusing:
  1933. additionalProperties:
  1934. $ref: '#/definitions/model.PublicMCPProxyReusingParam'
  1935. type: object
  1936. url:
  1937. type: string
  1938. type: object
  1939. model.PublicMCPProxyReusingParam:
  1940. properties:
  1941. description:
  1942. type: string
  1943. name:
  1944. type: string
  1945. required:
  1946. type: boolean
  1947. type:
  1948. $ref: '#/definitions/model.ProxyParamType'
  1949. type: object
  1950. model.PublicMCPReusingParam:
  1951. properties:
  1952. created_at:
  1953. type: string
  1954. group_id:
  1955. type: string
  1956. mcp_id:
  1957. type: string
  1958. params:
  1959. $ref: '#/definitions/model.Params'
  1960. update_at:
  1961. type: string
  1962. type: object
  1963. model.PublicMCPStatus:
  1964. enum:
  1965. - 1
  1966. - 2
  1967. type: integer
  1968. x-enum-varnames:
  1969. - PublicMCPStatusEnabled
  1970. - PublicMCPStatusDisabled
  1971. model.PublicMCPType:
  1972. enum:
  1973. - mcp_proxy_sse
  1974. - mcp_proxy_streamable
  1975. - mcp_docs
  1976. - mcp_openapi
  1977. - mcp_embed
  1978. type: string
  1979. x-enum-comments:
  1980. PublicMCPTypeDocs: read only
  1981. x-enum-varnames:
  1982. - PublicMCPTypeProxySSE
  1983. - PublicMCPTypeProxyStreamable
  1984. - PublicMCPTypeDocs
  1985. - PublicMCPTypeOpenAPI
  1986. - PublicMCPTypeEmbed
  1987. model.RequestDetail:
  1988. properties:
  1989. id:
  1990. type: integer
  1991. log_id:
  1992. type: integer
  1993. request_body:
  1994. type: string
  1995. request_body_truncated:
  1996. type: boolean
  1997. response_body:
  1998. type: string
  1999. response_body_truncated:
  2000. type: boolean
  2001. type: object
  2002. model.RerankMeta:
  2003. properties:
  2004. model:
  2005. type: string
  2006. tokens:
  2007. $ref: '#/definitions/model.RerankMetaTokens'
  2008. type: object
  2009. model.RerankMetaTokens:
  2010. properties:
  2011. input_tokens:
  2012. type: integer
  2013. output_tokens:
  2014. type: integer
  2015. type: object
  2016. model.RerankRequest:
  2017. properties:
  2018. documents:
  2019. items:
  2020. type: string
  2021. type: array
  2022. max_chunks_per_doc:
  2023. type: integer
  2024. model:
  2025. type: string
  2026. overlap_tokens:
  2027. type: integer
  2028. query:
  2029. type: string
  2030. return_documents:
  2031. type: boolean
  2032. top_n:
  2033. type: integer
  2034. type: object
  2035. model.RerankResponse:
  2036. properties:
  2037. id:
  2038. type: string
  2039. meta:
  2040. $ref: '#/definitions/model.RerankMeta'
  2041. results:
  2042. items:
  2043. $ref: '#/definitions/model.RerankResult'
  2044. type: array
  2045. type: object
  2046. model.RerankResult:
  2047. properties:
  2048. document:
  2049. $ref: '#/definitions/model.Document'
  2050. index:
  2051. type: integer
  2052. relevance_score:
  2053. type: number
  2054. type: object
  2055. model.ResponseFormat:
  2056. properties:
  2057. json_schema:
  2058. $ref: '#/definitions/model.JSONSchema'
  2059. type:
  2060. type: string
  2061. type: object
  2062. model.ReusingParam:
  2063. properties:
  2064. description:
  2065. type: string
  2066. name:
  2067. type: string
  2068. required:
  2069. type: boolean
  2070. type: object
  2071. model.StreamOptions:
  2072. properties:
  2073. include_usage:
  2074. type: boolean
  2075. type: object
  2076. model.SttJSONResponse:
  2077. properties:
  2078. text:
  2079. type: string
  2080. type: object
  2081. model.SummaryDataV2:
  2082. properties:
  2083. audio_input_tokens:
  2084. type: integer
  2085. cache_creation_tokens:
  2086. type: integer
  2087. cached_tokens:
  2088. type: integer
  2089. channel_id:
  2090. type: integer
  2091. exception_count:
  2092. type: integer
  2093. group_id:
  2094. type: string
  2095. image_input_tokens:
  2096. type: integer
  2097. input_tokens:
  2098. type: integer
  2099. max_rpm:
  2100. type: integer
  2101. max_tpm:
  2102. type: integer
  2103. model:
  2104. type: string
  2105. output_tokens:
  2106. type: integer
  2107. reasoning_tokens:
  2108. type: integer
  2109. request_count:
  2110. type: integer
  2111. retry_count:
  2112. type: integer
  2113. status_400_count:
  2114. type: integer
  2115. status_429_count:
  2116. type: integer
  2117. status_4xx_count:
  2118. type: integer
  2119. status_500_count:
  2120. type: integer
  2121. status_5xx_count:
  2122. type: integer
  2123. timestamp:
  2124. type: integer
  2125. token_name:
  2126. type: string
  2127. total_time_milliseconds:
  2128. type: integer
  2129. total_tokens:
  2130. type: integer
  2131. total_ttfb_milliseconds:
  2132. type: integer
  2133. used_amount:
  2134. type: number
  2135. web_search_count:
  2136. type: integer
  2137. type: object
  2138. model.TestConfig:
  2139. properties:
  2140. enabled:
  2141. type: boolean
  2142. params:
  2143. $ref: '#/definitions/model.Params'
  2144. type: object
  2145. model.TextResponse:
  2146. properties:
  2147. choices:
  2148. items:
  2149. $ref: '#/definitions/model.TextResponseChoice'
  2150. type: array
  2151. created:
  2152. type: integer
  2153. id:
  2154. type: string
  2155. model:
  2156. type: string
  2157. object:
  2158. type: string
  2159. usage:
  2160. $ref: '#/definitions/model.ChatUsage'
  2161. type: object
  2162. model.TextResponseChoice:
  2163. properties:
  2164. finish_reason:
  2165. $ref: '#/definitions/model.FinishReason'
  2166. index:
  2167. type: integer
  2168. message:
  2169. $ref: '#/definitions/model.Message'
  2170. text:
  2171. type: string
  2172. type: object
  2173. model.TextToSpeechRequest:
  2174. properties:
  2175. input:
  2176. type: string
  2177. model:
  2178. type: string
  2179. response_format:
  2180. type: string
  2181. speed:
  2182. type: number
  2183. stream_format:
  2184. type: string
  2185. voice:
  2186. type: string
  2187. required:
  2188. - input
  2189. - model
  2190. - voice
  2191. type: object
  2192. model.TimeSummaryDataV2:
  2193. properties:
  2194. summary:
  2195. items:
  2196. $ref: '#/definitions/model.SummaryDataV2'
  2197. type: array
  2198. timestamp:
  2199. type: integer
  2200. type: object
  2201. model.Tool:
  2202. properties:
  2203. function:
  2204. $ref: '#/definitions/model.Function'
  2205. type:
  2206. type: string
  2207. type: object
  2208. model.ToolCall:
  2209. properties:
  2210. function:
  2211. $ref: '#/definitions/model.Function'
  2212. id:
  2213. type: string
  2214. index:
  2215. type: integer
  2216. type:
  2217. type: string
  2218. type: object
  2219. model.Usage:
  2220. properties:
  2221. audio_input_tokens:
  2222. type: integer
  2223. cache_creation_tokens:
  2224. type: integer
  2225. cached_tokens:
  2226. type: integer
  2227. image_input_tokens:
  2228. type: integer
  2229. input_tokens:
  2230. type: integer
  2231. output_tokens:
  2232. type: integer
  2233. reasoning_tokens:
  2234. type: integer
  2235. total_tokens:
  2236. type: integer
  2237. web_search_count:
  2238. type: integer
  2239. type: object
  2240. model.VideoGenerationJob:
  2241. properties:
  2242. created_at:
  2243. type: integer
  2244. expires_at:
  2245. type: integer
  2246. finish_reason:
  2247. type: string
  2248. finished_at:
  2249. type: integer
  2250. generations:
  2251. items:
  2252. $ref: '#/definitions/model.VideoGenerations'
  2253. type: array
  2254. height:
  2255. type: integer
  2256. id:
  2257. type: string
  2258. model:
  2259. type: string
  2260. n_seconds:
  2261. type: integer
  2262. n_variants:
  2263. type: integer
  2264. object:
  2265. type: string
  2266. prompt:
  2267. type: string
  2268. status:
  2269. $ref: '#/definitions/model.VideoGenerationJobStatus'
  2270. width:
  2271. type: integer
  2272. type: object
  2273. model.VideoGenerationJobRequest:
  2274. properties:
  2275. height:
  2276. type: integer
  2277. model:
  2278. type: string
  2279. n_seconds:
  2280. type: integer
  2281. n_variants:
  2282. type: integer
  2283. prompt:
  2284. type: string
  2285. width:
  2286. type: integer
  2287. type: object
  2288. model.VideoGenerationJobStatus:
  2289. enum:
  2290. - queued
  2291. - processing
  2292. - running
  2293. - succeeded
  2294. type: string
  2295. x-enum-varnames:
  2296. - VideoGenerationJobStatusQueued
  2297. - VideoGenerationJobStatusProcessing
  2298. - VideoGenerationJobStatusRunning
  2299. - VideoGenerationJobStatusSucceeded
  2300. model.VideoGenerations:
  2301. properties:
  2302. created_at:
  2303. type: integer
  2304. height:
  2305. type: integer
  2306. id:
  2307. type: string
  2308. job_id:
  2309. type: string
  2310. n_seconds:
  2311. type: integer
  2312. object:
  2313. type: string
  2314. prompt:
  2315. type: string
  2316. width:
  2317. type: integer
  2318. type: object
  2319. openai.SubscriptionResponse:
  2320. properties:
  2321. access_until:
  2322. type: integer
  2323. hard_limit_usd:
  2324. type: number
  2325. has_payment_method:
  2326. type: boolean
  2327. object:
  2328. type: string
  2329. soft_limit_usd:
  2330. type: number
  2331. system_hard_limit_usd:
  2332. type: number
  2333. type: object
  2334. openai.UsageResponse:
  2335. properties:
  2336. object:
  2337. type: string
  2338. total_usage:
  2339. description: DailyCosts []OpenAIUsageDailyCost `json:"daily_costs"`
  2340. type: number
  2341. type: object
  2342. info:
  2343. contact: {}
  2344. title: AI Proxy Swagger API
  2345. version: "1.0"
  2346. paths:
  2347. /api/channel/:
  2348. post:
  2349. consumes:
  2350. - application/json
  2351. description: Adds a new channel to the system
  2352. parameters:
  2353. - description: Channel information
  2354. in: body
  2355. name: channel
  2356. required: true
  2357. schema:
  2358. $ref: '#/definitions/controller.AddChannelRequest'
  2359. produces:
  2360. - application/json
  2361. responses:
  2362. "200":
  2363. description: OK
  2364. schema:
  2365. $ref: '#/definitions/middleware.APIResponse'
  2366. security:
  2367. - ApiKeyAuth: []
  2368. summary: Add a single channel
  2369. tags:
  2370. - channel
  2371. /api/channel/{id}:
  2372. delete:
  2373. description: Deletes a channel by its ID
  2374. parameters:
  2375. - description: Channel ID
  2376. in: path
  2377. name: id
  2378. required: true
  2379. type: integer
  2380. produces:
  2381. - application/json
  2382. responses:
  2383. "200":
  2384. description: OK
  2385. schema:
  2386. $ref: '#/definitions/middleware.APIResponse'
  2387. security:
  2388. - ApiKeyAuth: []
  2389. summary: Delete a channel
  2390. tags:
  2391. - channel
  2392. get:
  2393. description: Returns detailed information about a specific channel
  2394. parameters:
  2395. - description: Channel ID
  2396. in: path
  2397. name: id
  2398. required: true
  2399. type: integer
  2400. produces:
  2401. - application/json
  2402. responses:
  2403. "200":
  2404. description: OK
  2405. schema:
  2406. allOf:
  2407. - $ref: '#/definitions/middleware.APIResponse'
  2408. - properties:
  2409. data:
  2410. $ref: '#/definitions/model.Channel'
  2411. type: object
  2412. security:
  2413. - ApiKeyAuth: []
  2414. summary: Get a channel by ID
  2415. tags:
  2416. - channel
  2417. put:
  2418. consumes:
  2419. - application/json
  2420. description: Updates an existing channel by its ID
  2421. parameters:
  2422. - description: Channel ID
  2423. in: path
  2424. name: id
  2425. required: true
  2426. type: integer
  2427. - description: Updated channel information
  2428. in: body
  2429. name: channel
  2430. required: true
  2431. schema:
  2432. $ref: '#/definitions/controller.AddChannelRequest'
  2433. produces:
  2434. - application/json
  2435. responses:
  2436. "200":
  2437. description: OK
  2438. schema:
  2439. allOf:
  2440. - $ref: '#/definitions/middleware.APIResponse'
  2441. - properties:
  2442. data:
  2443. $ref: '#/definitions/model.Channel'
  2444. type: object
  2445. security:
  2446. - ApiKeyAuth: []
  2447. summary: Update a channel
  2448. tags:
  2449. - channel
  2450. /api/channel/{id}/{model}:
  2451. get:
  2452. description: Tests a single model in the channel
  2453. parameters:
  2454. - description: Channel ID
  2455. in: path
  2456. name: id
  2457. required: true
  2458. type: integer
  2459. - description: Model name
  2460. in: path
  2461. name: model
  2462. required: true
  2463. type: string
  2464. produces:
  2465. - application/json
  2466. responses:
  2467. "200":
  2468. description: OK
  2469. schema:
  2470. allOf:
  2471. - $ref: '#/definitions/middleware.APIResponse'
  2472. - properties:
  2473. data:
  2474. $ref: '#/definitions/model.ChannelTest'
  2475. type: object
  2476. security:
  2477. - ApiKeyAuth: []
  2478. summary: Test channel model
  2479. tags:
  2480. - channel
  2481. /api/channel/{id}/balance:
  2482. get:
  2483. description: Updates the balance for a single channel
  2484. parameters:
  2485. - description: Channel ID
  2486. in: path
  2487. name: id
  2488. required: true
  2489. type: integer
  2490. produces:
  2491. - application/json
  2492. responses:
  2493. "200":
  2494. description: OK
  2495. schema:
  2496. allOf:
  2497. - $ref: '#/definitions/middleware.APIResponse'
  2498. - properties:
  2499. data:
  2500. type: number
  2501. type: object
  2502. security:
  2503. - ApiKeyAuth: []
  2504. summary: Update channel balance
  2505. tags:
  2506. - channel
  2507. /api/channel/{id}/status:
  2508. post:
  2509. consumes:
  2510. - application/json
  2511. description: Updates the status of a channel by its ID
  2512. parameters:
  2513. - description: Channel ID
  2514. in: path
  2515. name: id
  2516. required: true
  2517. type: integer
  2518. - description: Status information
  2519. in: body
  2520. name: status
  2521. required: true
  2522. schema:
  2523. $ref: '#/definitions/controller.UpdateChannelStatusRequest'
  2524. produces:
  2525. - application/json
  2526. responses:
  2527. "200":
  2528. description: OK
  2529. schema:
  2530. $ref: '#/definitions/middleware.APIResponse'
  2531. security:
  2532. - ApiKeyAuth: []
  2533. summary: Update channel status
  2534. tags:
  2535. - channel
  2536. /api/channel/{id}/test:
  2537. get:
  2538. description: Tests all models in the channel
  2539. parameters:
  2540. - description: Channel ID
  2541. in: path
  2542. name: id
  2543. required: true
  2544. type: integer
  2545. - description: Return success
  2546. in: query
  2547. name: return_success
  2548. type: boolean
  2549. - description: Success body
  2550. in: query
  2551. name: success_body
  2552. type: boolean
  2553. - description: Stream
  2554. in: query
  2555. name: stream
  2556. type: boolean
  2557. produces:
  2558. - application/json
  2559. responses:
  2560. "200":
  2561. description: OK
  2562. schema:
  2563. allOf:
  2564. - $ref: '#/definitions/middleware.APIResponse'
  2565. - properties:
  2566. data:
  2567. items:
  2568. $ref: '#/definitions/controller.TestResult'
  2569. type: array
  2570. type: object
  2571. security:
  2572. - ApiKeyAuth: []
  2573. summary: Test channel models
  2574. tags:
  2575. - channel
  2576. /api/channels/:
  2577. get:
  2578. description: Returns a paginated list of channels with optional filters
  2579. parameters:
  2580. - description: Page number
  2581. in: query
  2582. name: page
  2583. type: integer
  2584. - description: Items per page
  2585. in: query
  2586. name: per_page
  2587. type: integer
  2588. - description: Filter by id
  2589. in: query
  2590. name: id
  2591. type: integer
  2592. - description: Filter by name
  2593. in: query
  2594. name: name
  2595. type: string
  2596. - description: Filter by key
  2597. in: query
  2598. name: key
  2599. type: string
  2600. - description: Filter by channel type
  2601. in: query
  2602. name: channel_type
  2603. type: integer
  2604. - description: Filter by base URL
  2605. in: query
  2606. name: base_url
  2607. type: string
  2608. - description: Order by field
  2609. in: query
  2610. name: order
  2611. type: string
  2612. produces:
  2613. - application/json
  2614. responses:
  2615. "200":
  2616. description: OK
  2617. schema:
  2618. allOf:
  2619. - $ref: '#/definitions/middleware.APIResponse'
  2620. - properties:
  2621. data:
  2622. additionalProperties:
  2623. allOf:
  2624. - {}
  2625. - properties:
  2626. channels:
  2627. items:
  2628. $ref: '#/definitions/model.Channel'
  2629. type: array
  2630. total:
  2631. type: integer
  2632. type: object
  2633. type: object
  2634. type: object
  2635. security:
  2636. - ApiKeyAuth: []
  2637. summary: Get channels with pagination
  2638. tags:
  2639. - channels
  2640. post:
  2641. consumes:
  2642. - application/json
  2643. description: Adds multiple channels in a batch operation
  2644. parameters:
  2645. - description: Channel information
  2646. in: body
  2647. name: channels
  2648. required: true
  2649. schema:
  2650. items:
  2651. $ref: '#/definitions/controller.AddChannelRequest'
  2652. type: array
  2653. produces:
  2654. - application/json
  2655. responses:
  2656. "200":
  2657. description: OK
  2658. schema:
  2659. $ref: '#/definitions/middleware.APIResponse'
  2660. security:
  2661. - ApiKeyAuth: []
  2662. summary: Add multiple channels
  2663. tags:
  2664. - channels
  2665. /api/channels/all:
  2666. get:
  2667. description: Returns a list of all channels without pagination
  2668. produces:
  2669. - application/json
  2670. responses:
  2671. "200":
  2672. description: OK
  2673. schema:
  2674. allOf:
  2675. - $ref: '#/definitions/middleware.APIResponse'
  2676. - properties:
  2677. data:
  2678. items:
  2679. $ref: '#/definitions/model.Channel'
  2680. type: array
  2681. type: object
  2682. security:
  2683. - ApiKeyAuth: []
  2684. summary: Get all channels
  2685. tags:
  2686. - channels
  2687. /api/channels/balance:
  2688. get:
  2689. description: Updates the balance for all channels
  2690. produces:
  2691. - application/json
  2692. responses:
  2693. "200":
  2694. description: OK
  2695. schema:
  2696. $ref: '#/definitions/middleware.APIResponse'
  2697. security:
  2698. - ApiKeyAuth: []
  2699. summary: Update all channels balance
  2700. tags:
  2701. - channel
  2702. /api/channels/batch_delete:
  2703. post:
  2704. consumes:
  2705. - application/json
  2706. description: Deletes multiple channels by their IDs
  2707. parameters:
  2708. - description: Channel IDs
  2709. in: body
  2710. name: ids
  2711. required: true
  2712. schema:
  2713. items:
  2714. type: integer
  2715. type: array
  2716. produces:
  2717. - application/json
  2718. responses:
  2719. "200":
  2720. description: OK
  2721. schema:
  2722. $ref: '#/definitions/middleware.APIResponse'
  2723. security:
  2724. - ApiKeyAuth: []
  2725. summary: Delete multiple channels
  2726. tags:
  2727. - channels
  2728. /api/channels/import/oneapi:
  2729. post:
  2730. description: Imports channels from OneAPI
  2731. parameters:
  2732. - description: Import channel from OneAPI request
  2733. in: body
  2734. name: request
  2735. required: true
  2736. schema:
  2737. $ref: '#/definitions/controller.ImportChannelFromOneAPIRequest'
  2738. produces:
  2739. - application/json
  2740. responses:
  2741. "200":
  2742. description: OK
  2743. schema:
  2744. allOf:
  2745. - $ref: '#/definitions/middleware.APIResponse'
  2746. - properties:
  2747. data:
  2748. items: {}
  2749. type: array
  2750. type: object
  2751. security:
  2752. - ApiKeyAuth: []
  2753. summary: Import channel from OneAPI
  2754. tags:
  2755. - channels
  2756. /api/channels/search:
  2757. get:
  2758. description: Search channels with keyword and optional filters
  2759. parameters:
  2760. - description: Search keyword
  2761. in: query
  2762. name: keyword
  2763. required: true
  2764. type: string
  2765. - description: Page number
  2766. in: query
  2767. name: page
  2768. type: integer
  2769. - description: Items per page
  2770. in: query
  2771. name: per_page
  2772. type: integer
  2773. - description: Filter by id
  2774. in: query
  2775. name: id
  2776. type: integer
  2777. - description: Filter by name
  2778. in: query
  2779. name: name
  2780. type: string
  2781. - description: Filter by key
  2782. in: query
  2783. name: key
  2784. type: string
  2785. - description: Filter by channel type
  2786. in: query
  2787. name: channel_type
  2788. type: integer
  2789. - description: Filter by base URL
  2790. in: query
  2791. name: base_url
  2792. type: string
  2793. - description: Order by field
  2794. in: query
  2795. name: order
  2796. type: string
  2797. produces:
  2798. - application/json
  2799. responses:
  2800. "200":
  2801. description: OK
  2802. schema:
  2803. allOf:
  2804. - $ref: '#/definitions/middleware.APIResponse'
  2805. - properties:
  2806. data:
  2807. additionalProperties:
  2808. allOf:
  2809. - {}
  2810. - properties:
  2811. channels:
  2812. items:
  2813. $ref: '#/definitions/model.Channel'
  2814. type: array
  2815. total:
  2816. type: integer
  2817. type: object
  2818. type: object
  2819. type: object
  2820. security:
  2821. - ApiKeyAuth: []
  2822. summary: Search channels
  2823. tags:
  2824. - channels
  2825. /api/channels/test:
  2826. get:
  2827. description: Tests all channels
  2828. parameters:
  2829. - description: Test disabled
  2830. in: query
  2831. name: test_disabled
  2832. type: boolean
  2833. - description: Return success
  2834. in: query
  2835. name: return_success
  2836. type: boolean
  2837. - description: Success body
  2838. in: query
  2839. name: success_body
  2840. type: boolean
  2841. - description: Stream
  2842. in: query
  2843. name: stream
  2844. type: boolean
  2845. produces:
  2846. - application/json
  2847. responses:
  2848. "200":
  2849. description: OK
  2850. schema:
  2851. allOf:
  2852. - $ref: '#/definitions/middleware.APIResponse'
  2853. - properties:
  2854. data:
  2855. items:
  2856. $ref: '#/definitions/controller.TestResult'
  2857. type: array
  2858. type: object
  2859. security:
  2860. - ApiKeyAuth: []
  2861. summary: Test all channels
  2862. tags:
  2863. - channel
  2864. /api/channels/type_metas:
  2865. get:
  2866. description: Returns metadata for all channel types
  2867. produces:
  2868. - application/json
  2869. responses:
  2870. "200":
  2871. description: OK
  2872. schema:
  2873. allOf:
  2874. - $ref: '#/definitions/middleware.APIResponse'
  2875. - properties:
  2876. data:
  2877. additionalProperties:
  2878. $ref: '#/definitions/adaptors.AdaptorMeta'
  2879. type: object
  2880. type: object
  2881. security:
  2882. - ApiKeyAuth: []
  2883. summary: Get channel type metadata
  2884. tags:
  2885. - channels
  2886. /api/dashboard/:
  2887. get:
  2888. description: Returns the general dashboard data including usage statistics and
  2889. metrics
  2890. parameters:
  2891. - description: Channel ID
  2892. in: query
  2893. name: channel
  2894. type: integer
  2895. - description: Model name
  2896. in: query
  2897. name: model
  2898. type: string
  2899. - description: Start second timestamp
  2900. in: query
  2901. name: start_timestamp
  2902. type: integer
  2903. - description: End second timestamp
  2904. in: query
  2905. name: end_timestamp
  2906. type: integer
  2907. - description: Timezone, default is Local
  2908. in: query
  2909. name: timezone
  2910. type: string
  2911. - description: Time span type (minute, hour, day, month)
  2912. in: query
  2913. name: timespan
  2914. type: string
  2915. produces:
  2916. - application/json
  2917. responses:
  2918. "200":
  2919. description: OK
  2920. schema:
  2921. allOf:
  2922. - $ref: '#/definitions/middleware.APIResponse'
  2923. - properties:
  2924. data:
  2925. $ref: '#/definitions/model.DashboardResponse'
  2926. type: object
  2927. security:
  2928. - ApiKeyAuth: []
  2929. summary: Get dashboard data
  2930. tags:
  2931. - dashboard
  2932. /api/dashboard/{group}:
  2933. get:
  2934. description: Returns dashboard data and metrics specific to the given group
  2935. parameters:
  2936. - description: Group
  2937. in: path
  2938. name: group
  2939. required: true
  2940. type: string
  2941. - description: Token name
  2942. in: query
  2943. name: token_name
  2944. type: string
  2945. - description: Model or *
  2946. in: query
  2947. name: model
  2948. type: string
  2949. - description: Start second timestamp
  2950. in: query
  2951. name: start_timestamp
  2952. type: integer
  2953. - description: End second timestamp
  2954. in: query
  2955. name: end_timestamp
  2956. type: integer
  2957. - description: Timezone, default is Local
  2958. in: query
  2959. name: timezone
  2960. type: string
  2961. - description: Time span type (minute, hour, day, month)
  2962. in: query
  2963. name: timespan
  2964. type: string
  2965. produces:
  2966. - application/json
  2967. responses:
  2968. "200":
  2969. description: OK
  2970. schema:
  2971. allOf:
  2972. - $ref: '#/definitions/middleware.APIResponse'
  2973. - properties:
  2974. data:
  2975. $ref: '#/definitions/model.GroupDashboardResponse'
  2976. type: object
  2977. security:
  2978. - ApiKeyAuth: []
  2979. summary: Get dashboard data for a specific group
  2980. tags:
  2981. - dashboard
  2982. /api/dashboard/{group}/models:
  2983. get:
  2984. description: Returns model-specific metrics and usage data for the given group
  2985. parameters:
  2986. - description: Group
  2987. in: path
  2988. name: group
  2989. required: true
  2990. type: string
  2991. produces:
  2992. - application/json
  2993. responses:
  2994. "200":
  2995. description: OK
  2996. schema:
  2997. allOf:
  2998. - $ref: '#/definitions/middleware.APIResponse'
  2999. - properties:
  3000. data:
  3001. items:
  3002. $ref: '#/definitions/controller.GroupModel'
  3003. type: array
  3004. type: object
  3005. security:
  3006. - ApiKeyAuth: []
  3007. summary: Get model usage data for a specific group
  3008. tags:
  3009. - dashboard
  3010. /api/dashboardv2/:
  3011. get:
  3012. description: Returns model-specific metrics and usage data for the given channel
  3013. parameters:
  3014. - description: Channel ID
  3015. in: query
  3016. name: channel
  3017. type: integer
  3018. - description: Model name
  3019. in: query
  3020. name: model
  3021. type: string
  3022. - description: Start timestamp
  3023. in: query
  3024. name: start_timestamp
  3025. type: integer
  3026. - description: End timestamp
  3027. in: query
  3028. name: end_timestamp
  3029. type: integer
  3030. - description: Timezone, default is Local
  3031. in: query
  3032. name: timezone
  3033. type: string
  3034. - description: Time span type (minute, hour, day, month)
  3035. in: query
  3036. name: timespan
  3037. type: string
  3038. produces:
  3039. - application/json
  3040. responses:
  3041. "200":
  3042. description: OK
  3043. schema:
  3044. allOf:
  3045. - $ref: '#/definitions/middleware.APIResponse'
  3046. - properties:
  3047. data:
  3048. items:
  3049. $ref: '#/definitions/model.TimeSummaryDataV2'
  3050. type: array
  3051. type: object
  3052. security:
  3053. - ApiKeyAuth: []
  3054. summary: Get model usage data for a specific channel
  3055. tags:
  3056. - dashboard
  3057. /api/dashboardv2/{group}:
  3058. get:
  3059. description: Returns model-specific metrics and usage data for the given group
  3060. parameters:
  3061. - description: Group
  3062. in: path
  3063. name: group
  3064. required: true
  3065. type: string
  3066. - description: Token name
  3067. in: query
  3068. name: token_name
  3069. type: string
  3070. - description: Model name
  3071. in: query
  3072. name: model
  3073. type: string
  3074. - description: Start timestamp
  3075. in: query
  3076. name: start_timestamp
  3077. type: integer
  3078. - description: End timestamp
  3079. in: query
  3080. name: end_timestamp
  3081. type: integer
  3082. - description: Timezone, default is Local
  3083. in: query
  3084. name: timezone
  3085. type: string
  3086. - description: Time span type (minute, hour, day, month)
  3087. in: query
  3088. name: timespan
  3089. type: string
  3090. produces:
  3091. - application/json
  3092. responses:
  3093. "200":
  3094. description: OK
  3095. schema:
  3096. allOf:
  3097. - $ref: '#/definitions/middleware.APIResponse'
  3098. - properties:
  3099. data:
  3100. items:
  3101. $ref: '#/definitions/model.TimeSummaryDataV2'
  3102. type: array
  3103. type: object
  3104. security:
  3105. - ApiKeyAuth: []
  3106. summary: Get model usage data for a specific group
  3107. tags:
  3108. - dashboard
  3109. /api/embedmcp/:
  3110. get:
  3111. consumes:
  3112. - application/json
  3113. description: Get embed mcp
  3114. produces:
  3115. - application/json
  3116. responses:
  3117. "200":
  3118. description: OK
  3119. schema:
  3120. items:
  3121. $ref: '#/definitions/controller.EmbedMCP'
  3122. type: array
  3123. security:
  3124. - ApiKeyAuth: []
  3125. summary: Get embed mcp
  3126. tags:
  3127. - embedmcp
  3128. post:
  3129. consumes:
  3130. - application/json
  3131. description: Save embed mcp
  3132. parameters:
  3133. - description: Save embed mcp request
  3134. in: body
  3135. name: body
  3136. required: true
  3137. schema:
  3138. $ref: '#/definitions/controller.SaveEmbedMCPRequest'
  3139. produces:
  3140. - application/json
  3141. responses:
  3142. "200":
  3143. description: OK
  3144. security:
  3145. - ApiKeyAuth: []
  3146. summary: Save embed mcp
  3147. tags:
  3148. - embedmcp
  3149. /api/group/{group}:
  3150. delete:
  3151. description: Deletes a group by its name
  3152. parameters:
  3153. - description: Group name
  3154. in: path
  3155. name: group
  3156. required: true
  3157. type: string
  3158. produces:
  3159. - application/json
  3160. responses:
  3161. "200":
  3162. description: OK
  3163. schema:
  3164. $ref: '#/definitions/middleware.APIResponse'
  3165. security:
  3166. - ApiKeyAuth: []
  3167. summary: Delete a group
  3168. tags:
  3169. - group
  3170. get:
  3171. description: Returns detailed information about a specific group
  3172. parameters:
  3173. - description: Group name
  3174. in: path
  3175. name: group
  3176. required: true
  3177. type: string
  3178. produces:
  3179. - application/json
  3180. responses:
  3181. "200":
  3182. description: OK
  3183. schema:
  3184. allOf:
  3185. - $ref: '#/definitions/middleware.APIResponse'
  3186. - properties:
  3187. data:
  3188. $ref: '#/definitions/controller.GroupResponse'
  3189. type: object
  3190. security:
  3191. - ApiKeyAuth: []
  3192. summary: Get a group
  3193. tags:
  3194. - group
  3195. post:
  3196. consumes:
  3197. - application/json
  3198. description: Creates a new group with the given information
  3199. parameters:
  3200. - description: Group name
  3201. in: path
  3202. name: group
  3203. required: true
  3204. type: string
  3205. - description: Group information
  3206. in: body
  3207. name: data
  3208. required: true
  3209. schema:
  3210. $ref: '#/definitions/controller.CreateGroupRequest'
  3211. produces:
  3212. - application/json
  3213. responses:
  3214. "200":
  3215. description: OK
  3216. schema:
  3217. allOf:
  3218. - $ref: '#/definitions/middleware.APIResponse'
  3219. - properties:
  3220. data:
  3221. $ref: '#/definitions/model.Group'
  3222. type: object
  3223. security:
  3224. - ApiKeyAuth: []
  3225. summary: Create a new group
  3226. tags:
  3227. - group
  3228. put:
  3229. consumes:
  3230. - application/json
  3231. description: Updates an existing group with the given information
  3232. parameters:
  3233. - description: Group name
  3234. in: path
  3235. name: group
  3236. required: true
  3237. type: string
  3238. - description: Updated group information
  3239. in: body
  3240. name: data
  3241. required: true
  3242. schema:
  3243. $ref: '#/definitions/controller.CreateGroupRequest'
  3244. produces:
  3245. - application/json
  3246. responses:
  3247. "200":
  3248. description: OK
  3249. schema:
  3250. allOf:
  3251. - $ref: '#/definitions/middleware.APIResponse'
  3252. - properties:
  3253. data:
  3254. $ref: '#/definitions/model.Group'
  3255. type: object
  3256. security:
  3257. - ApiKeyAuth: []
  3258. summary: Update a group
  3259. tags:
  3260. - group
  3261. /api/group/{group}/mcp:
  3262. get:
  3263. description: Get MCPs by group
  3264. parameters:
  3265. - description: Group ID
  3266. in: path
  3267. name: group
  3268. required: true
  3269. type: string
  3270. - description: Page
  3271. in: query
  3272. name: page
  3273. type: integer
  3274. - description: Per Page
  3275. in: query
  3276. name: per_page
  3277. type: integer
  3278. - description: MCP ID
  3279. in: query
  3280. name: id
  3281. type: string
  3282. - description: hosted or local
  3283. in: query
  3284. name: type
  3285. type: string
  3286. - description: Keyword
  3287. in: query
  3288. name: keyword
  3289. type: string
  3290. produces:
  3291. - application/json
  3292. responses:
  3293. "200":
  3294. description: OK
  3295. schema:
  3296. allOf:
  3297. - $ref: '#/definitions/middleware.APIResponse'
  3298. - properties:
  3299. data:
  3300. items:
  3301. $ref: '#/definitions/controller.GroupPublicMCPResponse'
  3302. type: array
  3303. type: object
  3304. security:
  3305. - ApiKeyAuth: []
  3306. summary: Get MCPs by group
  3307. tags:
  3308. - mcp
  3309. - group
  3310. /api/group/{group}/mcp/{id}:
  3311. get:
  3312. description: Get a specific MCP by its ID
  3313. parameters:
  3314. - description: Group ID
  3315. in: path
  3316. name: group
  3317. required: true
  3318. type: string
  3319. - description: MCP ID
  3320. in: path
  3321. name: id
  3322. required: true
  3323. type: string
  3324. produces:
  3325. - application/json
  3326. responses:
  3327. "200":
  3328. description: OK
  3329. schema:
  3330. allOf:
  3331. - $ref: '#/definitions/middleware.APIResponse'
  3332. - properties:
  3333. data:
  3334. $ref: '#/definitions/controller.GroupPublicMCPDetailResponse'
  3335. type: object
  3336. security:
  3337. - ApiKeyAuth: []
  3338. summary: Get MCP by ID
  3339. tags:
  3340. - mcp
  3341. - group
  3342. /api/group/{group}/model_config/{model}:
  3343. delete:
  3344. description: Delete group model config
  3345. parameters:
  3346. - description: Group name
  3347. in: path
  3348. name: group
  3349. required: true
  3350. type: string
  3351. - description: Model name
  3352. in: path
  3353. name: model
  3354. required: true
  3355. type: string
  3356. produces:
  3357. - application/json
  3358. responses:
  3359. "200":
  3360. description: OK
  3361. schema:
  3362. $ref: '#/definitions/middleware.APIResponse'
  3363. security:
  3364. - ApiKeyAuth: []
  3365. summary: Delete group model config
  3366. tags:
  3367. - group
  3368. get:
  3369. description: Get group model config
  3370. parameters:
  3371. - description: Group name
  3372. in: path
  3373. name: group
  3374. required: true
  3375. type: string
  3376. - description: Model name
  3377. in: path
  3378. name: model
  3379. required: true
  3380. type: string
  3381. produces:
  3382. - application/json
  3383. responses:
  3384. "200":
  3385. description: OK
  3386. schema:
  3387. allOf:
  3388. - $ref: '#/definitions/middleware.APIResponse'
  3389. - properties:
  3390. data:
  3391. $ref: '#/definitions/model.GroupModelConfig'
  3392. type: object
  3393. security:
  3394. - ApiKeyAuth: []
  3395. summary: Get group model config
  3396. tags:
  3397. - group
  3398. post:
  3399. consumes:
  3400. - application/json
  3401. description: Save group model config
  3402. parameters:
  3403. - description: Group name
  3404. in: path
  3405. name: group
  3406. required: true
  3407. type: string
  3408. - description: Group model config information
  3409. in: body
  3410. name: data
  3411. required: true
  3412. schema:
  3413. $ref: '#/definitions/controller.SaveGroupModelConfigRequest'
  3414. produces:
  3415. - application/json
  3416. responses:
  3417. "200":
  3418. description: OK
  3419. schema:
  3420. $ref: '#/definitions/middleware.APIResponse'
  3421. security:
  3422. - ApiKeyAuth: []
  3423. summary: Save group model config
  3424. tags:
  3425. - group
  3426. put:
  3427. consumes:
  3428. - application/json
  3429. description: Update group model config
  3430. parameters:
  3431. - description: Group name
  3432. in: path
  3433. name: group
  3434. required: true
  3435. type: string
  3436. - description: Model name
  3437. in: path
  3438. name: model
  3439. required: true
  3440. type: string
  3441. - description: Group model config information
  3442. in: body
  3443. name: data
  3444. required: true
  3445. schema:
  3446. $ref: '#/definitions/controller.SaveGroupModelConfigRequest'
  3447. produces:
  3448. - application/json
  3449. responses:
  3450. "200":
  3451. description: OK
  3452. schema:
  3453. $ref: '#/definitions/middleware.APIResponse'
  3454. security:
  3455. - ApiKeyAuth: []
  3456. summary: Update group model config
  3457. tags:
  3458. - group
  3459. /api/group/{group}/model_configs:
  3460. delete:
  3461. description: Delete group model configs
  3462. parameters:
  3463. - description: Group name
  3464. in: path
  3465. name: group
  3466. required: true
  3467. type: string
  3468. - description: Model names
  3469. in: body
  3470. name: models
  3471. required: true
  3472. schema:
  3473. items:
  3474. type: string
  3475. type: array
  3476. produces:
  3477. - application/json
  3478. responses:
  3479. "200":
  3480. description: OK
  3481. schema:
  3482. $ref: '#/definitions/middleware.APIResponse'
  3483. security:
  3484. - ApiKeyAuth: []
  3485. summary: Delete group model configs
  3486. tags:
  3487. - group
  3488. get:
  3489. description: Get group model configs
  3490. parameters:
  3491. - description: Group name
  3492. in: path
  3493. name: group
  3494. required: true
  3495. type: string
  3496. produces:
  3497. - application/json
  3498. responses:
  3499. "200":
  3500. description: OK
  3501. schema:
  3502. allOf:
  3503. - $ref: '#/definitions/middleware.APIResponse'
  3504. - properties:
  3505. data:
  3506. items:
  3507. $ref: '#/definitions/model.GroupModelConfig'
  3508. type: array
  3509. type: object
  3510. security:
  3511. - ApiKeyAuth: []
  3512. summary: Get group model configs
  3513. tags:
  3514. - group
  3515. post:
  3516. consumes:
  3517. - application/json
  3518. description: Save group model configs
  3519. parameters:
  3520. - description: Group name
  3521. in: path
  3522. name: group
  3523. required: true
  3524. type: string
  3525. - description: Group model config information
  3526. in: body
  3527. name: data
  3528. required: true
  3529. schema:
  3530. items:
  3531. $ref: '#/definitions/controller.SaveGroupModelConfigRequest'
  3532. type: array
  3533. produces:
  3534. - application/json
  3535. responses:
  3536. "200":
  3537. description: OK
  3538. schema:
  3539. $ref: '#/definitions/middleware.APIResponse'
  3540. security:
  3541. - ApiKeyAuth: []
  3542. summary: Save group model configs
  3543. tags:
  3544. - group
  3545. put:
  3546. consumes:
  3547. - application/json
  3548. description: Update group model configs
  3549. parameters:
  3550. - description: Group name
  3551. in: path
  3552. name: group
  3553. required: true
  3554. type: string
  3555. - description: Group model config information
  3556. in: body
  3557. name: data
  3558. required: true
  3559. schema:
  3560. items:
  3561. $ref: '#/definitions/controller.SaveGroupModelConfigRequest'
  3562. type: array
  3563. produces:
  3564. - application/json
  3565. responses:
  3566. "200":
  3567. description: OK
  3568. schema:
  3569. $ref: '#/definitions/middleware.APIResponse'
  3570. security:
  3571. - ApiKeyAuth: []
  3572. summary: Update group model configs
  3573. tags:
  3574. - group
  3575. /api/group/{group}/rpm_ratio:
  3576. post:
  3577. consumes:
  3578. - application/json
  3579. description: Updates the RPM (Requests Per Minute) ratio for a group
  3580. parameters:
  3581. - description: Group name
  3582. in: path
  3583. name: group
  3584. required: true
  3585. type: string
  3586. - description: RPM ratio information
  3587. in: body
  3588. name: data
  3589. required: true
  3590. schema:
  3591. $ref: '#/definitions/controller.UpdateGroupRPMRatioRequest'
  3592. produces:
  3593. - application/json
  3594. responses:
  3595. "200":
  3596. description: OK
  3597. schema:
  3598. $ref: '#/definitions/middleware.APIResponse'
  3599. security:
  3600. - ApiKeyAuth: []
  3601. summary: Update group RPM ratio
  3602. tags:
  3603. - group
  3604. /api/group/{group}/status:
  3605. post:
  3606. consumes:
  3607. - application/json
  3608. description: Updates the status of a group
  3609. parameters:
  3610. - description: Group name
  3611. in: path
  3612. name: group
  3613. required: true
  3614. type: string
  3615. - description: Status information
  3616. in: body
  3617. name: status
  3618. required: true
  3619. schema:
  3620. $ref: '#/definitions/controller.UpdateGroupStatusRequest'
  3621. produces:
  3622. - application/json
  3623. responses:
  3624. "200":
  3625. description: OK
  3626. schema:
  3627. $ref: '#/definitions/middleware.APIResponse'
  3628. security:
  3629. - ApiKeyAuth: []
  3630. summary: Update group status
  3631. tags:
  3632. - group
  3633. /api/group/{group}/tpm_ratio:
  3634. post:
  3635. consumes:
  3636. - application/json
  3637. description: Updates the TPM (Tokens Per Minute) ratio for a group
  3638. parameters:
  3639. - description: Group name
  3640. in: path
  3641. name: group
  3642. required: true
  3643. type: string
  3644. - description: TPM ratio information
  3645. in: body
  3646. name: data
  3647. required: true
  3648. schema:
  3649. $ref: '#/definitions/controller.UpdateGroupTPMRatioRequest'
  3650. produces:
  3651. - application/json
  3652. responses:
  3653. "200":
  3654. description: OK
  3655. schema:
  3656. $ref: '#/definitions/middleware.APIResponse'
  3657. security:
  3658. - ApiKeyAuth: []
  3659. summary: Update group TPM ratio
  3660. tags:
  3661. - group
  3662. /api/groups/:
  3663. get:
  3664. description: Returns a list of all groups with pagination
  3665. parameters:
  3666. - description: Page number
  3667. in: query
  3668. name: page
  3669. type: integer
  3670. - description: Items per page
  3671. in: query
  3672. name: per_page
  3673. type: integer
  3674. produces:
  3675. - application/json
  3676. responses:
  3677. "200":
  3678. description: OK
  3679. schema:
  3680. allOf:
  3681. - $ref: '#/definitions/middleware.APIResponse'
  3682. - properties:
  3683. data:
  3684. additionalProperties:
  3685. allOf:
  3686. - {}
  3687. - properties:
  3688. groups:
  3689. items:
  3690. $ref: '#/definitions/controller.GroupResponse'
  3691. type: array
  3692. total:
  3693. type: integer
  3694. type: object
  3695. type: object
  3696. type: object
  3697. security:
  3698. - ApiKeyAuth: []
  3699. summary: Get all groups
  3700. tags:
  3701. - groups
  3702. /api/groups/batch_delete:
  3703. post:
  3704. consumes:
  3705. - application/json
  3706. description: Deletes multiple groups by their IDs
  3707. parameters:
  3708. - description: Group IDs
  3709. in: body
  3710. name: ids
  3711. required: true
  3712. schema:
  3713. items:
  3714. type: string
  3715. type: array
  3716. produces:
  3717. - application/json
  3718. responses:
  3719. "200":
  3720. description: OK
  3721. schema:
  3722. $ref: '#/definitions/middleware.APIResponse'
  3723. security:
  3724. - ApiKeyAuth: []
  3725. summary: Delete multiple groups
  3726. tags:
  3727. - groups
  3728. /api/groups/batch_status:
  3729. post:
  3730. consumes:
  3731. - application/json
  3732. description: Updates the status of multiple groups
  3733. parameters:
  3734. - description: Group IDs and status
  3735. in: body
  3736. name: data
  3737. required: true
  3738. schema:
  3739. $ref: '#/definitions/controller.UpdateGroupsStatusRequest'
  3740. produces:
  3741. - application/json
  3742. responses:
  3743. "200":
  3744. description: OK
  3745. schema:
  3746. $ref: '#/definitions/middleware.APIResponse'
  3747. security:
  3748. - ApiKeyAuth: []
  3749. summary: Update multiple groups status
  3750. tags:
  3751. - groups
  3752. /api/groups/ip_groups:
  3753. get:
  3754. description: Get IP group list
  3755. parameters:
  3756. - description: Threshold
  3757. in: query
  3758. name: threshold
  3759. type: integer
  3760. - description: Start timestamp
  3761. in: query
  3762. name: start_timestamp
  3763. type: integer
  3764. - description: End timestamp
  3765. in: query
  3766. name: end_timestamp
  3767. type: integer
  3768. produces:
  3769. - application/json
  3770. responses:
  3771. "200":
  3772. description: OK
  3773. schema:
  3774. allOf:
  3775. - $ref: '#/definitions/middleware.APIResponse'
  3776. - properties:
  3777. data:
  3778. additionalProperties:
  3779. items:
  3780. type: string
  3781. type: array
  3782. type: object
  3783. type: object
  3784. security:
  3785. - ApiKeyAuth: []
  3786. summary: Get IP group list
  3787. tags:
  3788. - groups
  3789. /api/groups/search:
  3790. get:
  3791. description: Search groups with keyword and pagination
  3792. parameters:
  3793. - description: Search keyword
  3794. in: query
  3795. name: keyword
  3796. required: true
  3797. type: string
  3798. - description: Page number
  3799. in: query
  3800. name: page
  3801. type: integer
  3802. - description: Items per page
  3803. in: query
  3804. name: per_page
  3805. type: integer
  3806. - description: Status
  3807. in: query
  3808. name: status
  3809. type: integer
  3810. - description: Order
  3811. in: query
  3812. name: order
  3813. type: string
  3814. produces:
  3815. - application/json
  3816. responses:
  3817. "200":
  3818. description: OK
  3819. schema:
  3820. allOf:
  3821. - $ref: '#/definitions/middleware.APIResponse'
  3822. - properties:
  3823. data:
  3824. additionalProperties:
  3825. allOf:
  3826. - {}
  3827. - properties:
  3828. groups:
  3829. items:
  3830. $ref: '#/definitions/controller.GroupResponse'
  3831. type: array
  3832. total:
  3833. type: integer
  3834. type: object
  3835. type: object
  3836. type: object
  3837. security:
  3838. - ApiKeyAuth: []
  3839. summary: Search groups
  3840. tags:
  3841. - groups
  3842. /api/log/{group}:
  3843. get:
  3844. description: Get logs for a specific group
  3845. parameters:
  3846. - description: Group name
  3847. in: path
  3848. name: group
  3849. required: true
  3850. type: string
  3851. - description: Page number
  3852. in: query
  3853. name: page
  3854. type: integer
  3855. - description: Items per page
  3856. in: query
  3857. name: per_page
  3858. type: integer
  3859. - description: Start timestamp (milliseconds)
  3860. in: query
  3861. name: start_timestamp
  3862. type: integer
  3863. - description: End timestamp (milliseconds)
  3864. in: query
  3865. name: end_timestamp
  3866. type: integer
  3867. - description: Token name
  3868. in: query
  3869. name: token_name
  3870. type: string
  3871. - description: Model name
  3872. in: query
  3873. name: model_name
  3874. type: string
  3875. - description: Channel ID
  3876. in: query
  3877. name: channel
  3878. type: integer
  3879. - description: Token ID
  3880. in: query
  3881. name: token_id
  3882. type: integer
  3883. - description: Order
  3884. in: query
  3885. name: order
  3886. type: string
  3887. - description: Request ID
  3888. in: query
  3889. name: request_id
  3890. type: string
  3891. - description: Status code type
  3892. in: query
  3893. name: code_type
  3894. type: string
  3895. - description: Status code
  3896. in: query
  3897. name: code
  3898. type: integer
  3899. - description: With body
  3900. in: query
  3901. name: with_body
  3902. type: boolean
  3903. - description: IP
  3904. in: query
  3905. name: ip
  3906. type: string
  3907. - description: User
  3908. in: query
  3909. name: user
  3910. type: string
  3911. produces:
  3912. - application/json
  3913. responses:
  3914. "200":
  3915. description: OK
  3916. schema:
  3917. allOf:
  3918. - $ref: '#/definitions/middleware.APIResponse'
  3919. - properties:
  3920. data:
  3921. $ref: '#/definitions/model.GetGroupLogsResult'
  3922. type: object
  3923. security:
  3924. - ApiKeyAuth: []
  3925. summary: Get group logs
  3926. tags:
  3927. - log
  3928. /api/log/{group}/detail/{log_id}:
  3929. get:
  3930. description: Get detailed information about a specific log entry in a group
  3931. parameters:
  3932. - description: Group name
  3933. in: path
  3934. name: group
  3935. required: true
  3936. type: string
  3937. - description: Log ID
  3938. in: path
  3939. name: log_id
  3940. required: true
  3941. type: string
  3942. produces:
  3943. - application/json
  3944. responses:
  3945. "200":
  3946. description: OK
  3947. schema:
  3948. allOf:
  3949. - $ref: '#/definitions/middleware.APIResponse'
  3950. - properties:
  3951. data:
  3952. $ref: '#/definitions/model.RequestDetail'
  3953. type: object
  3954. security:
  3955. - ApiKeyAuth: []
  3956. summary: Get group log detail
  3957. tags:
  3958. - log
  3959. /api/log/{group}/search:
  3960. get:
  3961. description: Search logs for a specific group with filters
  3962. parameters:
  3963. - description: Group name
  3964. in: path
  3965. name: group
  3966. required: true
  3967. type: string
  3968. - description: Keyword
  3969. in: query
  3970. name: keyword
  3971. type: string
  3972. - description: Page number
  3973. in: query
  3974. name: page
  3975. type: integer
  3976. - description: Items per page
  3977. in: query
  3978. name: per_page
  3979. type: integer
  3980. - description: Start timestamp (milliseconds)
  3981. in: query
  3982. name: start_timestamp
  3983. type: integer
  3984. - description: End timestamp (milliseconds)
  3985. in: query
  3986. name: end_timestamp
  3987. type: integer
  3988. - description: Filter by token name
  3989. in: query
  3990. name: token_name
  3991. type: string
  3992. - description: Filter by model name
  3993. in: query
  3994. name: model_name
  3995. type: string
  3996. - description: Filter by token id
  3997. in: query
  3998. name: token_id
  3999. type: integer
  4000. - description: Order
  4001. in: query
  4002. name: order
  4003. type: string
  4004. - description: Request ID
  4005. in: query
  4006. name: request_id
  4007. type: string
  4008. - description: Status code type
  4009. in: query
  4010. name: code_type
  4011. type: string
  4012. - description: Status code
  4013. in: query
  4014. name: code
  4015. type: integer
  4016. - description: With body
  4017. in: query
  4018. name: with_body
  4019. type: boolean
  4020. - description: IP
  4021. in: query
  4022. name: ip
  4023. type: string
  4024. - description: User
  4025. in: query
  4026. name: user
  4027. type: string
  4028. produces:
  4029. - application/json
  4030. responses:
  4031. "200":
  4032. description: OK
  4033. schema:
  4034. allOf:
  4035. - $ref: '#/definitions/middleware.APIResponse'
  4036. - properties:
  4037. data:
  4038. $ref: '#/definitions/model.GetGroupLogsResult'
  4039. type: object
  4040. security:
  4041. - ApiKeyAuth: []
  4042. summary: Search group logs
  4043. tags:
  4044. - log
  4045. /api/logs/:
  4046. delete:
  4047. description: Deletes logs older than the specified retention period
  4048. parameters:
  4049. - description: Timestamp (milliseconds)
  4050. in: query
  4051. name: timestamp
  4052. required: true
  4053. type: integer
  4054. produces:
  4055. - application/json
  4056. responses:
  4057. "200":
  4058. description: OK
  4059. schema:
  4060. allOf:
  4061. - $ref: '#/definitions/middleware.APIResponse'
  4062. - properties:
  4063. data:
  4064. type: integer
  4065. type: object
  4066. security:
  4067. - ApiKeyAuth: []
  4068. summary: Delete historical logs
  4069. tags:
  4070. - logs
  4071. get:
  4072. description: Returns a paginated list of all logs with optional filters
  4073. parameters:
  4074. - description: Page number
  4075. in: query
  4076. name: page
  4077. type: integer
  4078. - description: Items per page
  4079. in: query
  4080. name: per_page
  4081. type: integer
  4082. - description: Start timestamp (milliseconds)
  4083. in: query
  4084. name: start_timestamp
  4085. type: integer
  4086. - description: End timestamp (milliseconds)
  4087. in: query
  4088. name: end_timestamp
  4089. type: integer
  4090. - description: Model name
  4091. in: query
  4092. name: model_name
  4093. type: string
  4094. - description: Channel ID
  4095. in: query
  4096. name: channel
  4097. type: integer
  4098. - description: Order
  4099. in: query
  4100. name: order
  4101. type: string
  4102. - description: Request ID
  4103. in: query
  4104. name: request_id
  4105. type: string
  4106. - description: Status code type
  4107. in: query
  4108. name: code_type
  4109. type: string
  4110. - description: Status code
  4111. in: query
  4112. name: code
  4113. type: integer
  4114. - description: With body
  4115. in: query
  4116. name: with_body
  4117. type: boolean
  4118. - description: IP
  4119. in: query
  4120. name: ip
  4121. type: string
  4122. - description: User
  4123. in: query
  4124. name: user
  4125. type: string
  4126. produces:
  4127. - application/json
  4128. responses:
  4129. "200":
  4130. description: OK
  4131. schema:
  4132. allOf:
  4133. - $ref: '#/definitions/middleware.APIResponse'
  4134. - properties:
  4135. data:
  4136. $ref: '#/definitions/model.GetLogsResult'
  4137. type: object
  4138. security:
  4139. - ApiKeyAuth: []
  4140. summary: Get all logs
  4141. tags:
  4142. - logs
  4143. /api/logs/consume_error:
  4144. get:
  4145. description: Search for logs with consumption errors
  4146. parameters:
  4147. - description: Page number
  4148. in: query
  4149. name: page
  4150. type: integer
  4151. - description: Items per page
  4152. in: query
  4153. name: per_page
  4154. type: integer
  4155. - description: Start timestamp (milliseconds)
  4156. in: query
  4157. name: start_timestamp
  4158. type: integer
  4159. - description: End timestamp (milliseconds)
  4160. in: query
  4161. name: end_timestamp
  4162. type: integer
  4163. - description: Keyword
  4164. in: query
  4165. name: keyword
  4166. type: string
  4167. - description: Group
  4168. in: query
  4169. name: group
  4170. type: string
  4171. - description: Token name
  4172. in: query
  4173. name: token_name
  4174. type: string
  4175. - description: Model name
  4176. in: query
  4177. name: model_name
  4178. type: string
  4179. - description: Content
  4180. in: query
  4181. name: content
  4182. type: string
  4183. - description: Token ID
  4184. in: query
  4185. name: token_id
  4186. type: integer
  4187. - description: Order
  4188. in: query
  4189. name: order
  4190. type: string
  4191. - description: Request ID
  4192. in: query
  4193. name: request_id
  4194. type: string
  4195. produces:
  4196. - application/json
  4197. responses:
  4198. "200":
  4199. description: OK
  4200. schema:
  4201. allOf:
  4202. - $ref: '#/definitions/middleware.APIResponse'
  4203. - properties:
  4204. data:
  4205. additionalProperties:
  4206. allOf:
  4207. - {}
  4208. - properties:
  4209. logs:
  4210. items:
  4211. $ref: '#/definitions/model.RequestDetail'
  4212. type: array
  4213. total:
  4214. type: integer
  4215. type: object
  4216. type: object
  4217. type: object
  4218. security:
  4219. - ApiKeyAuth: []
  4220. summary: Search consumption errors
  4221. tags:
  4222. - logs
  4223. /api/logs/detail/{log_id}:
  4224. get:
  4225. description: Get detailed information about a specific log entry
  4226. parameters:
  4227. - description: Log ID
  4228. in: path
  4229. name: log_id
  4230. required: true
  4231. type: string
  4232. produces:
  4233. - application/json
  4234. responses:
  4235. "200":
  4236. description: OK
  4237. schema:
  4238. allOf:
  4239. - $ref: '#/definitions/middleware.APIResponse'
  4240. - properties:
  4241. data:
  4242. $ref: '#/definitions/model.RequestDetail'
  4243. type: object
  4244. security:
  4245. - ApiKeyAuth: []
  4246. summary: Get log detail
  4247. tags:
  4248. - logs
  4249. /api/logs/search:
  4250. get:
  4251. description: Search logs with various filters
  4252. parameters:
  4253. - description: Keyword
  4254. in: query
  4255. name: keyword
  4256. type: string
  4257. - description: Page number
  4258. in: query
  4259. name: page
  4260. type: integer
  4261. - description: Items per page
  4262. in: query
  4263. name: per_page
  4264. type: integer
  4265. - description: Start timestamp (milliseconds)
  4266. in: query
  4267. name: start_timestamp
  4268. type: integer
  4269. - description: End timestamp (milliseconds)
  4270. in: query
  4271. name: end_timestamp
  4272. type: integer
  4273. - description: Filter by model name
  4274. in: query
  4275. name: model_name
  4276. type: string
  4277. - description: Filter by channel
  4278. in: query
  4279. name: channel
  4280. type: integer
  4281. - description: Filter by token id
  4282. in: query
  4283. name: token_id
  4284. type: integer
  4285. - description: Order
  4286. in: query
  4287. name: order
  4288. type: string
  4289. - description: Request ID
  4290. in: query
  4291. name: request_id
  4292. type: string
  4293. - description: Status code type
  4294. in: query
  4295. name: code_type
  4296. type: string
  4297. - description: Status code
  4298. in: query
  4299. name: code
  4300. type: integer
  4301. - description: With body
  4302. in: query
  4303. name: with_body
  4304. type: boolean
  4305. - description: IP
  4306. in: query
  4307. name: ip
  4308. type: string
  4309. - description: User
  4310. in: query
  4311. name: user
  4312. type: string
  4313. produces:
  4314. - application/json
  4315. responses:
  4316. "200":
  4317. description: OK
  4318. schema:
  4319. allOf:
  4320. - $ref: '#/definitions/middleware.APIResponse'
  4321. - properties:
  4322. data:
  4323. $ref: '#/definitions/model.GetLogsResult'
  4324. type: object
  4325. security:
  4326. - ApiKeyAuth: []
  4327. summary: Search logs
  4328. tags:
  4329. - logs
  4330. /api/mcp/group/{group}:
  4331. get:
  4332. description: Get a list of Group MCPs with pagination and filtering
  4333. parameters:
  4334. - description: Group ID
  4335. in: path
  4336. name: group
  4337. required: true
  4338. type: string
  4339. - description: Page number
  4340. in: query
  4341. name: page
  4342. type: integer
  4343. - description: Items per page
  4344. in: query
  4345. name: per_page
  4346. type: integer
  4347. - description: MCP id
  4348. in: query
  4349. name: id
  4350. type: string
  4351. - description: MCP type, mcp_proxy_sse, mcp_proxy_streamable, mcp_openapi
  4352. in: query
  4353. name: type
  4354. type: string
  4355. - description: Search keyword
  4356. in: query
  4357. name: keyword
  4358. type: string
  4359. - description: MCP status
  4360. in: query
  4361. name: status
  4362. type: integer
  4363. produces:
  4364. - application/json
  4365. responses:
  4366. "200":
  4367. description: OK
  4368. schema:
  4369. allOf:
  4370. - $ref: '#/definitions/middleware.APIResponse'
  4371. - properties:
  4372. data:
  4373. items:
  4374. $ref: '#/definitions/controller.GroupMCPResponse'
  4375. type: array
  4376. type: object
  4377. security:
  4378. - ApiKeyAuth: []
  4379. summary: Get Group MCPs
  4380. tags:
  4381. - mcp
  4382. post:
  4383. consumes:
  4384. - application/json
  4385. description: Create a new Group MCP
  4386. parameters:
  4387. - description: Group ID
  4388. in: path
  4389. name: group
  4390. required: true
  4391. type: string
  4392. - description: Group MCP object
  4393. in: body
  4394. name: mcp
  4395. required: true
  4396. schema:
  4397. $ref: '#/definitions/model.GroupMCP'
  4398. produces:
  4399. - application/json
  4400. responses:
  4401. "200":
  4402. description: OK
  4403. schema:
  4404. allOf:
  4405. - $ref: '#/definitions/middleware.APIResponse'
  4406. - properties:
  4407. data:
  4408. $ref: '#/definitions/controller.GroupMCPResponse'
  4409. type: object
  4410. security:
  4411. - ApiKeyAuth: []
  4412. summary: Create Group MCP
  4413. tags:
  4414. - mcp
  4415. /api/mcp/group/{group}/{id}:
  4416. delete:
  4417. description: Delete a Group MCP by ID and Group ID
  4418. parameters:
  4419. - description: MCP ID
  4420. in: path
  4421. name: id
  4422. required: true
  4423. type: string
  4424. - description: Group ID
  4425. in: path
  4426. name: group
  4427. required: true
  4428. type: string
  4429. produces:
  4430. - application/json
  4431. responses:
  4432. "200":
  4433. description: OK
  4434. schema:
  4435. $ref: '#/definitions/middleware.APIResponse'
  4436. security:
  4437. - ApiKeyAuth: []
  4438. summary: Delete Group MCP
  4439. tags:
  4440. - mcp
  4441. get:
  4442. description: Get a specific Group MCP by its ID and Group ID
  4443. parameters:
  4444. - description: MCP ID
  4445. in: path
  4446. name: id
  4447. required: true
  4448. type: string
  4449. - description: Group ID
  4450. in: path
  4451. name: group
  4452. required: true
  4453. type: string
  4454. produces:
  4455. - application/json
  4456. responses:
  4457. "200":
  4458. description: OK
  4459. schema:
  4460. allOf:
  4461. - $ref: '#/definitions/middleware.APIResponse'
  4462. - properties:
  4463. data:
  4464. $ref: '#/definitions/controller.GroupMCPResponse'
  4465. type: object
  4466. security:
  4467. - ApiKeyAuth: []
  4468. summary: Get Group MCP by ID
  4469. tags:
  4470. - mcp
  4471. put:
  4472. consumes:
  4473. - application/json
  4474. description: Update an existing Group MCP
  4475. parameters:
  4476. - description: MCP ID
  4477. in: path
  4478. name: id
  4479. required: true
  4480. type: string
  4481. - description: Group ID
  4482. in: path
  4483. name: group
  4484. required: true
  4485. type: string
  4486. - description: Group MCP object
  4487. in: body
  4488. name: mcp
  4489. required: true
  4490. schema:
  4491. $ref: '#/definitions/model.GroupMCP'
  4492. produces:
  4493. - application/json
  4494. responses:
  4495. "200":
  4496. description: OK
  4497. schema:
  4498. allOf:
  4499. - $ref: '#/definitions/middleware.APIResponse'
  4500. - properties:
  4501. data:
  4502. $ref: '#/definitions/controller.GroupMCPResponse'
  4503. type: object
  4504. security:
  4505. - ApiKeyAuth: []
  4506. summary: Update Group MCP
  4507. tags:
  4508. - mcp
  4509. /api/mcp/group/{group}/{id}/status:
  4510. post:
  4511. consumes:
  4512. - application/json
  4513. description: Update the status of a Group MCP
  4514. parameters:
  4515. - description: MCP ID
  4516. in: path
  4517. name: id
  4518. required: true
  4519. type: string
  4520. - description: Group ID
  4521. in: path
  4522. name: group
  4523. required: true
  4524. type: string
  4525. - description: MCP status
  4526. in: body
  4527. name: status
  4528. required: true
  4529. schema:
  4530. $ref: '#/definitions/controller.UpdateGroupMCPStatusRequest'
  4531. produces:
  4532. - application/json
  4533. responses:
  4534. "200":
  4535. description: OK
  4536. schema:
  4537. $ref: '#/definitions/middleware.APIResponse'
  4538. security:
  4539. - ApiKeyAuth: []
  4540. summary: Update Group MCP status
  4541. tags:
  4542. - mcp
  4543. /api/mcp/group/all:
  4544. get:
  4545. description: Get all Group MCPs with filtering
  4546. parameters:
  4547. - description: MCP status
  4548. in: query
  4549. name: status
  4550. type: integer
  4551. produces:
  4552. - application/json
  4553. responses:
  4554. "200":
  4555. description: OK
  4556. schema:
  4557. allOf:
  4558. - $ref: '#/definitions/middleware.APIResponse'
  4559. - properties:
  4560. data:
  4561. items:
  4562. $ref: '#/definitions/controller.GroupMCPResponse'
  4563. type: array
  4564. type: object
  4565. security:
  4566. - ApiKeyAuth: []
  4567. summary: Get all Group MCPs
  4568. tags:
  4569. - mcp
  4570. /api/mcp/public/:
  4571. post:
  4572. consumes:
  4573. - application/json
  4574. description: Create a new MCP
  4575. parameters:
  4576. - description: MCP object
  4577. in: body
  4578. name: mcp
  4579. required: true
  4580. schema:
  4581. $ref: '#/definitions/model.PublicMCP'
  4582. produces:
  4583. - application/json
  4584. responses:
  4585. "200":
  4586. description: OK
  4587. schema:
  4588. allOf:
  4589. - $ref: '#/definitions/middleware.APIResponse'
  4590. - properties:
  4591. data:
  4592. $ref: '#/definitions/controller.PublicMCPResponse'
  4593. type: object
  4594. security:
  4595. - ApiKeyAuth: []
  4596. summary: Create MCP
  4597. tags:
  4598. - mcp
  4599. /api/mcp/public/{id}:
  4600. delete:
  4601. description: Delete an MCP by ID
  4602. parameters:
  4603. - description: MCP ID
  4604. in: path
  4605. name: id
  4606. required: true
  4607. type: string
  4608. produces:
  4609. - application/json
  4610. responses:
  4611. "200":
  4612. description: OK
  4613. schema:
  4614. $ref: '#/definitions/middleware.APIResponse'
  4615. security:
  4616. - ApiKeyAuth: []
  4617. summary: Delete MCP
  4618. tags:
  4619. - mcp
  4620. get:
  4621. description: Get a specific MCP by its ID
  4622. parameters:
  4623. - description: MCP ID
  4624. in: path
  4625. name: id
  4626. required: true
  4627. type: string
  4628. produces:
  4629. - application/json
  4630. responses:
  4631. "200":
  4632. description: OK
  4633. schema:
  4634. allOf:
  4635. - $ref: '#/definitions/middleware.APIResponse'
  4636. - properties:
  4637. data:
  4638. $ref: '#/definitions/controller.PublicMCPResponse'
  4639. type: object
  4640. security:
  4641. - ApiKeyAuth: []
  4642. summary: Get MCP by ID
  4643. tags:
  4644. - mcp
  4645. post:
  4646. consumes:
  4647. - application/json
  4648. description: Update an existing MCP
  4649. parameters:
  4650. - description: MCP ID
  4651. in: path
  4652. name: id
  4653. required: true
  4654. type: string
  4655. - description: MCP object
  4656. in: body
  4657. name: mcp
  4658. required: true
  4659. schema:
  4660. $ref: '#/definitions/model.PublicMCP'
  4661. produces:
  4662. - application/json
  4663. responses:
  4664. "200":
  4665. description: OK
  4666. schema:
  4667. allOf:
  4668. - $ref: '#/definitions/middleware.APIResponse'
  4669. - properties:
  4670. data:
  4671. $ref: '#/definitions/controller.PublicMCPResponse'
  4672. type: object
  4673. security:
  4674. - ApiKeyAuth: []
  4675. summary: Update MCP
  4676. tags:
  4677. - mcp
  4678. put:
  4679. consumes:
  4680. - application/json
  4681. description: Save a MCP
  4682. parameters:
  4683. - description: MCP ID
  4684. in: path
  4685. name: id
  4686. required: true
  4687. type: string
  4688. - description: MCP object
  4689. in: body
  4690. name: mcp
  4691. required: true
  4692. schema:
  4693. $ref: '#/definitions/model.PublicMCP'
  4694. produces:
  4695. - application/json
  4696. responses:
  4697. "200":
  4698. description: OK
  4699. schema:
  4700. allOf:
  4701. - $ref: '#/definitions/middleware.APIResponse'
  4702. - properties:
  4703. data:
  4704. $ref: '#/definitions/controller.PublicMCPResponse'
  4705. type: object
  4706. security:
  4707. - ApiKeyAuth: []
  4708. summary: Save MCP
  4709. tags:
  4710. - mcp
  4711. /api/mcp/public/{id}/group/{group}/params:
  4712. get:
  4713. description: Get reusing parameters for a specific group and MCP
  4714. parameters:
  4715. - description: MCP ID
  4716. in: path
  4717. name: id
  4718. required: true
  4719. type: string
  4720. - description: Group ID
  4721. in: path
  4722. name: group
  4723. required: true
  4724. type: string
  4725. produces:
  4726. - application/json
  4727. responses:
  4728. "200":
  4729. description: OK
  4730. schema:
  4731. allOf:
  4732. - $ref: '#/definitions/middleware.APIResponse'
  4733. - properties:
  4734. data:
  4735. $ref: '#/definitions/model.PublicMCPReusingParam'
  4736. type: object
  4737. security:
  4738. - ApiKeyAuth: []
  4739. summary: Get group MCP reusing parameters
  4740. tags:
  4741. - mcp
  4742. post:
  4743. consumes:
  4744. - application/json
  4745. description: Create or update reusing parameters for a specific group and MCP
  4746. parameters:
  4747. - description: MCP ID
  4748. in: path
  4749. name: id
  4750. required: true
  4751. type: string
  4752. - description: Group ID
  4753. in: path
  4754. name: group
  4755. required: true
  4756. type: string
  4757. - description: Reusing parameters
  4758. in: body
  4759. name: params
  4760. required: true
  4761. schema:
  4762. $ref: '#/definitions/model.PublicMCPReusingParam'
  4763. produces:
  4764. - application/json
  4765. responses:
  4766. "200":
  4767. description: OK
  4768. schema:
  4769. $ref: '#/definitions/middleware.APIResponse'
  4770. security:
  4771. - ApiKeyAuth: []
  4772. summary: Create or update group MCP reusing parameters
  4773. tags:
  4774. - mcp
  4775. /api/mcp/public/{id}/status:
  4776. post:
  4777. consumes:
  4778. - application/json
  4779. description: Update the status of an MCP
  4780. parameters:
  4781. - description: MCP ID
  4782. in: path
  4783. name: id
  4784. required: true
  4785. type: string
  4786. - description: MCP status
  4787. in: body
  4788. name: status
  4789. required: true
  4790. schema:
  4791. $ref: '#/definitions/controller.UpdatePublicMCPStatusRequest'
  4792. produces:
  4793. - application/json
  4794. responses:
  4795. "200":
  4796. description: OK
  4797. schema:
  4798. $ref: '#/definitions/middleware.APIResponse'
  4799. security:
  4800. - ApiKeyAuth: []
  4801. summary: Update MCP status
  4802. tags:
  4803. - mcp
  4804. /api/mcp/publics/:
  4805. get:
  4806. description: Get a list of MCPs with pagination and filtering
  4807. parameters:
  4808. - description: Page number
  4809. in: query
  4810. name: page
  4811. type: integer
  4812. - description: Items per page
  4813. in: query
  4814. name: per_page
  4815. type: integer
  4816. - description: hosted or local
  4817. in: query
  4818. name: type
  4819. type: string
  4820. - description: MCP id
  4821. in: query
  4822. name: id
  4823. type: string
  4824. - description: Search keyword
  4825. in: query
  4826. name: keyword
  4827. type: string
  4828. - description: MCP status
  4829. in: query
  4830. name: status
  4831. type: integer
  4832. produces:
  4833. - application/json
  4834. responses:
  4835. "200":
  4836. description: OK
  4837. schema:
  4838. allOf:
  4839. - $ref: '#/definitions/middleware.APIResponse'
  4840. - properties:
  4841. data:
  4842. items:
  4843. $ref: '#/definitions/controller.PublicMCPResponse'
  4844. type: array
  4845. type: object
  4846. security:
  4847. - ApiKeyAuth: []
  4848. summary: Get MCPs
  4849. tags:
  4850. - mcp
  4851. post:
  4852. consumes:
  4853. - application/json
  4854. description: Save a list of MCPs
  4855. parameters:
  4856. - description: MCP object
  4857. in: body
  4858. name: mcp
  4859. required: true
  4860. schema:
  4861. items:
  4862. $ref: '#/definitions/model.PublicMCP'
  4863. type: array
  4864. produces:
  4865. - application/json
  4866. responses:
  4867. "200":
  4868. description: OK
  4869. schema:
  4870. $ref: '#/definitions/middleware.APIResponse'
  4871. security:
  4872. - ApiKeyAuth: []
  4873. summary: Save MCPs
  4874. tags:
  4875. - mcp
  4876. /api/mcp/publics/all:
  4877. get:
  4878. description: Get all MCPs with filtering
  4879. parameters:
  4880. - description: MCP status
  4881. in: query
  4882. name: status
  4883. type: integer
  4884. produces:
  4885. - application/json
  4886. responses:
  4887. "200":
  4888. description: OK
  4889. schema:
  4890. allOf:
  4891. - $ref: '#/definitions/middleware.APIResponse'
  4892. - properties:
  4893. data:
  4894. items:
  4895. $ref: '#/definitions/controller.PublicMCPResponse'
  4896. type: array
  4897. type: object
  4898. security:
  4899. - ApiKeyAuth: []
  4900. summary: Get all MCPs
  4901. tags:
  4902. - mcp
  4903. /api/model_config/:
  4904. post:
  4905. description: Saves a model config
  4906. parameters:
  4907. - description: Model config
  4908. in: body
  4909. name: config
  4910. required: true
  4911. schema:
  4912. $ref: '#/definitions/controller.SaveModelConfigsRequest'
  4913. produces:
  4914. - application/json
  4915. responses:
  4916. "200":
  4917. description: OK
  4918. schema:
  4919. $ref: '#/definitions/middleware.APIResponse'
  4920. security:
  4921. - ApiKeyAuth: []
  4922. summary: Save model config
  4923. tags:
  4924. - modelconfig
  4925. /api/model_config/{model}:
  4926. delete:
  4927. description: Deletes a model config
  4928. parameters:
  4929. - description: Model name
  4930. in: path
  4931. name: model
  4932. required: true
  4933. type: string
  4934. produces:
  4935. - application/json
  4936. responses:
  4937. "200":
  4938. description: OK
  4939. schema:
  4940. $ref: '#/definitions/middleware.APIResponse'
  4941. security:
  4942. - ApiKeyAuth: []
  4943. summary: Delete model config
  4944. tags:
  4945. - modelconfig
  4946. get:
  4947. description: Returns a model config
  4948. parameters:
  4949. - description: Model name
  4950. in: path
  4951. name: model
  4952. required: true
  4953. type: string
  4954. produces:
  4955. - application/json
  4956. responses:
  4957. "200":
  4958. description: OK
  4959. schema:
  4960. allOf:
  4961. - $ref: '#/definitions/middleware.APIResponse'
  4962. - properties:
  4963. data:
  4964. $ref: '#/definitions/model.ModelConfig'
  4965. type: object
  4966. security:
  4967. - ApiKeyAuth: []
  4968. summary: Get model config
  4969. tags:
  4970. - modelconfig
  4971. /api/model_configs/:
  4972. get:
  4973. description: Returns a list of model configs with pagination
  4974. parameters:
  4975. - description: Model name
  4976. in: query
  4977. name: model
  4978. type: string
  4979. produces:
  4980. - application/json
  4981. responses:
  4982. "200":
  4983. description: OK
  4984. schema:
  4985. allOf:
  4986. - $ref: '#/definitions/middleware.APIResponse'
  4987. - properties:
  4988. data:
  4989. additionalProperties:
  4990. allOf:
  4991. - {}
  4992. - properties:
  4993. configs:
  4994. items:
  4995. $ref: '#/definitions/model.ModelConfig'
  4996. type: array
  4997. total:
  4998. type: integer
  4999. type: object
  5000. type: object
  5001. type: object
  5002. security:
  5003. - ApiKeyAuth: []
  5004. summary: Get model configs
  5005. tags:
  5006. - modelconfig
  5007. post:
  5008. description: Saves a list of model configs
  5009. parameters:
  5010. - description: Model configs
  5011. in: body
  5012. name: configs
  5013. required: true
  5014. schema:
  5015. items:
  5016. $ref: '#/definitions/controller.SaveModelConfigsRequest'
  5017. type: array
  5018. produces:
  5019. - application/json
  5020. responses:
  5021. "200":
  5022. description: OK
  5023. schema:
  5024. $ref: '#/definitions/middleware.APIResponse'
  5025. security:
  5026. - ApiKeyAuth: []
  5027. summary: Save model configs
  5028. tags:
  5029. - modelconfig
  5030. /api/model_configs/all:
  5031. get:
  5032. description: Returns a list of all model configs
  5033. produces:
  5034. - application/json
  5035. responses:
  5036. "200":
  5037. description: OK
  5038. schema:
  5039. allOf:
  5040. - $ref: '#/definitions/middleware.APIResponse'
  5041. - properties:
  5042. data:
  5043. items:
  5044. $ref: '#/definitions/model.ModelConfig'
  5045. type: array
  5046. type: object
  5047. security:
  5048. - ApiKeyAuth: []
  5049. summary: Get all model configs
  5050. tags:
  5051. - modelconfig
  5052. /api/model_configs/batch_delete:
  5053. post:
  5054. description: Deletes a list of model configs
  5055. parameters:
  5056. - description: Model names
  5057. in: body
  5058. name: models
  5059. required: true
  5060. schema:
  5061. items:
  5062. type: string
  5063. type: array
  5064. produces:
  5065. - application/json
  5066. responses:
  5067. "200":
  5068. description: OK
  5069. schema:
  5070. $ref: '#/definitions/middleware.APIResponse'
  5071. security:
  5072. - ApiKeyAuth: []
  5073. summary: Delete model configs
  5074. tags:
  5075. - modelconfig
  5076. /api/model_configs/contains:
  5077. post:
  5078. description: Returns a list of model configs by models contains
  5079. parameters:
  5080. - description: Models
  5081. in: body
  5082. name: models
  5083. required: true
  5084. schema:
  5085. $ref: '#/definitions/controller.GetModelConfigsByModelsContainsRequest'
  5086. produces:
  5087. - application/json
  5088. responses:
  5089. "200":
  5090. description: OK
  5091. schema:
  5092. allOf:
  5093. - $ref: '#/definitions/middleware.APIResponse'
  5094. - properties:
  5095. data:
  5096. items:
  5097. $ref: '#/definitions/model.ModelConfig'
  5098. type: array
  5099. type: object
  5100. security:
  5101. - ApiKeyAuth: []
  5102. summary: Get model configs by models contains
  5103. tags:
  5104. - modelconfig
  5105. /api/model_configs/search:
  5106. get:
  5107. description: Returns a list of model configs by keyword
  5108. parameters:
  5109. - description: Keyword
  5110. in: query
  5111. name: keyword
  5112. type: string
  5113. - description: Model name
  5114. in: query
  5115. name: model
  5116. type: string
  5117. - description: Owner
  5118. in: query
  5119. name: owner
  5120. type: string
  5121. - description: Page
  5122. in: query
  5123. name: page
  5124. type: integer
  5125. - description: Per page
  5126. in: query
  5127. name: per_page
  5128. type: integer
  5129. produces:
  5130. - application/json
  5131. responses:
  5132. "200":
  5133. description: OK
  5134. schema:
  5135. allOf:
  5136. - $ref: '#/definitions/middleware.APIResponse'
  5137. - properties:
  5138. data:
  5139. additionalProperties:
  5140. allOf:
  5141. - {}
  5142. - properties:
  5143. configs:
  5144. items:
  5145. $ref: '#/definitions/model.ModelConfig'
  5146. type: array
  5147. total:
  5148. type: integer
  5149. type: object
  5150. type: object
  5151. type: object
  5152. security:
  5153. - ApiKeyAuth: []
  5154. summary: Search model configs
  5155. tags:
  5156. - modelconfig
  5157. /api/models/builtin:
  5158. get:
  5159. description: Returns a list of builtin models
  5160. produces:
  5161. - application/json
  5162. responses:
  5163. "200":
  5164. description: OK
  5165. schema:
  5166. allOf:
  5167. - $ref: '#/definitions/middleware.APIResponse'
  5168. - properties:
  5169. data:
  5170. items:
  5171. $ref: '#/definitions/controller.BuiltinModelConfig'
  5172. type: array
  5173. type: object
  5174. security:
  5175. - ApiKeyAuth: []
  5176. summary: Get builtin models
  5177. tags:
  5178. - model
  5179. /api/models/builtin/channel:
  5180. get:
  5181. description: Returns a list of channel builtin models
  5182. produces:
  5183. - application/json
  5184. responses:
  5185. "200":
  5186. description: OK
  5187. schema:
  5188. allOf:
  5189. - $ref: '#/definitions/middleware.APIResponse'
  5190. - properties:
  5191. data:
  5192. additionalProperties:
  5193. items:
  5194. $ref: '#/definitions/controller.BuiltinModelConfig'
  5195. type: array
  5196. type: object
  5197. type: object
  5198. security:
  5199. - ApiKeyAuth: []
  5200. summary: Get channel builtin models
  5201. tags:
  5202. - model
  5203. /api/models/builtin/channel/{type}:
  5204. get:
  5205. description: Returns a list of channel builtin models by type
  5206. parameters:
  5207. - description: Channel type
  5208. enum:
  5209. - 1
  5210. - 3
  5211. - 4
  5212. - 12
  5213. - 13
  5214. - 14
  5215. - 15
  5216. - 16
  5217. - 17
  5218. - 18
  5219. - 19
  5220. - 20
  5221. - 23
  5222. - 24
  5223. - 25
  5224. - 26
  5225. - 27
  5226. - 28
  5227. - 29
  5228. - 30
  5229. - 31
  5230. - 32
  5231. - 33
  5232. - 34
  5233. - 35
  5234. - 36
  5235. - 37
  5236. - 40
  5237. - 41
  5238. - 42
  5239. - 43
  5240. - 44
  5241. - 45
  5242. - 46
  5243. - 47
  5244. - 48
  5245. in: path
  5246. name: type
  5247. required: true
  5248. type: integer
  5249. produces:
  5250. - application/json
  5251. responses:
  5252. "200":
  5253. description: OK
  5254. schema:
  5255. allOf:
  5256. - $ref: '#/definitions/middleware.APIResponse'
  5257. - properties:
  5258. data:
  5259. items:
  5260. $ref: '#/definitions/controller.BuiltinModelConfig'
  5261. type: array
  5262. type: object
  5263. security:
  5264. - ApiKeyAuth: []
  5265. summary: Get channel builtin models by type
  5266. tags:
  5267. - model
  5268. /api/models/default:
  5269. get:
  5270. description: Returns a list of channel default models and mapping
  5271. produces:
  5272. - application/json
  5273. responses:
  5274. "200":
  5275. description: OK
  5276. schema:
  5277. allOf:
  5278. - $ref: '#/definitions/middleware.APIResponse'
  5279. - properties:
  5280. data:
  5281. additionalProperties:
  5282. allOf:
  5283. - {}
  5284. - properties:
  5285. mapping:
  5286. additionalProperties:
  5287. type: string
  5288. type: object
  5289. models:
  5290. items:
  5291. type: string
  5292. type: array
  5293. type: object
  5294. type: object
  5295. type: object
  5296. security:
  5297. - ApiKeyAuth: []
  5298. summary: Get channel default models and mapping
  5299. tags:
  5300. - model
  5301. /api/models/default/{type}:
  5302. get:
  5303. description: Returns a list of channel default models and mapping by type
  5304. parameters:
  5305. - description: Channel type
  5306. in: path
  5307. name: type
  5308. required: true
  5309. type: string
  5310. produces:
  5311. - application/json
  5312. responses:
  5313. "200":
  5314. description: OK
  5315. schema:
  5316. allOf:
  5317. - $ref: '#/definitions/middleware.APIResponse'
  5318. - properties:
  5319. data:
  5320. additionalProperties:
  5321. allOf:
  5322. - {}
  5323. - properties:
  5324. mapping:
  5325. additionalProperties:
  5326. type: string
  5327. type: object
  5328. models:
  5329. items:
  5330. type: string
  5331. type: array
  5332. type: object
  5333. type: object
  5334. type: object
  5335. security:
  5336. - ApiKeyAuth: []
  5337. summary: Get channel default models and mapping by type
  5338. tags:
  5339. - model
  5340. /api/models/enabled:
  5341. get:
  5342. description: Returns a list of enabled models
  5343. produces:
  5344. - application/json
  5345. responses:
  5346. "200":
  5347. description: OK
  5348. schema:
  5349. allOf:
  5350. - $ref: '#/definitions/middleware.APIResponse'
  5351. - properties:
  5352. data:
  5353. additionalProperties:
  5354. items:
  5355. $ref: '#/definitions/model.ModelConfig'
  5356. type: array
  5357. type: object
  5358. type: object
  5359. security:
  5360. - ApiKeyAuth: []
  5361. summary: Get enabled models
  5362. tags:
  5363. - model
  5364. /api/models/enabled/{set}:
  5365. get:
  5366. description: Returns a list of enabled models by set
  5367. parameters:
  5368. - description: Models set
  5369. in: path
  5370. name: set
  5371. required: true
  5372. type: string
  5373. produces:
  5374. - application/json
  5375. responses:
  5376. "200":
  5377. description: OK
  5378. schema:
  5379. allOf:
  5380. - $ref: '#/definitions/middleware.APIResponse'
  5381. - properties:
  5382. data:
  5383. items:
  5384. $ref: '#/definitions/model.ModelConfig'
  5385. type: array
  5386. type: object
  5387. security:
  5388. - ApiKeyAuth: []
  5389. summary: Get enabled models by set
  5390. tags:
  5391. - model
  5392. /api/models/sets:
  5393. get:
  5394. description: Returns a list of enabled models and channels sets
  5395. produces:
  5396. - application/json
  5397. responses:
  5398. "200":
  5399. description: OK
  5400. schema:
  5401. allOf:
  5402. - $ref: '#/definitions/middleware.APIResponse'
  5403. - properties:
  5404. data:
  5405. additionalProperties:
  5406. additionalProperties:
  5407. items:
  5408. $ref: '#/definitions/controller.EnabledModelChannel'
  5409. type: array
  5410. type: object
  5411. type: object
  5412. type: object
  5413. security:
  5414. - ApiKeyAuth: []
  5415. summary: Get enabled models and channels sets
  5416. tags:
  5417. - model
  5418. /api/monitor/:
  5419. delete:
  5420. description: Clears all model errors
  5421. produces:
  5422. - application/json
  5423. responses:
  5424. "200":
  5425. description: OK
  5426. schema:
  5427. $ref: '#/definitions/middleware.APIResponse'
  5428. security:
  5429. - ApiKeyAuth: []
  5430. summary: Clear all model errors
  5431. tags:
  5432. - monitor
  5433. get:
  5434. description: Returns a list of all channel model error rates
  5435. produces:
  5436. - application/json
  5437. responses:
  5438. "200":
  5439. description: OK
  5440. schema:
  5441. allOf:
  5442. - $ref: '#/definitions/middleware.APIResponse'
  5443. - properties:
  5444. data:
  5445. additionalProperties:
  5446. additionalProperties:
  5447. type: number
  5448. type: object
  5449. type: object
  5450. type: object
  5451. security:
  5452. - ApiKeyAuth: []
  5453. summary: Get all channel model error rates
  5454. tags:
  5455. - monitor
  5456. /api/monitor/{id}:
  5457. delete:
  5458. description: Clears all model errors for a specific channel
  5459. parameters:
  5460. - description: Channel ID
  5461. in: path
  5462. name: id
  5463. required: true
  5464. type: integer
  5465. produces:
  5466. - application/json
  5467. responses:
  5468. "200":
  5469. description: OK
  5470. schema:
  5471. $ref: '#/definitions/middleware.APIResponse'
  5472. security:
  5473. - ApiKeyAuth: []
  5474. summary: Clear channel all model errors
  5475. tags:
  5476. - monitor
  5477. get:
  5478. description: Returns a list of channel model error rates
  5479. parameters:
  5480. - description: Channel ID
  5481. in: path
  5482. name: id
  5483. required: true
  5484. type: integer
  5485. produces:
  5486. - application/json
  5487. responses:
  5488. "200":
  5489. description: OK
  5490. schema:
  5491. allOf:
  5492. - $ref: '#/definitions/middleware.APIResponse'
  5493. - properties:
  5494. data:
  5495. items:
  5496. additionalProperties:
  5497. type: number
  5498. type: object
  5499. type: array
  5500. type: object
  5501. security:
  5502. - ApiKeyAuth: []
  5503. summary: Get channel model error rates
  5504. tags:
  5505. - monitor
  5506. /api/monitor/{id}/{model}:
  5507. delete:
  5508. description: Clears model errors for a specific channel and model
  5509. parameters:
  5510. - description: Channel ID
  5511. in: path
  5512. name: id
  5513. required: true
  5514. type: integer
  5515. - description: Model name
  5516. in: path
  5517. name: model
  5518. required: true
  5519. type: string
  5520. produces:
  5521. - application/json
  5522. responses:
  5523. "200":
  5524. description: OK
  5525. schema:
  5526. $ref: '#/definitions/middleware.APIResponse'
  5527. security:
  5528. - ApiKeyAuth: []
  5529. summary: Clear channel model errors
  5530. tags:
  5531. - monitor
  5532. /api/monitor/banned_channels:
  5533. get:
  5534. description: Returns a list of all banned model channels
  5535. produces:
  5536. - application/json
  5537. responses:
  5538. "200":
  5539. description: OK
  5540. schema:
  5541. allOf:
  5542. - $ref: '#/definitions/middleware.APIResponse'
  5543. - properties:
  5544. data:
  5545. additionalProperties:
  5546. items:
  5547. type: integer
  5548. type: array
  5549. type: object
  5550. type: object
  5551. security:
  5552. - ApiKeyAuth: []
  5553. summary: Get all banned model channels
  5554. tags:
  5555. - monitor
  5556. /api/monitor/models:
  5557. get:
  5558. description: Returns a list of models error rate
  5559. produces:
  5560. - application/json
  5561. responses:
  5562. "200":
  5563. description: OK
  5564. schema:
  5565. allOf:
  5566. - $ref: '#/definitions/middleware.APIResponse'
  5567. - properties:
  5568. data:
  5569. additionalProperties:
  5570. type: number
  5571. type: object
  5572. type: object
  5573. security:
  5574. - ApiKeyAuth: []
  5575. summary: Get models error rate
  5576. tags:
  5577. - monitor
  5578. /api/option/:
  5579. get:
  5580. description: Returns a list of options
  5581. produces:
  5582. - application/json
  5583. responses:
  5584. "200":
  5585. description: OK
  5586. schema:
  5587. allOf:
  5588. - $ref: '#/definitions/middleware.APIResponse'
  5589. - properties:
  5590. data:
  5591. additionalProperties:
  5592. type: string
  5593. type: object
  5594. type: object
  5595. security:
  5596. - ApiKeyAuth: []
  5597. summary: Get options
  5598. tags:
  5599. - option
  5600. post:
  5601. description: Updates a single option
  5602. parameters:
  5603. - description: Option value
  5604. in: body
  5605. name: value
  5606. required: true
  5607. schema:
  5608. $ref: '#/definitions/model.Option'
  5609. produces:
  5610. - application/json
  5611. responses:
  5612. "200":
  5613. description: OK
  5614. schema:
  5615. $ref: '#/definitions/middleware.APIResponse'
  5616. security:
  5617. - ApiKeyAuth: []
  5618. summary: Update option
  5619. tags:
  5620. - option
  5621. put:
  5622. description: Updates a single option
  5623. parameters:
  5624. - description: Option value
  5625. in: body
  5626. name: value
  5627. required: true
  5628. schema:
  5629. $ref: '#/definitions/model.Option'
  5630. produces:
  5631. - application/json
  5632. responses:
  5633. "200":
  5634. description: OK
  5635. schema:
  5636. $ref: '#/definitions/middleware.APIResponse'
  5637. security:
  5638. - ApiKeyAuth: []
  5639. summary: Update option
  5640. tags:
  5641. - option
  5642. /api/option/{key}:
  5643. get:
  5644. description: Returns a single option
  5645. parameters:
  5646. - description: Option key
  5647. in: path
  5648. name: key
  5649. required: true
  5650. type: string
  5651. produces:
  5652. - application/json
  5653. responses:
  5654. "200":
  5655. description: OK
  5656. schema:
  5657. allOf:
  5658. - $ref: '#/definitions/middleware.APIResponse'
  5659. - properties:
  5660. data:
  5661. $ref: '#/definitions/model.Option'
  5662. type: object
  5663. security:
  5664. - ApiKeyAuth: []
  5665. summary: Get option
  5666. tags:
  5667. - option
  5668. put:
  5669. description: Updates a single option by key
  5670. parameters:
  5671. - description: Option key
  5672. in: path
  5673. name: key
  5674. required: true
  5675. type: string
  5676. - description: Option value
  5677. in: body
  5678. name: value
  5679. required: true
  5680. schema:
  5681. type: string
  5682. produces:
  5683. - application/json
  5684. responses:
  5685. "200":
  5686. description: OK
  5687. schema:
  5688. $ref: '#/definitions/middleware.APIResponse'
  5689. security:
  5690. - ApiKeyAuth: []
  5691. summary: Update option by key
  5692. tags:
  5693. - option
  5694. /api/option/batch:
  5695. post:
  5696. description: Updates multiple options
  5697. parameters:
  5698. - description: Options
  5699. in: body
  5700. name: options
  5701. required: true
  5702. schema:
  5703. additionalProperties:
  5704. type: string
  5705. type: object
  5706. produces:
  5707. - application/json
  5708. responses:
  5709. "200":
  5710. description: OK
  5711. schema:
  5712. $ref: '#/definitions/middleware.APIResponse'
  5713. security:
  5714. - ApiKeyAuth: []
  5715. summary: Update options
  5716. tags:
  5717. - option
  5718. /api/status:
  5719. get:
  5720. description: Returns the status of the server
  5721. produces:
  5722. - application/json
  5723. responses:
  5724. "200":
  5725. description: OK
  5726. schema:
  5727. allOf:
  5728. - $ref: '#/definitions/middleware.APIResponse'
  5729. - properties:
  5730. data:
  5731. $ref: '#/definitions/controller.StatusData'
  5732. type: object
  5733. summary: Get status
  5734. tags:
  5735. - misc
  5736. /api/test-embedmcp/{id}:
  5737. delete:
  5738. consumes:
  5739. - application/json
  5740. description: Test Embed MCP Streamable Server with various HTTP methods
  5741. parameters:
  5742. - description: MCP ID
  5743. in: path
  5744. name: id
  5745. required: true
  5746. type: string
  5747. - description: Initial configuration parameters (e.g. config[host]=http://localhost:3000)
  5748. in: query
  5749. name: config[key]
  5750. type: string
  5751. - description: Reusing configuration parameters (e.g., reusing[authorization]=apikey)
  5752. in: query
  5753. name: reusing[key]
  5754. type: string
  5755. produces:
  5756. - application/json
  5757. responses:
  5758. "200":
  5759. description: OK
  5760. "400":
  5761. description: Bad Request
  5762. security:
  5763. - ApiKeyAuth: []
  5764. summary: Test Embed MCP Streamable Server
  5765. tags:
  5766. - embedmcp
  5767. get:
  5768. consumes:
  5769. - application/json
  5770. description: Test Embed MCP Streamable Server with various HTTP methods
  5771. parameters:
  5772. - description: MCP ID
  5773. in: path
  5774. name: id
  5775. required: true
  5776. type: string
  5777. - description: Initial configuration parameters (e.g. config[host]=http://localhost:3000)
  5778. in: query
  5779. name: config[key]
  5780. type: string
  5781. - description: Reusing configuration parameters (e.g., reusing[authorization]=apikey)
  5782. in: query
  5783. name: reusing[key]
  5784. type: string
  5785. produces:
  5786. - application/json
  5787. responses:
  5788. "200":
  5789. description: OK
  5790. "400":
  5791. description: Bad Request
  5792. security:
  5793. - ApiKeyAuth: []
  5794. summary: Test Embed MCP Streamable Server
  5795. tags:
  5796. - embedmcp
  5797. post:
  5798. consumes:
  5799. - application/json
  5800. description: Test Embed MCP Streamable Server with various HTTP methods
  5801. parameters:
  5802. - description: MCP ID
  5803. in: path
  5804. name: id
  5805. required: true
  5806. type: string
  5807. - description: Initial configuration parameters (e.g. config[host]=http://localhost:3000)
  5808. in: query
  5809. name: config[key]
  5810. type: string
  5811. - description: Reusing configuration parameters (e.g., reusing[authorization]=apikey)
  5812. in: query
  5813. name: reusing[key]
  5814. type: string
  5815. produces:
  5816. - application/json
  5817. responses:
  5818. "200":
  5819. description: OK
  5820. "400":
  5821. description: Bad Request
  5822. security:
  5823. - ApiKeyAuth: []
  5824. summary: Test Embed MCP Streamable Server
  5825. tags:
  5826. - embedmcp
  5827. /api/test-embedmcp/{id}/sse:
  5828. get:
  5829. description: Test Embed MCP SSE Server
  5830. parameters:
  5831. - description: MCP ID
  5832. in: path
  5833. name: id
  5834. required: true
  5835. type: string
  5836. - description: Initial configuration parameters (e.g. config[host]=http://localhost:3000)
  5837. in: query
  5838. name: config[key]
  5839. type: string
  5840. - description: Reusing configuration parameters (e.g. reusing[authorization]=apikey)
  5841. in: query
  5842. name: reusing[key]
  5843. type: string
  5844. responses:
  5845. "200":
  5846. description: OK
  5847. "400":
  5848. description: Bad Request
  5849. security:
  5850. - ApiKeyAuth: []
  5851. summary: Test Embed MCP SSE Server
  5852. tags:
  5853. - embedmcp
  5854. /api/test-publicmcp/{group}/{id}/sse:
  5855. get:
  5856. parameters:
  5857. - description: Group ID
  5858. in: path
  5859. name: group
  5860. required: true
  5861. type: string
  5862. - description: MCP ID
  5863. in: path
  5864. name: id
  5865. required: true
  5866. type: string
  5867. responses: {}
  5868. security:
  5869. - ApiKeyAuth: []
  5870. summary: Test Public MCP SSE Server
  5871. /api/token/{group}:
  5872. post:
  5873. consumes:
  5874. - application/json
  5875. description: Adds a new token to a specific group
  5876. parameters:
  5877. - description: Group name
  5878. in: path
  5879. name: group
  5880. required: true
  5881. type: string
  5882. - description: Auto create group
  5883. in: query
  5884. name: auto_create_group
  5885. type: boolean
  5886. - description: Ignore exist
  5887. in: query
  5888. name: ignore_exist
  5889. type: boolean
  5890. - description: Token information
  5891. in: body
  5892. name: token
  5893. required: true
  5894. schema:
  5895. $ref: '#/definitions/controller.AddTokenRequest'
  5896. produces:
  5897. - application/json
  5898. responses:
  5899. "200":
  5900. description: OK
  5901. schema:
  5902. allOf:
  5903. - $ref: '#/definitions/middleware.APIResponse'
  5904. - properties:
  5905. data:
  5906. $ref: '#/definitions/controller.TokenResponse'
  5907. type: object
  5908. security:
  5909. - ApiKeyAuth: []
  5910. summary: Add group token
  5911. tags:
  5912. - token
  5913. /api/token/{group}/{id}:
  5914. delete:
  5915. description: Deletes a specific token from a group
  5916. parameters:
  5917. - description: Group name
  5918. in: path
  5919. name: group
  5920. required: true
  5921. type: string
  5922. - description: Token ID
  5923. in: path
  5924. name: id
  5925. required: true
  5926. type: integer
  5927. produces:
  5928. - application/json
  5929. responses:
  5930. "200":
  5931. description: OK
  5932. schema:
  5933. $ref: '#/definitions/middleware.APIResponse'
  5934. security:
  5935. - ApiKeyAuth: []
  5936. summary: Delete group token
  5937. tags:
  5938. - token
  5939. get:
  5940. description: Returns detailed information about a specific token for a specific
  5941. group
  5942. parameters:
  5943. - description: Group name
  5944. in: path
  5945. name: group
  5946. required: true
  5947. type: string
  5948. - description: Token ID
  5949. in: path
  5950. name: id
  5951. required: true
  5952. type: integer
  5953. produces:
  5954. - application/json
  5955. responses:
  5956. "200":
  5957. description: OK
  5958. schema:
  5959. allOf:
  5960. - $ref: '#/definitions/middleware.APIResponse'
  5961. - properties:
  5962. data:
  5963. $ref: '#/definitions/controller.TokenResponse'
  5964. type: object
  5965. security:
  5966. - ApiKeyAuth: []
  5967. summary: Get token by ID for a specific group
  5968. tags:
  5969. - token
  5970. put:
  5971. consumes:
  5972. - application/json
  5973. description: Updates an existing token in a specific group
  5974. parameters:
  5975. - description: Group name
  5976. in: path
  5977. name: group
  5978. required: true
  5979. type: string
  5980. - description: Token ID
  5981. in: path
  5982. name: id
  5983. required: true
  5984. type: integer
  5985. - description: Updated token information
  5986. in: body
  5987. name: token
  5988. required: true
  5989. schema:
  5990. $ref: '#/definitions/controller.AddTokenRequest'
  5991. produces:
  5992. - application/json
  5993. responses:
  5994. "200":
  5995. description: OK
  5996. schema:
  5997. allOf:
  5998. - $ref: '#/definitions/middleware.APIResponse'
  5999. - properties:
  6000. data:
  6001. $ref: '#/definitions/controller.TokenResponse'
  6002. type: object
  6003. security:
  6004. - ApiKeyAuth: []
  6005. summary: Update group token
  6006. tags:
  6007. - token
  6008. /api/token/{group}/{id}/name:
  6009. post:
  6010. consumes:
  6011. - application/json
  6012. description: Updates the name of a token in a specific group
  6013. parameters:
  6014. - description: Group name
  6015. in: path
  6016. name: group
  6017. required: true
  6018. type: string
  6019. - description: Token ID
  6020. in: path
  6021. name: id
  6022. required: true
  6023. type: integer
  6024. - description: Name information
  6025. in: body
  6026. name: name
  6027. required: true
  6028. schema:
  6029. $ref: '#/definitions/controller.UpdateTokenNameRequest'
  6030. produces:
  6031. - application/json
  6032. responses:
  6033. "200":
  6034. description: OK
  6035. schema:
  6036. $ref: '#/definitions/middleware.APIResponse'
  6037. security:
  6038. - ApiKeyAuth: []
  6039. summary: Update group token name
  6040. tags:
  6041. - token
  6042. /api/token/{group}/{id}/status:
  6043. post:
  6044. consumes:
  6045. - application/json
  6046. description: Updates the status of a token in a specific group
  6047. parameters:
  6048. - description: Group name
  6049. in: path
  6050. name: group
  6051. required: true
  6052. type: string
  6053. - description: Token ID
  6054. in: path
  6055. name: id
  6056. required: true
  6057. type: integer
  6058. - description: Status information
  6059. in: body
  6060. name: status
  6061. required: true
  6062. schema:
  6063. $ref: '#/definitions/controller.UpdateTokenStatusRequest'
  6064. produces:
  6065. - application/json
  6066. responses:
  6067. "200":
  6068. description: OK
  6069. schema:
  6070. $ref: '#/definitions/middleware.APIResponse'
  6071. security:
  6072. - ApiKeyAuth: []
  6073. summary: Update group token status
  6074. tags:
  6075. - token
  6076. /api/token/{group}/batch_delete:
  6077. post:
  6078. description: Deletes multiple tokens from a specific group
  6079. parameters:
  6080. - description: Group name
  6081. in: path
  6082. name: group
  6083. required: true
  6084. type: string
  6085. - description: Token IDs
  6086. in: body
  6087. name: ids
  6088. required: true
  6089. schema:
  6090. items:
  6091. type: integer
  6092. type: array
  6093. produces:
  6094. - application/json
  6095. responses:
  6096. "200":
  6097. description: OK
  6098. schema:
  6099. $ref: '#/definitions/middleware.APIResponse'
  6100. security:
  6101. - ApiKeyAuth: []
  6102. summary: Delete group tokens
  6103. tags:
  6104. - token
  6105. /api/token/{group}/search:
  6106. get:
  6107. description: Returns a paginated list of tokens for a specific group based on
  6108. search criteria
  6109. parameters:
  6110. - description: Group name
  6111. in: path
  6112. name: group
  6113. required: true
  6114. type: string
  6115. - description: Keyword
  6116. in: query
  6117. name: keyword
  6118. type: string
  6119. - description: Page number
  6120. in: query
  6121. name: page
  6122. type: integer
  6123. - description: Items per page
  6124. in: query
  6125. name: per_page
  6126. type: integer
  6127. - description: Order
  6128. in: query
  6129. name: order
  6130. type: string
  6131. - description: Name
  6132. in: query
  6133. name: name
  6134. type: string
  6135. - description: Key
  6136. in: query
  6137. name: key
  6138. type: string
  6139. - description: Status
  6140. in: query
  6141. name: status
  6142. type: integer
  6143. produces:
  6144. - application/json
  6145. responses:
  6146. "200":
  6147. description: OK
  6148. schema:
  6149. allOf:
  6150. - $ref: '#/definitions/middleware.APIResponse'
  6151. - properties:
  6152. data:
  6153. additionalProperties:
  6154. allOf:
  6155. - {}
  6156. - properties:
  6157. tokens:
  6158. items:
  6159. $ref: '#/definitions/controller.TokenResponse'
  6160. type: array
  6161. total:
  6162. type: integer
  6163. type: object
  6164. type: object
  6165. type: object
  6166. security:
  6167. - ApiKeyAuth: []
  6168. summary: Search tokens for a specific group
  6169. tags:
  6170. - token
  6171. /api/tokens/:
  6172. get:
  6173. description: Returns a paginated list of all tokens
  6174. parameters:
  6175. - description: Page number
  6176. in: query
  6177. name: page
  6178. type: integer
  6179. - description: Items per page
  6180. in: query
  6181. name: per_page
  6182. type: integer
  6183. - description: Group name
  6184. in: query
  6185. name: group
  6186. type: string
  6187. - description: Order
  6188. in: query
  6189. name: order
  6190. type: string
  6191. - description: Status
  6192. in: query
  6193. name: status
  6194. type: integer
  6195. produces:
  6196. - application/json
  6197. responses:
  6198. "200":
  6199. description: OK
  6200. schema:
  6201. allOf:
  6202. - $ref: '#/definitions/middleware.APIResponse'
  6203. - properties:
  6204. data:
  6205. additionalProperties:
  6206. allOf:
  6207. - {}
  6208. - properties:
  6209. tokens:
  6210. items:
  6211. $ref: '#/definitions/controller.TokenResponse'
  6212. type: array
  6213. total:
  6214. type: integer
  6215. type: object
  6216. type: object
  6217. type: object
  6218. security:
  6219. - ApiKeyAuth: []
  6220. summary: Get all tokens
  6221. tags:
  6222. - tokens
  6223. /api/tokens/{group}:
  6224. get:
  6225. description: Returns a paginated list of all tokens for a specific group
  6226. parameters:
  6227. - description: Group name
  6228. in: path
  6229. name: group
  6230. required: true
  6231. type: string
  6232. - description: Page number
  6233. in: query
  6234. name: page
  6235. type: integer
  6236. - description: Items per page
  6237. in: query
  6238. name: per_page
  6239. type: integer
  6240. - description: Order
  6241. in: query
  6242. name: order
  6243. type: string
  6244. - description: Status
  6245. in: query
  6246. name: status
  6247. type: integer
  6248. produces:
  6249. - application/json
  6250. responses:
  6251. "200":
  6252. description: OK
  6253. schema:
  6254. allOf:
  6255. - $ref: '#/definitions/middleware.APIResponse'
  6256. - properties:
  6257. data:
  6258. additionalProperties:
  6259. allOf:
  6260. - {}
  6261. - properties:
  6262. tokens:
  6263. items:
  6264. $ref: '#/definitions/controller.TokenResponse'
  6265. type: array
  6266. total:
  6267. type: integer
  6268. type: object
  6269. type: object
  6270. type: object
  6271. security:
  6272. - ApiKeyAuth: []
  6273. summary: Get all tokens for a specific group
  6274. tags:
  6275. - tokens
  6276. /api/tokens/{id}:
  6277. delete:
  6278. description: Deletes a specific token by ID
  6279. parameters:
  6280. - description: Token ID
  6281. in: path
  6282. name: id
  6283. required: true
  6284. type: integer
  6285. produces:
  6286. - application/json
  6287. responses:
  6288. "200":
  6289. description: OK
  6290. schema:
  6291. $ref: '#/definitions/middleware.APIResponse'
  6292. security:
  6293. - ApiKeyAuth: []
  6294. summary: Delete token
  6295. tags:
  6296. - tokens
  6297. get:
  6298. description: Returns detailed information about a specific token
  6299. parameters:
  6300. - description: Token ID
  6301. in: path
  6302. name: id
  6303. required: true
  6304. type: integer
  6305. produces:
  6306. - application/json
  6307. responses:
  6308. "200":
  6309. description: OK
  6310. schema:
  6311. allOf:
  6312. - $ref: '#/definitions/middleware.APIResponse'
  6313. - properties:
  6314. data:
  6315. $ref: '#/definitions/controller.TokenResponse'
  6316. type: object
  6317. security:
  6318. - ApiKeyAuth: []
  6319. summary: Get token by ID
  6320. tags:
  6321. - tokens
  6322. put:
  6323. consumes:
  6324. - application/json
  6325. description: Updates an existing token's information
  6326. parameters:
  6327. - description: Token ID
  6328. in: path
  6329. name: id
  6330. required: true
  6331. type: integer
  6332. - description: Updated token information
  6333. in: body
  6334. name: token
  6335. required: true
  6336. schema:
  6337. $ref: '#/definitions/controller.AddTokenRequest'
  6338. produces:
  6339. - application/json
  6340. responses:
  6341. "200":
  6342. description: OK
  6343. schema:
  6344. allOf:
  6345. - $ref: '#/definitions/middleware.APIResponse'
  6346. - properties:
  6347. data:
  6348. $ref: '#/definitions/controller.TokenResponse'
  6349. type: object
  6350. security:
  6351. - ApiKeyAuth: []
  6352. summary: Update token
  6353. tags:
  6354. - tokens
  6355. /api/tokens/{id}/name:
  6356. post:
  6357. consumes:
  6358. - application/json
  6359. description: Updates the name of a specific token
  6360. parameters:
  6361. - description: Token ID
  6362. in: path
  6363. name: id
  6364. required: true
  6365. type: integer
  6366. - description: Name information
  6367. in: body
  6368. name: name
  6369. required: true
  6370. schema:
  6371. $ref: '#/definitions/controller.UpdateTokenNameRequest'
  6372. produces:
  6373. - application/json
  6374. responses:
  6375. "200":
  6376. description: OK
  6377. schema:
  6378. $ref: '#/definitions/middleware.APIResponse'
  6379. security:
  6380. - ApiKeyAuth: []
  6381. summary: Update token name
  6382. tags:
  6383. - tokens
  6384. /api/tokens/{id}/status:
  6385. post:
  6386. consumes:
  6387. - application/json
  6388. description: Updates the status of a specific token
  6389. parameters:
  6390. - description: Token ID
  6391. in: path
  6392. name: id
  6393. required: true
  6394. type: integer
  6395. - description: Status information
  6396. in: body
  6397. name: status
  6398. required: true
  6399. schema:
  6400. $ref: '#/definitions/controller.UpdateTokenStatusRequest'
  6401. produces:
  6402. - application/json
  6403. responses:
  6404. "200":
  6405. description: OK
  6406. schema:
  6407. $ref: '#/definitions/middleware.APIResponse'
  6408. security:
  6409. - ApiKeyAuth: []
  6410. summary: Update token status
  6411. tags:
  6412. - tokens
  6413. /api/tokens/batch_delete:
  6414. post:
  6415. consumes:
  6416. - application/json
  6417. description: Deletes multiple tokens by their IDs
  6418. parameters:
  6419. - description: Token IDs
  6420. in: body
  6421. name: ids
  6422. required: true
  6423. schema:
  6424. items:
  6425. type: integer
  6426. type: array
  6427. produces:
  6428. - application/json
  6429. responses:
  6430. "200":
  6431. description: OK
  6432. schema:
  6433. $ref: '#/definitions/middleware.APIResponse'
  6434. security:
  6435. - ApiKeyAuth: []
  6436. summary: Delete multiple tokens
  6437. tags:
  6438. - tokens
  6439. /api/tokens/search:
  6440. get:
  6441. description: Returns a paginated list of tokens based on search criteria
  6442. parameters:
  6443. - description: Keyword
  6444. in: query
  6445. name: keyword
  6446. type: string
  6447. - description: Page number
  6448. in: query
  6449. name: page
  6450. type: integer
  6451. - description: Items per page
  6452. in: query
  6453. name: per_page
  6454. type: integer
  6455. - description: Order
  6456. in: query
  6457. name: order
  6458. type: string
  6459. - description: Name
  6460. in: query
  6461. name: name
  6462. type: string
  6463. - description: Key
  6464. in: query
  6465. name: key
  6466. type: string
  6467. - description: Status
  6468. in: query
  6469. name: status
  6470. type: integer
  6471. - description: Group
  6472. in: query
  6473. name: group
  6474. type: string
  6475. produces:
  6476. - application/json
  6477. responses:
  6478. "200":
  6479. description: OK
  6480. schema:
  6481. allOf:
  6482. - $ref: '#/definitions/middleware.APIResponse'
  6483. - properties:
  6484. data:
  6485. additionalProperties:
  6486. allOf:
  6487. - {}
  6488. - properties:
  6489. tokens:
  6490. items:
  6491. $ref: '#/definitions/controller.TokenResponse'
  6492. type: array
  6493. total:
  6494. type: integer
  6495. type: object
  6496. type: object
  6497. type: object
  6498. security:
  6499. - ApiKeyAuth: []
  6500. summary: Search tokens
  6501. tags:
  6502. - tokens
  6503. /mcp:
  6504. delete:
  6505. responses: {}
  6506. security:
  6507. - ApiKeyAuth: []
  6508. summary: Host MCP Streamable Server
  6509. get:
  6510. responses: {}
  6511. security:
  6512. - ApiKeyAuth: []
  6513. summary: Host MCP Streamable Server
  6514. post:
  6515. responses: {}
  6516. security:
  6517. - ApiKeyAuth: []
  6518. summary: Host MCP Streamable Server
  6519. /mcp/group/{id}:
  6520. delete:
  6521. responses: {}
  6522. security:
  6523. - ApiKeyAuth: []
  6524. summary: Group MCP Streamable Server
  6525. get:
  6526. responses: {}
  6527. security:
  6528. - ApiKeyAuth: []
  6529. summary: Group MCP Streamable Server
  6530. post:
  6531. responses: {}
  6532. security:
  6533. - ApiKeyAuth: []
  6534. summary: Group MCP Streamable Server
  6535. /mcp/group/{id}/sse:
  6536. get:
  6537. responses: {}
  6538. security:
  6539. - ApiKeyAuth: []
  6540. summary: Group MCP SSE Server
  6541. /mcp/public/{id}:
  6542. delete:
  6543. responses: {}
  6544. security:
  6545. - ApiKeyAuth: []
  6546. summary: Public MCP Streamable Server
  6547. get:
  6548. responses: {}
  6549. security:
  6550. - ApiKeyAuth: []
  6551. summary: Public MCP Streamable Server
  6552. post:
  6553. responses: {}
  6554. security:
  6555. - ApiKeyAuth: []
  6556. summary: Public MCP Streamable Server
  6557. /mcp/public/{id}/sse:
  6558. get:
  6559. responses: {}
  6560. security:
  6561. - ApiKeyAuth: []
  6562. summary: Public MCP SSE Server
  6563. /message:
  6564. post:
  6565. responses: {}
  6566. summary: MCP SSE Message
  6567. /sse:
  6568. get:
  6569. responses: {}
  6570. security:
  6571. - ApiKeyAuth: []
  6572. summary: Public MCP SSE Server
  6573. /v1/audio/speech:
  6574. post:
  6575. description: AudioSpeech
  6576. parameters:
  6577. - description: Request
  6578. in: body
  6579. name: request
  6580. required: true
  6581. schema:
  6582. $ref: '#/definitions/model.TextToSpeechRequest'
  6583. - description: Optional Aiproxy-Channel header
  6584. in: header
  6585. name: Aiproxy-Channel
  6586. type: string
  6587. produces:
  6588. - application/json
  6589. responses:
  6590. "200":
  6591. description: audio binary
  6592. headers:
  6593. X-RateLimit-Limit-Requests:
  6594. description: X-RateLimit-Limit-Requests
  6595. type: integer
  6596. X-RateLimit-Limit-Tokens:
  6597. description: X-RateLimit-Limit-Tokens
  6598. type: integer
  6599. X-RateLimit-Remaining-Requests:
  6600. description: X-RateLimit-Remaining-Requests
  6601. type: integer
  6602. X-RateLimit-Remaining-Tokens:
  6603. description: X-RateLimit-Remaining-Tokens
  6604. type: integer
  6605. X-RateLimit-Reset-Requests:
  6606. description: X-RateLimit-Reset-Requests
  6607. type: string
  6608. X-RateLimit-Reset-Tokens:
  6609. description: X-RateLimit-Reset-Tokens
  6610. type: string
  6611. schema:
  6612. type: file
  6613. security:
  6614. - ApiKeyAuth: []
  6615. summary: AudioSpeech
  6616. tags:
  6617. - relay
  6618. /v1/audio/transcriptions:
  6619. post:
  6620. description: AudioTranscription
  6621. parameters:
  6622. - description: Model
  6623. in: formData
  6624. name: model
  6625. required: true
  6626. type: string
  6627. - description: File
  6628. in: formData
  6629. name: file
  6630. required: true
  6631. type: file
  6632. - description: Optional Aiproxy-Channel header
  6633. in: header
  6634. name: Aiproxy-Channel
  6635. type: string
  6636. produces:
  6637. - application/json
  6638. responses:
  6639. "200":
  6640. description: OK
  6641. headers:
  6642. X-RateLimit-Limit-Requests:
  6643. description: X-RateLimit-Limit-Requests
  6644. type: integer
  6645. X-RateLimit-Limit-Tokens:
  6646. description: X-RateLimit-Limit-Tokens
  6647. type: integer
  6648. X-RateLimit-Remaining-Requests:
  6649. description: X-RateLimit-Remaining-Requests
  6650. type: integer
  6651. X-RateLimit-Remaining-Tokens:
  6652. description: X-RateLimit-Remaining-Tokens
  6653. type: integer
  6654. X-RateLimit-Reset-Requests:
  6655. description: X-RateLimit-Reset-Requests
  6656. type: string
  6657. X-RateLimit-Reset-Tokens:
  6658. description: X-RateLimit-Reset-Tokens
  6659. type: string
  6660. schema:
  6661. $ref: '#/definitions/model.SttJSONResponse'
  6662. security:
  6663. - ApiKeyAuth: []
  6664. summary: AudioTranscription
  6665. tags:
  6666. - relay
  6667. /v1/audio/translations:
  6668. post:
  6669. description: AudioTranslation
  6670. parameters:
  6671. - description: Model
  6672. in: formData
  6673. name: model
  6674. required: true
  6675. type: string
  6676. - description: File
  6677. in: formData
  6678. name: file
  6679. required: true
  6680. type: file
  6681. - description: Optional Aiproxy-Channel header
  6682. in: header
  6683. name: Aiproxy-Channel
  6684. type: string
  6685. produces:
  6686. - application/json
  6687. responses:
  6688. "200":
  6689. description: OK
  6690. headers:
  6691. X-RateLimit-Limit-Requests:
  6692. description: X-RateLimit-Limit-Requests
  6693. type: integer
  6694. X-RateLimit-Limit-Tokens:
  6695. description: X-RateLimit-Limit-Tokens
  6696. type: integer
  6697. X-RateLimit-Remaining-Requests:
  6698. description: X-RateLimit-Remaining-Requests
  6699. type: integer
  6700. X-RateLimit-Remaining-Tokens:
  6701. description: X-RateLimit-Remaining-Tokens
  6702. type: integer
  6703. X-RateLimit-Reset-Requests:
  6704. description: X-RateLimit-Reset-Requests
  6705. type: string
  6706. X-RateLimit-Reset-Tokens:
  6707. description: X-RateLimit-Reset-Tokens
  6708. type: string
  6709. schema:
  6710. $ref: '#/definitions/model.SttJSONResponse'
  6711. security:
  6712. - ApiKeyAuth: []
  6713. summary: AudioTranslation
  6714. tags:
  6715. - relay
  6716. /v1/chat/completions:
  6717. post:
  6718. description: ChatCompletions
  6719. parameters:
  6720. - description: Request
  6721. in: body
  6722. name: request
  6723. required: true
  6724. schema:
  6725. $ref: '#/definitions/model.GeneralOpenAIRequest'
  6726. - description: Optional Aiproxy-Channel header
  6727. in: header
  6728. name: Aiproxy-Channel
  6729. type: string
  6730. produces:
  6731. - application/json
  6732. responses:
  6733. "200":
  6734. description: OK
  6735. headers:
  6736. X-RateLimit-Limit-Requests:
  6737. description: X-RateLimit-Limit-Requests
  6738. type: integer
  6739. X-RateLimit-Limit-Tokens:
  6740. description: X-RateLimit-Limit-Tokens
  6741. type: integer
  6742. X-RateLimit-Remaining-Requests:
  6743. description: X-RateLimit-Remaining-Requests
  6744. type: integer
  6745. X-RateLimit-Remaining-Tokens:
  6746. description: X-RateLimit-Remaining-Tokens
  6747. type: integer
  6748. X-RateLimit-Reset-Requests:
  6749. description: X-RateLimit-Reset-Requests
  6750. type: string
  6751. X-RateLimit-Reset-Tokens:
  6752. description: X-RateLimit-Reset-Tokens
  6753. type: string
  6754. schema:
  6755. $ref: '#/definitions/model.TextResponse'
  6756. security:
  6757. - ApiKeyAuth: []
  6758. summary: ChatCompletions
  6759. tags:
  6760. - relay
  6761. /v1/completions:
  6762. post:
  6763. description: Completions
  6764. parameters:
  6765. - description: Request
  6766. in: body
  6767. name: request
  6768. required: true
  6769. schema:
  6770. $ref: '#/definitions/model.GeneralOpenAIRequest'
  6771. - description: Optional Aiproxy-Channel header
  6772. in: header
  6773. name: Aiproxy-Channel
  6774. type: string
  6775. produces:
  6776. - application/json
  6777. responses:
  6778. "200":
  6779. description: OK
  6780. headers:
  6781. X-RateLimit-Limit-Requests:
  6782. description: X-RateLimit-Limit-Requests
  6783. type: integer
  6784. X-RateLimit-Limit-Tokens:
  6785. description: X-RateLimit-Limit-Tokens
  6786. type: integer
  6787. X-RateLimit-Remaining-Requests:
  6788. description: X-RateLimit-Remaining-Requests
  6789. type: integer
  6790. X-RateLimit-Remaining-Tokens:
  6791. description: X-RateLimit-Remaining-Tokens
  6792. type: integer
  6793. X-RateLimit-Reset-Requests:
  6794. description: X-RateLimit-Reset-Requests
  6795. type: string
  6796. X-RateLimit-Reset-Tokens:
  6797. description: X-RateLimit-Reset-Tokens
  6798. type: string
  6799. schema:
  6800. $ref: '#/definitions/model.TextResponse'
  6801. security:
  6802. - ApiKeyAuth: []
  6803. summary: Completions
  6804. tags:
  6805. - relay
  6806. /v1/dashboard/billing/subscription:
  6807. get:
  6808. description: Get subscription
  6809. produces:
  6810. - application/json
  6811. responses:
  6812. "200":
  6813. description: OK
  6814. schema:
  6815. $ref: '#/definitions/openai.SubscriptionResponse'
  6816. security:
  6817. - ApiKeyAuth: []
  6818. summary: Get subscription
  6819. tags:
  6820. - relay
  6821. /v1/dashboard/billing/usage:
  6822. get:
  6823. description: Get usage
  6824. produces:
  6825. - application/json
  6826. responses:
  6827. "200":
  6828. description: OK
  6829. schema:
  6830. $ref: '#/definitions/openai.UsageResponse'
  6831. security:
  6832. - ApiKeyAuth: []
  6833. summary: Get usage
  6834. tags:
  6835. - relay
  6836. /v1/embeddings:
  6837. post:
  6838. description: Embeddings
  6839. parameters:
  6840. - description: Request
  6841. in: body
  6842. name: request
  6843. required: true
  6844. schema:
  6845. $ref: '#/definitions/model.EmbeddingRequest'
  6846. - description: Optional Aiproxy-Channel header
  6847. in: header
  6848. name: Aiproxy-Channel
  6849. type: string
  6850. produces:
  6851. - application/json
  6852. responses:
  6853. "200":
  6854. description: OK
  6855. headers:
  6856. X-RateLimit-Limit-Requests:
  6857. description: X-RateLimit-Limit-Requests
  6858. type: integer
  6859. X-RateLimit-Limit-Tokens:
  6860. description: X-RateLimit-Limit-Tokens
  6861. type: integer
  6862. X-RateLimit-Remaining-Requests:
  6863. description: X-RateLimit-Remaining-Requests
  6864. type: integer
  6865. X-RateLimit-Remaining-Tokens:
  6866. description: X-RateLimit-Remaining-Tokens
  6867. type: integer
  6868. X-RateLimit-Reset-Requests:
  6869. description: X-RateLimit-Reset-Requests
  6870. type: string
  6871. X-RateLimit-Reset-Tokens:
  6872. description: X-RateLimit-Reset-Tokens
  6873. type: string
  6874. schema:
  6875. $ref: '#/definitions/model.EmbeddingResponse'
  6876. security:
  6877. - ApiKeyAuth: []
  6878. summary: Embeddings
  6879. tags:
  6880. - relay
  6881. /v1/images/edits:
  6882. post:
  6883. description: ImagesEdits
  6884. parameters:
  6885. - description: Prompt
  6886. in: formData
  6887. name: prompt
  6888. required: true
  6889. type: string
  6890. - description: Model
  6891. in: formData
  6892. name: model
  6893. required: true
  6894. type: string
  6895. - description: Images
  6896. in: formData
  6897. name: image
  6898. required: true
  6899. type: file
  6900. - description: Optional Aiproxy-Channel header
  6901. in: header
  6902. name: Aiproxy-Channel
  6903. type: string
  6904. produces:
  6905. - application/json
  6906. responses:
  6907. "200":
  6908. description: OK
  6909. headers:
  6910. X-RateLimit-Limit-Requests:
  6911. description: X-RateLimit-Limit-Requests
  6912. type: integer
  6913. X-RateLimit-Limit-Tokens:
  6914. description: X-RateLimit-Limit-Tokens
  6915. type: integer
  6916. X-RateLimit-Remaining-Requests:
  6917. description: X-RateLimit-Remaining-Requests
  6918. type: integer
  6919. X-RateLimit-Remaining-Tokens:
  6920. description: X-RateLimit-Remaining-Tokens
  6921. type: integer
  6922. X-RateLimit-Reset-Requests:
  6923. description: X-RateLimit-Reset-Requests
  6924. type: string
  6925. X-RateLimit-Reset-Tokens:
  6926. description: X-RateLimit-Reset-Tokens
  6927. type: string
  6928. schema:
  6929. $ref: '#/definitions/model.SttJSONResponse'
  6930. security:
  6931. - ApiKeyAuth: []
  6932. summary: ImagesEdits
  6933. tags:
  6934. - relay
  6935. /v1/images/generations:
  6936. post:
  6937. description: ImagesGenerations
  6938. parameters:
  6939. - description: Request
  6940. in: body
  6941. name: request
  6942. required: true
  6943. schema:
  6944. $ref: '#/definitions/model.ImageRequest'
  6945. - description: Optional Aiproxy-Channel header
  6946. in: header
  6947. name: Aiproxy-Channel
  6948. type: string
  6949. produces:
  6950. - application/json
  6951. responses:
  6952. "200":
  6953. description: OK
  6954. headers:
  6955. X-RateLimit-Limit-Requests:
  6956. description: X-RateLimit-Limit-Requests
  6957. type: integer
  6958. X-RateLimit-Limit-Tokens:
  6959. description: X-RateLimit-Limit-Tokens
  6960. type: integer
  6961. X-RateLimit-Remaining-Requests:
  6962. description: X-RateLimit-Remaining-Requests
  6963. type: integer
  6964. X-RateLimit-Remaining-Tokens:
  6965. description: X-RateLimit-Remaining-Tokens
  6966. type: integer
  6967. X-RateLimit-Reset-Requests:
  6968. description: X-RateLimit-Reset-Requests
  6969. type: string
  6970. X-RateLimit-Reset-Tokens:
  6971. description: X-RateLimit-Reset-Tokens
  6972. type: string
  6973. schema:
  6974. $ref: '#/definitions/model.ImageResponse'
  6975. security:
  6976. - ApiKeyAuth: []
  6977. summary: ImagesGenerations
  6978. tags:
  6979. - relay
  6980. /v1/messages:
  6981. post:
  6982. description: Anthropic
  6983. parameters:
  6984. - description: Request
  6985. in: body
  6986. name: request
  6987. required: true
  6988. schema:
  6989. $ref: '#/definitions/model.AnthropicMessageRequest'
  6990. - description: Optional Aiproxy-Channel header
  6991. in: header
  6992. name: Aiproxy-Channel
  6993. type: string
  6994. produces:
  6995. - application/json
  6996. responses:
  6997. "200":
  6998. description: OK
  6999. headers:
  7000. X-RateLimit-Limit-Requests:
  7001. description: X-RateLimit-Limit-Requests
  7002. type: integer
  7003. X-RateLimit-Limit-Tokens:
  7004. description: X-RateLimit-Limit-Tokens
  7005. type: integer
  7006. X-RateLimit-Remaining-Requests:
  7007. description: X-RateLimit-Remaining-Requests
  7008. type: integer
  7009. X-RateLimit-Remaining-Tokens:
  7010. description: X-RateLimit-Remaining-Tokens
  7011. type: integer
  7012. X-RateLimit-Reset-Requests:
  7013. description: X-RateLimit-Reset-Requests
  7014. type: string
  7015. X-RateLimit-Reset-Tokens:
  7016. description: X-RateLimit-Reset-Tokens
  7017. type: string
  7018. schema:
  7019. $ref: '#/definitions/model.TextResponse'
  7020. security:
  7021. - ApiKeyAuth: []
  7022. summary: Anthropic
  7023. tags:
  7024. - relay
  7025. /v1/models:
  7026. get:
  7027. description: List all models
  7028. produces:
  7029. - application/json
  7030. responses:
  7031. "200":
  7032. description: OK
  7033. schema:
  7034. properties:
  7035. data:
  7036. items:
  7037. $ref: '#/definitions/controller.OpenAIModels'
  7038. type: array
  7039. object:
  7040. type: string
  7041. type: object
  7042. security:
  7043. - ApiKeyAuth: []
  7044. summary: List models
  7045. tags:
  7046. - relay
  7047. /v1/models/{model}:
  7048. get:
  7049. description: Retrieve a model
  7050. produces:
  7051. - application/json
  7052. responses:
  7053. "200":
  7054. description: OK
  7055. schema:
  7056. $ref: '#/definitions/controller.OpenAIModels'
  7057. security:
  7058. - ApiKeyAuth: []
  7059. summary: Retrieve model
  7060. tags:
  7061. - relay
  7062. /v1/parse/pdf:
  7063. post:
  7064. description: ParsePdf
  7065. parameters:
  7066. - description: Model
  7067. in: formData
  7068. name: model
  7069. required: true
  7070. type: string
  7071. - description: File
  7072. in: formData
  7073. name: file
  7074. required: true
  7075. type: file
  7076. - description: Optional Aiproxy-Channel header
  7077. in: header
  7078. name: Aiproxy-Channel
  7079. type: string
  7080. produces:
  7081. - application/json
  7082. responses:
  7083. "200":
  7084. description: OK
  7085. headers:
  7086. X-RateLimit-Limit-Requests:
  7087. description: X-RateLimit-Limit-Requests
  7088. type: integer
  7089. X-RateLimit-Limit-Tokens:
  7090. description: X-RateLimit-Limit-Tokens
  7091. type: integer
  7092. X-RateLimit-Remaining-Requests:
  7093. description: X-RateLimit-Remaining-Requests
  7094. type: integer
  7095. X-RateLimit-Remaining-Tokens:
  7096. description: X-RateLimit-Remaining-Tokens
  7097. type: integer
  7098. X-RateLimit-Reset-Requests:
  7099. description: X-RateLimit-Reset-Requests
  7100. type: string
  7101. X-RateLimit-Reset-Tokens:
  7102. description: X-RateLimit-Reset-Tokens
  7103. type: string
  7104. schema:
  7105. $ref: '#/definitions/model.ParsePdfResponse'
  7106. security:
  7107. - ApiKeyAuth: []
  7108. summary: ParsePdf
  7109. tags:
  7110. - relay
  7111. /v1/rerank:
  7112. post:
  7113. description: Rerank
  7114. parameters:
  7115. - description: Request
  7116. in: body
  7117. name: request
  7118. required: true
  7119. schema:
  7120. $ref: '#/definitions/model.RerankRequest'
  7121. - description: Optional Aiproxy-Channel header
  7122. in: header
  7123. name: Aiproxy-Channel
  7124. type: string
  7125. produces:
  7126. - application/json
  7127. responses:
  7128. "200":
  7129. description: OK
  7130. headers:
  7131. X-RateLimit-Limit-Requests:
  7132. description: X-RateLimit-Limit-Requests
  7133. type: integer
  7134. X-RateLimit-Limit-Tokens:
  7135. description: X-RateLimit-Limit-Tokens
  7136. type: integer
  7137. X-RateLimit-Remaining-Requests:
  7138. description: X-RateLimit-Remaining-Requests
  7139. type: integer
  7140. X-RateLimit-Remaining-Tokens:
  7141. description: X-RateLimit-Remaining-Tokens
  7142. type: integer
  7143. X-RateLimit-Reset-Requests:
  7144. description: X-RateLimit-Reset-Requests
  7145. type: string
  7146. X-RateLimit-Reset-Tokens:
  7147. description: X-RateLimit-Reset-Tokens
  7148. type: string
  7149. schema:
  7150. $ref: '#/definitions/model.RerankResponse'
  7151. security:
  7152. - ApiKeyAuth: []
  7153. summary: Rerank
  7154. tags:
  7155. - relay
  7156. /v1/video/generations/{id}/content/video:
  7157. get:
  7158. description: VideoGenerationsContent
  7159. parameters:
  7160. - description: Request
  7161. in: body
  7162. name: request
  7163. required: true
  7164. schema:
  7165. $ref: '#/definitions/model.VideoGenerationJobRequest'
  7166. - description: Optional Aiproxy-Channel header
  7167. in: header
  7168. name: Aiproxy-Channel
  7169. type: string
  7170. produces:
  7171. - application/json
  7172. responses:
  7173. "200":
  7174. description: video binary
  7175. headers:
  7176. X-RateLimit-Limit-Requests:
  7177. description: X-RateLimit-Limit-Requests
  7178. type: integer
  7179. X-RateLimit-Limit-Tokens:
  7180. description: X-RateLimit-Limit-Tokens
  7181. type: integer
  7182. X-RateLimit-Remaining-Requests:
  7183. description: X-RateLimit-Remaining-Requests
  7184. type: integer
  7185. X-RateLimit-Remaining-Tokens:
  7186. description: X-RateLimit-Remaining-Tokens
  7187. type: integer
  7188. X-RateLimit-Reset-Requests:
  7189. description: X-RateLimit-Reset-Requests
  7190. type: string
  7191. X-RateLimit-Reset-Tokens:
  7192. description: X-RateLimit-Reset-Tokens
  7193. type: string
  7194. schema:
  7195. type: file
  7196. security:
  7197. - ApiKeyAuth: []
  7198. summary: VideoGenerationsContent
  7199. tags:
  7200. - relay
  7201. /v1/video/generations/jobs:
  7202. post:
  7203. description: VideoGenerationsJobs
  7204. parameters:
  7205. - description: Request
  7206. in: body
  7207. name: request
  7208. required: true
  7209. schema:
  7210. $ref: '#/definitions/model.VideoGenerationJobRequest'
  7211. - description: Optional Aiproxy-Channel header
  7212. in: header
  7213. name: Aiproxy-Channel
  7214. type: string
  7215. produces:
  7216. - application/json
  7217. responses:
  7218. "200":
  7219. description: OK
  7220. headers:
  7221. X-RateLimit-Limit-Requests:
  7222. description: X-RateLimit-Limit-Requests
  7223. type: integer
  7224. X-RateLimit-Limit-Tokens:
  7225. description: X-RateLimit-Limit-Tokens
  7226. type: integer
  7227. X-RateLimit-Remaining-Requests:
  7228. description: X-RateLimit-Remaining-Requests
  7229. type: integer
  7230. X-RateLimit-Remaining-Tokens:
  7231. description: X-RateLimit-Remaining-Tokens
  7232. type: integer
  7233. X-RateLimit-Reset-Requests:
  7234. description: X-RateLimit-Reset-Requests
  7235. type: string
  7236. X-RateLimit-Reset-Tokens:
  7237. description: X-RateLimit-Reset-Tokens
  7238. type: string
  7239. schema:
  7240. $ref: '#/definitions/model.VideoGenerationJob'
  7241. security:
  7242. - ApiKeyAuth: []
  7243. summary: VideoGenerationsJobs
  7244. tags:
  7245. - relay
  7246. /v1/video/generations/jobs/{id}:
  7247. get:
  7248. description: VideoGenerationsGetJobs
  7249. parameters:
  7250. - description: Request
  7251. in: body
  7252. name: request
  7253. required: true
  7254. schema:
  7255. $ref: '#/definitions/model.VideoGenerationJobRequest'
  7256. - description: Optional Aiproxy-Channel header
  7257. in: header
  7258. name: Aiproxy-Channel
  7259. type: string
  7260. produces:
  7261. - application/json
  7262. responses:
  7263. "200":
  7264. description: OK
  7265. headers:
  7266. X-RateLimit-Limit-Requests:
  7267. description: X-RateLimit-Limit-Requests
  7268. type: integer
  7269. X-RateLimit-Limit-Tokens:
  7270. description: X-RateLimit-Limit-Tokens
  7271. type: integer
  7272. X-RateLimit-Remaining-Requests:
  7273. description: X-RateLimit-Remaining-Requests
  7274. type: integer
  7275. X-RateLimit-Remaining-Tokens:
  7276. description: X-RateLimit-Remaining-Tokens
  7277. type: integer
  7278. X-RateLimit-Reset-Requests:
  7279. description: X-RateLimit-Reset-Requests
  7280. type: string
  7281. X-RateLimit-Reset-Tokens:
  7282. description: X-RateLimit-Reset-Tokens
  7283. type: string
  7284. schema:
  7285. $ref: '#/definitions/model.VideoGenerationJob'
  7286. security:
  7287. - ApiKeyAuth: []
  7288. summary: VideoGenerationsGetJobs
  7289. tags:
  7290. - relay
  7291. securityDefinitions:
  7292. ApiKeyAuth:
  7293. in: header
  7294. name: Authorization
  7295. type: apiKey
  7296. swagger: "2.0"