2
0

docs.go 348 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116
  1. // Package docs Code generated by swaggo/swag. DO NOT EDIT
  2. package docs
  3. import "github.com/swaggo/swag"
  4. const docTemplate = `{
  5. "schemes": {{ marshal .Schemes }},
  6. "swagger": "2.0",
  7. "info": {
  8. "description": "{{escape .Description}}",
  9. "title": "{{.Title}}",
  10. "contact": {},
  11. "version": "{{.Version}}"
  12. },
  13. "host": "{{.Host}}",
  14. "basePath": "{{.BasePath}}",
  15. "paths": {
  16. "/api/channel/": {
  17. "post": {
  18. "security": [
  19. {
  20. "ApiKeyAuth": []
  21. }
  22. ],
  23. "description": "Adds a new channel to the system",
  24. "consumes": [
  25. "application/json"
  26. ],
  27. "produces": [
  28. "application/json"
  29. ],
  30. "tags": [
  31. "channel"
  32. ],
  33. "summary": "Add a single channel",
  34. "parameters": [
  35. {
  36. "description": "Channel information",
  37. "name": "channel",
  38. "in": "body",
  39. "required": true,
  40. "schema": {
  41. "$ref": "#/definitions/controller.AddChannelRequest"
  42. }
  43. }
  44. ],
  45. "responses": {
  46. "200": {
  47. "description": "OK",
  48. "schema": {
  49. "$ref": "#/definitions/middleware.APIResponse"
  50. }
  51. }
  52. }
  53. }
  54. },
  55. "/api/channel/{id}": {
  56. "get": {
  57. "security": [
  58. {
  59. "ApiKeyAuth": []
  60. }
  61. ],
  62. "description": "Returns detailed information about a specific channel",
  63. "produces": [
  64. "application/json"
  65. ],
  66. "tags": [
  67. "channel"
  68. ],
  69. "summary": "Get a channel by ID",
  70. "parameters": [
  71. {
  72. "type": "integer",
  73. "description": "Channel ID",
  74. "name": "id",
  75. "in": "path",
  76. "required": true
  77. }
  78. ],
  79. "responses": {
  80. "200": {
  81. "description": "OK",
  82. "schema": {
  83. "allOf": [
  84. {
  85. "$ref": "#/definitions/middleware.APIResponse"
  86. },
  87. {
  88. "type": "object",
  89. "properties": {
  90. "data": {
  91. "$ref": "#/definitions/model.Channel"
  92. }
  93. }
  94. }
  95. ]
  96. }
  97. }
  98. }
  99. },
  100. "put": {
  101. "security": [
  102. {
  103. "ApiKeyAuth": []
  104. }
  105. ],
  106. "description": "Updates an existing channel by its ID",
  107. "consumes": [
  108. "application/json"
  109. ],
  110. "produces": [
  111. "application/json"
  112. ],
  113. "tags": [
  114. "channel"
  115. ],
  116. "summary": "Update a channel",
  117. "parameters": [
  118. {
  119. "type": "integer",
  120. "description": "Channel ID",
  121. "name": "id",
  122. "in": "path",
  123. "required": true
  124. },
  125. {
  126. "description": "Updated channel information",
  127. "name": "channel",
  128. "in": "body",
  129. "required": true,
  130. "schema": {
  131. "$ref": "#/definitions/controller.AddChannelRequest"
  132. }
  133. }
  134. ],
  135. "responses": {
  136. "200": {
  137. "description": "OK",
  138. "schema": {
  139. "allOf": [
  140. {
  141. "$ref": "#/definitions/middleware.APIResponse"
  142. },
  143. {
  144. "type": "object",
  145. "properties": {
  146. "data": {
  147. "$ref": "#/definitions/model.Channel"
  148. }
  149. }
  150. }
  151. ]
  152. }
  153. }
  154. }
  155. },
  156. "delete": {
  157. "security": [
  158. {
  159. "ApiKeyAuth": []
  160. }
  161. ],
  162. "description": "Deletes a channel by its ID",
  163. "produces": [
  164. "application/json"
  165. ],
  166. "tags": [
  167. "channel"
  168. ],
  169. "summary": "Delete a channel",
  170. "parameters": [
  171. {
  172. "type": "integer",
  173. "description": "Channel ID",
  174. "name": "id",
  175. "in": "path",
  176. "required": true
  177. }
  178. ],
  179. "responses": {
  180. "200": {
  181. "description": "OK",
  182. "schema": {
  183. "$ref": "#/definitions/middleware.APIResponse"
  184. }
  185. }
  186. }
  187. }
  188. },
  189. "/api/channel/{id}/balance": {
  190. "get": {
  191. "security": [
  192. {
  193. "ApiKeyAuth": []
  194. }
  195. ],
  196. "description": "Updates the balance for a single channel",
  197. "produces": [
  198. "application/json"
  199. ],
  200. "tags": [
  201. "channel"
  202. ],
  203. "summary": "Update channel balance",
  204. "parameters": [
  205. {
  206. "type": "integer",
  207. "description": "Channel ID",
  208. "name": "id",
  209. "in": "path",
  210. "required": true
  211. }
  212. ],
  213. "responses": {
  214. "200": {
  215. "description": "OK",
  216. "schema": {
  217. "allOf": [
  218. {
  219. "$ref": "#/definitions/middleware.APIResponse"
  220. },
  221. {
  222. "type": "object",
  223. "properties": {
  224. "data": {
  225. "type": "number"
  226. }
  227. }
  228. }
  229. ]
  230. }
  231. }
  232. }
  233. }
  234. },
  235. "/api/channel/{id}/status": {
  236. "post": {
  237. "security": [
  238. {
  239. "ApiKeyAuth": []
  240. }
  241. ],
  242. "description": "Updates the status of a channel by its ID",
  243. "consumes": [
  244. "application/json"
  245. ],
  246. "produces": [
  247. "application/json"
  248. ],
  249. "tags": [
  250. "channel"
  251. ],
  252. "summary": "Update channel status",
  253. "parameters": [
  254. {
  255. "type": "integer",
  256. "description": "Channel ID",
  257. "name": "id",
  258. "in": "path",
  259. "required": true
  260. },
  261. {
  262. "description": "Status information",
  263. "name": "status",
  264. "in": "body",
  265. "required": true,
  266. "schema": {
  267. "$ref": "#/definitions/controller.UpdateChannelStatusRequest"
  268. }
  269. }
  270. ],
  271. "responses": {
  272. "200": {
  273. "description": "OK",
  274. "schema": {
  275. "$ref": "#/definitions/middleware.APIResponse"
  276. }
  277. }
  278. }
  279. }
  280. },
  281. "/api/channel/{id}/test": {
  282. "get": {
  283. "security": [
  284. {
  285. "ApiKeyAuth": []
  286. }
  287. ],
  288. "description": "Tests all models in the channel",
  289. "produces": [
  290. "application/json"
  291. ],
  292. "tags": [
  293. "channel"
  294. ],
  295. "summary": "Test channel models",
  296. "parameters": [
  297. {
  298. "type": "integer",
  299. "description": "Channel ID",
  300. "name": "id",
  301. "in": "path",
  302. "required": true
  303. },
  304. {
  305. "type": "boolean",
  306. "description": "Return success",
  307. "name": "return_success",
  308. "in": "query"
  309. },
  310. {
  311. "type": "boolean",
  312. "description": "Success body",
  313. "name": "success_body",
  314. "in": "query"
  315. },
  316. {
  317. "type": "boolean",
  318. "description": "Stream",
  319. "name": "stream",
  320. "in": "query"
  321. }
  322. ],
  323. "responses": {
  324. "200": {
  325. "description": "OK",
  326. "schema": {
  327. "allOf": [
  328. {
  329. "$ref": "#/definitions/middleware.APIResponse"
  330. },
  331. {
  332. "type": "object",
  333. "properties": {
  334. "data": {
  335. "type": "array",
  336. "items": {
  337. "$ref": "#/definitions/controller.TestResult"
  338. }
  339. }
  340. }
  341. }
  342. ]
  343. }
  344. }
  345. }
  346. }
  347. },
  348. "/api/channel/{id}/{model}": {
  349. "get": {
  350. "security": [
  351. {
  352. "ApiKeyAuth": []
  353. }
  354. ],
  355. "description": "Tests a single model in the channel",
  356. "produces": [
  357. "application/json"
  358. ],
  359. "tags": [
  360. "channel"
  361. ],
  362. "summary": "Test channel model",
  363. "parameters": [
  364. {
  365. "type": "integer",
  366. "description": "Channel ID",
  367. "name": "id",
  368. "in": "path",
  369. "required": true
  370. },
  371. {
  372. "type": "string",
  373. "description": "Model name",
  374. "name": "model",
  375. "in": "path",
  376. "required": true
  377. }
  378. ],
  379. "responses": {
  380. "200": {
  381. "description": "OK",
  382. "schema": {
  383. "allOf": [
  384. {
  385. "$ref": "#/definitions/middleware.APIResponse"
  386. },
  387. {
  388. "type": "object",
  389. "properties": {
  390. "data": {
  391. "$ref": "#/definitions/model.ChannelTest"
  392. }
  393. }
  394. }
  395. ]
  396. }
  397. }
  398. }
  399. }
  400. },
  401. "/api/channels/": {
  402. "get": {
  403. "security": [
  404. {
  405. "ApiKeyAuth": []
  406. }
  407. ],
  408. "description": "Returns a paginated list of channels with optional filters",
  409. "produces": [
  410. "application/json"
  411. ],
  412. "tags": [
  413. "channels"
  414. ],
  415. "summary": "Get channels with pagination",
  416. "parameters": [
  417. {
  418. "type": "integer",
  419. "description": "Page number",
  420. "name": "page",
  421. "in": "query"
  422. },
  423. {
  424. "type": "integer",
  425. "description": "Items per page",
  426. "name": "per_page",
  427. "in": "query"
  428. },
  429. {
  430. "type": "integer",
  431. "description": "Filter by id",
  432. "name": "id",
  433. "in": "query"
  434. },
  435. {
  436. "type": "string",
  437. "description": "Filter by name",
  438. "name": "name",
  439. "in": "query"
  440. },
  441. {
  442. "type": "string",
  443. "description": "Filter by key",
  444. "name": "key",
  445. "in": "query"
  446. },
  447. {
  448. "type": "integer",
  449. "description": "Filter by channel type",
  450. "name": "channel_type",
  451. "in": "query"
  452. },
  453. {
  454. "type": "string",
  455. "description": "Filter by base URL",
  456. "name": "base_url",
  457. "in": "query"
  458. },
  459. {
  460. "type": "string",
  461. "description": "Order by field",
  462. "name": "order",
  463. "in": "query"
  464. }
  465. ],
  466. "responses": {
  467. "200": {
  468. "description": "OK",
  469. "schema": {
  470. "allOf": [
  471. {
  472. "$ref": "#/definitions/middleware.APIResponse"
  473. },
  474. {
  475. "type": "object",
  476. "properties": {
  477. "data": {
  478. "type": "object",
  479. "additionalProperties": {
  480. "allOf": [
  481. {},
  482. {
  483. "type": "object",
  484. "properties": {
  485. "channels": {
  486. "type": "array",
  487. "items": {
  488. "$ref": "#/definitions/model.Channel"
  489. }
  490. },
  491. "total": {
  492. "type": "integer"
  493. }
  494. }
  495. }
  496. ]
  497. }
  498. }
  499. }
  500. }
  501. ]
  502. }
  503. }
  504. }
  505. },
  506. "post": {
  507. "security": [
  508. {
  509. "ApiKeyAuth": []
  510. }
  511. ],
  512. "description": "Adds multiple channels in a batch operation",
  513. "consumes": [
  514. "application/json"
  515. ],
  516. "produces": [
  517. "application/json"
  518. ],
  519. "tags": [
  520. "channels"
  521. ],
  522. "summary": "Add multiple channels",
  523. "parameters": [
  524. {
  525. "description": "Channel information",
  526. "name": "channels",
  527. "in": "body",
  528. "required": true,
  529. "schema": {
  530. "type": "array",
  531. "items": {
  532. "$ref": "#/definitions/controller.AddChannelRequest"
  533. }
  534. }
  535. }
  536. ],
  537. "responses": {
  538. "200": {
  539. "description": "OK",
  540. "schema": {
  541. "$ref": "#/definitions/middleware.APIResponse"
  542. }
  543. }
  544. }
  545. }
  546. },
  547. "/api/channels/all": {
  548. "get": {
  549. "security": [
  550. {
  551. "ApiKeyAuth": []
  552. }
  553. ],
  554. "description": "Returns a list of all channels without pagination",
  555. "produces": [
  556. "application/json"
  557. ],
  558. "tags": [
  559. "channels"
  560. ],
  561. "summary": "Get all channels",
  562. "responses": {
  563. "200": {
  564. "description": "OK",
  565. "schema": {
  566. "allOf": [
  567. {
  568. "$ref": "#/definitions/middleware.APIResponse"
  569. },
  570. {
  571. "type": "object",
  572. "properties": {
  573. "data": {
  574. "type": "array",
  575. "items": {
  576. "$ref": "#/definitions/model.Channel"
  577. }
  578. }
  579. }
  580. }
  581. ]
  582. }
  583. }
  584. }
  585. }
  586. },
  587. "/api/channels/balance": {
  588. "get": {
  589. "security": [
  590. {
  591. "ApiKeyAuth": []
  592. }
  593. ],
  594. "description": "Updates the balance for all channels",
  595. "produces": [
  596. "application/json"
  597. ],
  598. "tags": [
  599. "channel"
  600. ],
  601. "summary": "Update all channels balance",
  602. "responses": {
  603. "200": {
  604. "description": "OK",
  605. "schema": {
  606. "$ref": "#/definitions/middleware.APIResponse"
  607. }
  608. }
  609. }
  610. }
  611. },
  612. "/api/channels/batch_delete": {
  613. "post": {
  614. "security": [
  615. {
  616. "ApiKeyAuth": []
  617. }
  618. ],
  619. "description": "Deletes multiple channels by their IDs",
  620. "consumes": [
  621. "application/json"
  622. ],
  623. "produces": [
  624. "application/json"
  625. ],
  626. "tags": [
  627. "channels"
  628. ],
  629. "summary": "Delete multiple channels",
  630. "parameters": [
  631. {
  632. "description": "Channel IDs",
  633. "name": "ids",
  634. "in": "body",
  635. "required": true,
  636. "schema": {
  637. "type": "array",
  638. "items": {
  639. "type": "integer"
  640. }
  641. }
  642. }
  643. ],
  644. "responses": {
  645. "200": {
  646. "description": "OK",
  647. "schema": {
  648. "$ref": "#/definitions/middleware.APIResponse"
  649. }
  650. }
  651. }
  652. }
  653. },
  654. "/api/channels/import/oneapi": {
  655. "post": {
  656. "security": [
  657. {
  658. "ApiKeyAuth": []
  659. }
  660. ],
  661. "description": "Imports channels from OneAPI",
  662. "produces": [
  663. "application/json"
  664. ],
  665. "tags": [
  666. "channels"
  667. ],
  668. "summary": "Import channel from OneAPI",
  669. "parameters": [
  670. {
  671. "description": "Import channel from OneAPI request",
  672. "name": "request",
  673. "in": "body",
  674. "required": true,
  675. "schema": {
  676. "$ref": "#/definitions/controller.ImportChannelFromOneAPIRequest"
  677. }
  678. }
  679. ],
  680. "responses": {
  681. "200": {
  682. "description": "OK",
  683. "schema": {
  684. "allOf": [
  685. {
  686. "$ref": "#/definitions/middleware.APIResponse"
  687. },
  688. {
  689. "type": "object",
  690. "properties": {
  691. "data": {
  692. "type": "array",
  693. "items": {}
  694. }
  695. }
  696. }
  697. ]
  698. }
  699. }
  700. }
  701. }
  702. },
  703. "/api/channels/search": {
  704. "get": {
  705. "security": [
  706. {
  707. "ApiKeyAuth": []
  708. }
  709. ],
  710. "description": "Search channels with keyword and optional filters",
  711. "produces": [
  712. "application/json"
  713. ],
  714. "tags": [
  715. "channels"
  716. ],
  717. "summary": "Search channels",
  718. "parameters": [
  719. {
  720. "type": "string",
  721. "description": "Search keyword",
  722. "name": "keyword",
  723. "in": "query",
  724. "required": true
  725. },
  726. {
  727. "type": "integer",
  728. "description": "Page number",
  729. "name": "page",
  730. "in": "query"
  731. },
  732. {
  733. "type": "integer",
  734. "description": "Items per page",
  735. "name": "per_page",
  736. "in": "query"
  737. },
  738. {
  739. "type": "integer",
  740. "description": "Filter by id",
  741. "name": "id",
  742. "in": "query"
  743. },
  744. {
  745. "type": "string",
  746. "description": "Filter by name",
  747. "name": "name",
  748. "in": "query"
  749. },
  750. {
  751. "type": "string",
  752. "description": "Filter by key",
  753. "name": "key",
  754. "in": "query"
  755. },
  756. {
  757. "type": "integer",
  758. "description": "Filter by channel type",
  759. "name": "channel_type",
  760. "in": "query"
  761. },
  762. {
  763. "type": "string",
  764. "description": "Filter by base URL",
  765. "name": "base_url",
  766. "in": "query"
  767. },
  768. {
  769. "type": "string",
  770. "description": "Order by field",
  771. "name": "order",
  772. "in": "query"
  773. }
  774. ],
  775. "responses": {
  776. "200": {
  777. "description": "OK",
  778. "schema": {
  779. "allOf": [
  780. {
  781. "$ref": "#/definitions/middleware.APIResponse"
  782. },
  783. {
  784. "type": "object",
  785. "properties": {
  786. "data": {
  787. "type": "object",
  788. "additionalProperties": {
  789. "allOf": [
  790. {},
  791. {
  792. "type": "object",
  793. "properties": {
  794. "channels": {
  795. "type": "array",
  796. "items": {
  797. "$ref": "#/definitions/model.Channel"
  798. }
  799. },
  800. "total": {
  801. "type": "integer"
  802. }
  803. }
  804. }
  805. ]
  806. }
  807. }
  808. }
  809. }
  810. ]
  811. }
  812. }
  813. }
  814. }
  815. },
  816. "/api/channels/test": {
  817. "get": {
  818. "security": [
  819. {
  820. "ApiKeyAuth": []
  821. }
  822. ],
  823. "description": "Tests all channels",
  824. "produces": [
  825. "application/json"
  826. ],
  827. "tags": [
  828. "channel"
  829. ],
  830. "summary": "Test all channels",
  831. "parameters": [
  832. {
  833. "type": "boolean",
  834. "description": "Test disabled",
  835. "name": "test_disabled",
  836. "in": "query"
  837. },
  838. {
  839. "type": "boolean",
  840. "description": "Return success",
  841. "name": "return_success",
  842. "in": "query"
  843. },
  844. {
  845. "type": "boolean",
  846. "description": "Success body",
  847. "name": "success_body",
  848. "in": "query"
  849. },
  850. {
  851. "type": "boolean",
  852. "description": "Stream",
  853. "name": "stream",
  854. "in": "query"
  855. }
  856. ],
  857. "responses": {
  858. "200": {
  859. "description": "OK",
  860. "schema": {
  861. "allOf": [
  862. {
  863. "$ref": "#/definitions/middleware.APIResponse"
  864. },
  865. {
  866. "type": "object",
  867. "properties": {
  868. "data": {
  869. "type": "array",
  870. "items": {
  871. "$ref": "#/definitions/controller.TestResult"
  872. }
  873. }
  874. }
  875. }
  876. ]
  877. }
  878. }
  879. }
  880. }
  881. },
  882. "/api/channels/type_metas": {
  883. "get": {
  884. "security": [
  885. {
  886. "ApiKeyAuth": []
  887. }
  888. ],
  889. "description": "Returns metadata for all channel types",
  890. "produces": [
  891. "application/json"
  892. ],
  893. "tags": [
  894. "channels"
  895. ],
  896. "summary": "Get channel type metadata",
  897. "responses": {
  898. "200": {
  899. "description": "OK",
  900. "schema": {
  901. "allOf": [
  902. {
  903. "$ref": "#/definitions/middleware.APIResponse"
  904. },
  905. {
  906. "type": "object",
  907. "properties": {
  908. "data": {
  909. "type": "object",
  910. "additionalProperties": {
  911. "$ref": "#/definitions/adaptors.AdaptorMeta"
  912. }
  913. }
  914. }
  915. }
  916. ]
  917. }
  918. }
  919. }
  920. }
  921. },
  922. "/api/dashboard/": {
  923. "get": {
  924. "security": [
  925. {
  926. "ApiKeyAuth": []
  927. }
  928. ],
  929. "description": "Returns the general dashboard data including usage statistics and metrics",
  930. "produces": [
  931. "application/json"
  932. ],
  933. "tags": [
  934. "dashboard"
  935. ],
  936. "summary": "Get dashboard data",
  937. "parameters": [
  938. {
  939. "type": "integer",
  940. "description": "Channel ID",
  941. "name": "channel",
  942. "in": "query"
  943. },
  944. {
  945. "type": "string",
  946. "description": "Type of time span (day, week, month, two_week)",
  947. "name": "type",
  948. "in": "query"
  949. },
  950. {
  951. "type": "string",
  952. "description": "Model name",
  953. "name": "model",
  954. "in": "query"
  955. },
  956. {
  957. "type": "integer",
  958. "description": "Start second timestamp",
  959. "name": "start_timestamp",
  960. "in": "query"
  961. },
  962. {
  963. "type": "integer",
  964. "description": "End second timestamp",
  965. "name": "end_timestamp",
  966. "in": "query"
  967. },
  968. {
  969. "type": "string",
  970. "description": "Timezone, default is Local",
  971. "name": "timezone",
  972. "in": "query"
  973. },
  974. {
  975. "type": "string",
  976. "description": "Time span type (day, hour)",
  977. "name": "timespan",
  978. "in": "query"
  979. }
  980. ],
  981. "responses": {
  982. "200": {
  983. "description": "OK",
  984. "schema": {
  985. "allOf": [
  986. {
  987. "$ref": "#/definitions/middleware.APIResponse"
  988. },
  989. {
  990. "type": "object",
  991. "properties": {
  992. "data": {
  993. "$ref": "#/definitions/model.DashboardResponse"
  994. }
  995. }
  996. }
  997. ]
  998. }
  999. }
  1000. }
  1001. }
  1002. },
  1003. "/api/dashboard/{group}": {
  1004. "get": {
  1005. "security": [
  1006. {
  1007. "ApiKeyAuth": []
  1008. }
  1009. ],
  1010. "description": "Returns dashboard data and metrics specific to the given group",
  1011. "produces": [
  1012. "application/json"
  1013. ],
  1014. "tags": [
  1015. "dashboard"
  1016. ],
  1017. "summary": "Get dashboard data for a specific group",
  1018. "parameters": [
  1019. {
  1020. "type": "string",
  1021. "description": "Group",
  1022. "name": "group",
  1023. "in": "path",
  1024. "required": true
  1025. },
  1026. {
  1027. "type": "string",
  1028. "description": "Type of time span (day, week, month, two_week)",
  1029. "name": "type",
  1030. "in": "query"
  1031. },
  1032. {
  1033. "type": "string",
  1034. "description": "Token name",
  1035. "name": "token_name",
  1036. "in": "query"
  1037. },
  1038. {
  1039. "type": "string",
  1040. "description": "Model or *",
  1041. "name": "model",
  1042. "in": "query"
  1043. },
  1044. {
  1045. "type": "integer",
  1046. "description": "Start second timestamp",
  1047. "name": "start_timestamp",
  1048. "in": "query"
  1049. },
  1050. {
  1051. "type": "integer",
  1052. "description": "End second timestamp",
  1053. "name": "end_timestamp",
  1054. "in": "query"
  1055. },
  1056. {
  1057. "type": "string",
  1058. "description": "Timezone, default is Local",
  1059. "name": "timezone",
  1060. "in": "query"
  1061. },
  1062. {
  1063. "type": "string",
  1064. "description": "Time span type (day, hour)",
  1065. "name": "timespan",
  1066. "in": "query"
  1067. }
  1068. ],
  1069. "responses": {
  1070. "200": {
  1071. "description": "OK",
  1072. "schema": {
  1073. "allOf": [
  1074. {
  1075. "$ref": "#/definitions/middleware.APIResponse"
  1076. },
  1077. {
  1078. "type": "object",
  1079. "properties": {
  1080. "data": {
  1081. "$ref": "#/definitions/model.GroupDashboardResponse"
  1082. }
  1083. }
  1084. }
  1085. ]
  1086. }
  1087. }
  1088. }
  1089. }
  1090. },
  1091. "/api/dashboard/{group}/models": {
  1092. "get": {
  1093. "security": [
  1094. {
  1095. "ApiKeyAuth": []
  1096. }
  1097. ],
  1098. "description": "Returns model-specific metrics and usage data for the given group",
  1099. "produces": [
  1100. "application/json"
  1101. ],
  1102. "tags": [
  1103. "dashboard"
  1104. ],
  1105. "summary": "Get model usage data for a specific group",
  1106. "parameters": [
  1107. {
  1108. "type": "string",
  1109. "description": "Group",
  1110. "name": "group",
  1111. "in": "path",
  1112. "required": true
  1113. }
  1114. ],
  1115. "responses": {
  1116. "200": {
  1117. "description": "OK",
  1118. "schema": {
  1119. "allOf": [
  1120. {
  1121. "$ref": "#/definitions/middleware.APIResponse"
  1122. },
  1123. {
  1124. "type": "object",
  1125. "properties": {
  1126. "data": {
  1127. "type": "array",
  1128. "items": {
  1129. "$ref": "#/definitions/model.ModelConfig"
  1130. }
  1131. }
  1132. }
  1133. }
  1134. ]
  1135. }
  1136. }
  1137. }
  1138. }
  1139. },
  1140. "/api/embedmcp/": {
  1141. "get": {
  1142. "security": [
  1143. {
  1144. "ApiKeyAuth": []
  1145. }
  1146. ],
  1147. "description": "Get embed mcp",
  1148. "consumes": [
  1149. "application/json"
  1150. ],
  1151. "produces": [
  1152. "application/json"
  1153. ],
  1154. "tags": [
  1155. "embedmcp"
  1156. ],
  1157. "summary": "Get embed mcp",
  1158. "responses": {
  1159. "200": {
  1160. "description": "OK",
  1161. "schema": {
  1162. "type": "array",
  1163. "items": {
  1164. "$ref": "#/definitions/controller.EmbedMCP"
  1165. }
  1166. }
  1167. }
  1168. }
  1169. },
  1170. "post": {
  1171. "security": [
  1172. {
  1173. "ApiKeyAuth": []
  1174. }
  1175. ],
  1176. "description": "Save embed mcp",
  1177. "consumes": [
  1178. "application/json"
  1179. ],
  1180. "produces": [
  1181. "application/json"
  1182. ],
  1183. "tags": [
  1184. "embedmcp"
  1185. ],
  1186. "summary": "Save embed mcp",
  1187. "parameters": [
  1188. {
  1189. "description": "Save embed mcp request",
  1190. "name": "body",
  1191. "in": "body",
  1192. "required": true,
  1193. "schema": {
  1194. "$ref": "#/definitions/controller.SaveEmbedMCPRequest"
  1195. }
  1196. }
  1197. ],
  1198. "responses": {
  1199. "200": {
  1200. "description": "OK"
  1201. }
  1202. }
  1203. }
  1204. },
  1205. "/api/group/{group}": {
  1206. "get": {
  1207. "security": [
  1208. {
  1209. "ApiKeyAuth": []
  1210. }
  1211. ],
  1212. "description": "Returns detailed information about a specific group",
  1213. "produces": [
  1214. "application/json"
  1215. ],
  1216. "tags": [
  1217. "group"
  1218. ],
  1219. "summary": "Get a group",
  1220. "parameters": [
  1221. {
  1222. "type": "string",
  1223. "description": "Group name",
  1224. "name": "group",
  1225. "in": "path",
  1226. "required": true
  1227. }
  1228. ],
  1229. "responses": {
  1230. "200": {
  1231. "description": "OK",
  1232. "schema": {
  1233. "allOf": [
  1234. {
  1235. "$ref": "#/definitions/middleware.APIResponse"
  1236. },
  1237. {
  1238. "type": "object",
  1239. "properties": {
  1240. "data": {
  1241. "$ref": "#/definitions/controller.GroupResponse"
  1242. }
  1243. }
  1244. }
  1245. ]
  1246. }
  1247. }
  1248. }
  1249. },
  1250. "put": {
  1251. "security": [
  1252. {
  1253. "ApiKeyAuth": []
  1254. }
  1255. ],
  1256. "description": "Updates an existing group with the given information",
  1257. "consumes": [
  1258. "application/json"
  1259. ],
  1260. "produces": [
  1261. "application/json"
  1262. ],
  1263. "tags": [
  1264. "group"
  1265. ],
  1266. "summary": "Update a group",
  1267. "parameters": [
  1268. {
  1269. "type": "string",
  1270. "description": "Group name",
  1271. "name": "group",
  1272. "in": "path",
  1273. "required": true
  1274. },
  1275. {
  1276. "description": "Updated group information",
  1277. "name": "data",
  1278. "in": "body",
  1279. "required": true,
  1280. "schema": {
  1281. "$ref": "#/definitions/controller.CreateGroupRequest"
  1282. }
  1283. }
  1284. ],
  1285. "responses": {
  1286. "200": {
  1287. "description": "OK",
  1288. "schema": {
  1289. "allOf": [
  1290. {
  1291. "$ref": "#/definitions/middleware.APIResponse"
  1292. },
  1293. {
  1294. "type": "object",
  1295. "properties": {
  1296. "data": {
  1297. "$ref": "#/definitions/model.Group"
  1298. }
  1299. }
  1300. }
  1301. ]
  1302. }
  1303. }
  1304. }
  1305. },
  1306. "post": {
  1307. "security": [
  1308. {
  1309. "ApiKeyAuth": []
  1310. }
  1311. ],
  1312. "description": "Creates a new group with the given information",
  1313. "consumes": [
  1314. "application/json"
  1315. ],
  1316. "produces": [
  1317. "application/json"
  1318. ],
  1319. "tags": [
  1320. "group"
  1321. ],
  1322. "summary": "Create a new group",
  1323. "parameters": [
  1324. {
  1325. "type": "string",
  1326. "description": "Group name",
  1327. "name": "group",
  1328. "in": "path",
  1329. "required": true
  1330. },
  1331. {
  1332. "description": "Group information",
  1333. "name": "data",
  1334. "in": "body",
  1335. "required": true,
  1336. "schema": {
  1337. "$ref": "#/definitions/controller.CreateGroupRequest"
  1338. }
  1339. }
  1340. ],
  1341. "responses": {
  1342. "200": {
  1343. "description": "OK",
  1344. "schema": {
  1345. "allOf": [
  1346. {
  1347. "$ref": "#/definitions/middleware.APIResponse"
  1348. },
  1349. {
  1350. "type": "object",
  1351. "properties": {
  1352. "data": {
  1353. "$ref": "#/definitions/model.Group"
  1354. }
  1355. }
  1356. }
  1357. ]
  1358. }
  1359. }
  1360. }
  1361. },
  1362. "delete": {
  1363. "security": [
  1364. {
  1365. "ApiKeyAuth": []
  1366. }
  1367. ],
  1368. "description": "Deletes a group by its name",
  1369. "produces": [
  1370. "application/json"
  1371. ],
  1372. "tags": [
  1373. "group"
  1374. ],
  1375. "summary": "Delete a group",
  1376. "parameters": [
  1377. {
  1378. "type": "string",
  1379. "description": "Group name",
  1380. "name": "group",
  1381. "in": "path",
  1382. "required": true
  1383. }
  1384. ],
  1385. "responses": {
  1386. "200": {
  1387. "description": "OK",
  1388. "schema": {
  1389. "$ref": "#/definitions/middleware.APIResponse"
  1390. }
  1391. }
  1392. }
  1393. }
  1394. },
  1395. "/api/group/{group}/model_config/{model}": {
  1396. "get": {
  1397. "security": [
  1398. {
  1399. "ApiKeyAuth": []
  1400. }
  1401. ],
  1402. "description": "Get group model config",
  1403. "produces": [
  1404. "application/json"
  1405. ],
  1406. "tags": [
  1407. "group"
  1408. ],
  1409. "summary": "Get group model config",
  1410. "parameters": [
  1411. {
  1412. "type": "string",
  1413. "description": "Group name",
  1414. "name": "group",
  1415. "in": "path",
  1416. "required": true
  1417. },
  1418. {
  1419. "type": "string",
  1420. "description": "Model name",
  1421. "name": "model",
  1422. "in": "path",
  1423. "required": true
  1424. }
  1425. ],
  1426. "responses": {
  1427. "200": {
  1428. "description": "OK",
  1429. "schema": {
  1430. "allOf": [
  1431. {
  1432. "$ref": "#/definitions/middleware.APIResponse"
  1433. },
  1434. {
  1435. "type": "object",
  1436. "properties": {
  1437. "data": {
  1438. "$ref": "#/definitions/model.GroupModelConfig"
  1439. }
  1440. }
  1441. }
  1442. ]
  1443. }
  1444. }
  1445. }
  1446. },
  1447. "put": {
  1448. "security": [
  1449. {
  1450. "ApiKeyAuth": []
  1451. }
  1452. ],
  1453. "description": "Update group model config",
  1454. "consumes": [
  1455. "application/json"
  1456. ],
  1457. "produces": [
  1458. "application/json"
  1459. ],
  1460. "tags": [
  1461. "group"
  1462. ],
  1463. "summary": "Update group model config",
  1464. "parameters": [
  1465. {
  1466. "type": "string",
  1467. "description": "Group name",
  1468. "name": "group",
  1469. "in": "path",
  1470. "required": true
  1471. },
  1472. {
  1473. "type": "string",
  1474. "description": "Model name",
  1475. "name": "model",
  1476. "in": "path",
  1477. "required": true
  1478. },
  1479. {
  1480. "description": "Group model config information",
  1481. "name": "data",
  1482. "in": "body",
  1483. "required": true,
  1484. "schema": {
  1485. "$ref": "#/definitions/controller.SaveGroupModelConfigRequest"
  1486. }
  1487. }
  1488. ],
  1489. "responses": {
  1490. "200": {
  1491. "description": "OK",
  1492. "schema": {
  1493. "$ref": "#/definitions/middleware.APIResponse"
  1494. }
  1495. }
  1496. }
  1497. },
  1498. "post": {
  1499. "security": [
  1500. {
  1501. "ApiKeyAuth": []
  1502. }
  1503. ],
  1504. "description": "Save group model config",
  1505. "consumes": [
  1506. "application/json"
  1507. ],
  1508. "produces": [
  1509. "application/json"
  1510. ],
  1511. "tags": [
  1512. "group"
  1513. ],
  1514. "summary": "Save group model config",
  1515. "parameters": [
  1516. {
  1517. "type": "string",
  1518. "description": "Group name",
  1519. "name": "group",
  1520. "in": "path",
  1521. "required": true
  1522. },
  1523. {
  1524. "description": "Group model config information",
  1525. "name": "data",
  1526. "in": "body",
  1527. "required": true,
  1528. "schema": {
  1529. "$ref": "#/definitions/controller.SaveGroupModelConfigRequest"
  1530. }
  1531. }
  1532. ],
  1533. "responses": {
  1534. "200": {
  1535. "description": "OK",
  1536. "schema": {
  1537. "$ref": "#/definitions/middleware.APIResponse"
  1538. }
  1539. }
  1540. }
  1541. },
  1542. "delete": {
  1543. "security": [
  1544. {
  1545. "ApiKeyAuth": []
  1546. }
  1547. ],
  1548. "description": "Delete group model config",
  1549. "produces": [
  1550. "application/json"
  1551. ],
  1552. "tags": [
  1553. "group"
  1554. ],
  1555. "summary": "Delete group model config",
  1556. "parameters": [
  1557. {
  1558. "type": "string",
  1559. "description": "Group name",
  1560. "name": "group",
  1561. "in": "path",
  1562. "required": true
  1563. },
  1564. {
  1565. "type": "string",
  1566. "description": "Model name",
  1567. "name": "model",
  1568. "in": "path",
  1569. "required": true
  1570. }
  1571. ],
  1572. "responses": {
  1573. "200": {
  1574. "description": "OK",
  1575. "schema": {
  1576. "$ref": "#/definitions/middleware.APIResponse"
  1577. }
  1578. }
  1579. }
  1580. }
  1581. },
  1582. "/api/group/{group}/model_configs/": {
  1583. "get": {
  1584. "security": [
  1585. {
  1586. "ApiKeyAuth": []
  1587. }
  1588. ],
  1589. "description": "Get group model configs",
  1590. "produces": [
  1591. "application/json"
  1592. ],
  1593. "tags": [
  1594. "group"
  1595. ],
  1596. "summary": "Get group model configs",
  1597. "parameters": [
  1598. {
  1599. "type": "string",
  1600. "description": "Group name",
  1601. "name": "group",
  1602. "in": "path",
  1603. "required": true
  1604. }
  1605. ],
  1606. "responses": {
  1607. "200": {
  1608. "description": "OK",
  1609. "schema": {
  1610. "allOf": [
  1611. {
  1612. "$ref": "#/definitions/middleware.APIResponse"
  1613. },
  1614. {
  1615. "type": "object",
  1616. "properties": {
  1617. "data": {
  1618. "type": "array",
  1619. "items": {
  1620. "$ref": "#/definitions/model.GroupModelConfig"
  1621. }
  1622. }
  1623. }
  1624. }
  1625. ]
  1626. }
  1627. }
  1628. }
  1629. },
  1630. "put": {
  1631. "security": [
  1632. {
  1633. "ApiKeyAuth": []
  1634. }
  1635. ],
  1636. "description": "Update group model configs",
  1637. "consumes": [
  1638. "application/json"
  1639. ],
  1640. "produces": [
  1641. "application/json"
  1642. ],
  1643. "tags": [
  1644. "group"
  1645. ],
  1646. "summary": "Update group model configs",
  1647. "parameters": [
  1648. {
  1649. "type": "string",
  1650. "description": "Group name",
  1651. "name": "group",
  1652. "in": "path",
  1653. "required": true
  1654. },
  1655. {
  1656. "description": "Group model config information",
  1657. "name": "data",
  1658. "in": "body",
  1659. "required": true,
  1660. "schema": {
  1661. "type": "array",
  1662. "items": {
  1663. "$ref": "#/definitions/controller.SaveGroupModelConfigRequest"
  1664. }
  1665. }
  1666. }
  1667. ],
  1668. "responses": {
  1669. "200": {
  1670. "description": "OK",
  1671. "schema": {
  1672. "$ref": "#/definitions/middleware.APIResponse"
  1673. }
  1674. }
  1675. }
  1676. },
  1677. "post": {
  1678. "security": [
  1679. {
  1680. "ApiKeyAuth": []
  1681. }
  1682. ],
  1683. "description": "Save group model configs",
  1684. "consumes": [
  1685. "application/json"
  1686. ],
  1687. "produces": [
  1688. "application/json"
  1689. ],
  1690. "tags": [
  1691. "group"
  1692. ],
  1693. "summary": "Save group model configs",
  1694. "parameters": [
  1695. {
  1696. "type": "string",
  1697. "description": "Group name",
  1698. "name": "group",
  1699. "in": "path",
  1700. "required": true
  1701. },
  1702. {
  1703. "description": "Group model config information",
  1704. "name": "data",
  1705. "in": "body",
  1706. "required": true,
  1707. "schema": {
  1708. "type": "array",
  1709. "items": {
  1710. "$ref": "#/definitions/controller.SaveGroupModelConfigRequest"
  1711. }
  1712. }
  1713. }
  1714. ],
  1715. "responses": {
  1716. "200": {
  1717. "description": "OK",
  1718. "schema": {
  1719. "$ref": "#/definitions/middleware.APIResponse"
  1720. }
  1721. }
  1722. }
  1723. },
  1724. "delete": {
  1725. "security": [
  1726. {
  1727. "ApiKeyAuth": []
  1728. }
  1729. ],
  1730. "description": "Delete group model configs",
  1731. "produces": [
  1732. "application/json"
  1733. ],
  1734. "tags": [
  1735. "group"
  1736. ],
  1737. "summary": "Delete group model configs",
  1738. "parameters": [
  1739. {
  1740. "type": "string",
  1741. "description": "Group name",
  1742. "name": "group",
  1743. "in": "path",
  1744. "required": true
  1745. },
  1746. {
  1747. "description": "Model names",
  1748. "name": "models",
  1749. "in": "body",
  1750. "required": true,
  1751. "schema": {
  1752. "type": "array",
  1753. "items": {
  1754. "type": "string"
  1755. }
  1756. }
  1757. }
  1758. ],
  1759. "responses": {
  1760. "200": {
  1761. "description": "OK",
  1762. "schema": {
  1763. "$ref": "#/definitions/middleware.APIResponse"
  1764. }
  1765. }
  1766. }
  1767. }
  1768. },
  1769. "/api/group/{group}/rpm_ratio": {
  1770. "post": {
  1771. "security": [
  1772. {
  1773. "ApiKeyAuth": []
  1774. }
  1775. ],
  1776. "description": "Updates the RPM (Requests Per Minute) ratio for a group",
  1777. "consumes": [
  1778. "application/json"
  1779. ],
  1780. "produces": [
  1781. "application/json"
  1782. ],
  1783. "tags": [
  1784. "group"
  1785. ],
  1786. "summary": "Update group RPM ratio",
  1787. "parameters": [
  1788. {
  1789. "type": "string",
  1790. "description": "Group name",
  1791. "name": "group",
  1792. "in": "path",
  1793. "required": true
  1794. },
  1795. {
  1796. "description": "RPM ratio information",
  1797. "name": "data",
  1798. "in": "body",
  1799. "required": true,
  1800. "schema": {
  1801. "$ref": "#/definitions/controller.UpdateGroupRPMRatioRequest"
  1802. }
  1803. }
  1804. ],
  1805. "responses": {
  1806. "200": {
  1807. "description": "OK",
  1808. "schema": {
  1809. "$ref": "#/definitions/middleware.APIResponse"
  1810. }
  1811. }
  1812. }
  1813. }
  1814. },
  1815. "/api/group/{group}/status": {
  1816. "post": {
  1817. "security": [
  1818. {
  1819. "ApiKeyAuth": []
  1820. }
  1821. ],
  1822. "description": "Updates the status of a group",
  1823. "consumes": [
  1824. "application/json"
  1825. ],
  1826. "produces": [
  1827. "application/json"
  1828. ],
  1829. "tags": [
  1830. "group"
  1831. ],
  1832. "summary": "Update group status",
  1833. "parameters": [
  1834. {
  1835. "type": "string",
  1836. "description": "Group name",
  1837. "name": "group",
  1838. "in": "path",
  1839. "required": true
  1840. },
  1841. {
  1842. "description": "Status information",
  1843. "name": "status",
  1844. "in": "body",
  1845. "required": true,
  1846. "schema": {
  1847. "$ref": "#/definitions/controller.UpdateGroupStatusRequest"
  1848. }
  1849. }
  1850. ],
  1851. "responses": {
  1852. "200": {
  1853. "description": "OK",
  1854. "schema": {
  1855. "$ref": "#/definitions/middleware.APIResponse"
  1856. }
  1857. }
  1858. }
  1859. }
  1860. },
  1861. "/api/group/{group}/tpm_ratio": {
  1862. "post": {
  1863. "security": [
  1864. {
  1865. "ApiKeyAuth": []
  1866. }
  1867. ],
  1868. "description": "Updates the TPM (Tokens Per Minute) ratio for a group",
  1869. "consumes": [
  1870. "application/json"
  1871. ],
  1872. "produces": [
  1873. "application/json"
  1874. ],
  1875. "tags": [
  1876. "group"
  1877. ],
  1878. "summary": "Update group TPM ratio",
  1879. "parameters": [
  1880. {
  1881. "type": "string",
  1882. "description": "Group name",
  1883. "name": "group",
  1884. "in": "path",
  1885. "required": true
  1886. },
  1887. {
  1888. "description": "TPM ratio information",
  1889. "name": "data",
  1890. "in": "body",
  1891. "required": true,
  1892. "schema": {
  1893. "$ref": "#/definitions/controller.UpdateGroupTPMRatioRequest"
  1894. }
  1895. }
  1896. ],
  1897. "responses": {
  1898. "200": {
  1899. "description": "OK",
  1900. "schema": {
  1901. "$ref": "#/definitions/middleware.APIResponse"
  1902. }
  1903. }
  1904. }
  1905. }
  1906. },
  1907. "/api/groups/": {
  1908. "get": {
  1909. "security": [
  1910. {
  1911. "ApiKeyAuth": []
  1912. }
  1913. ],
  1914. "description": "Returns a list of all groups with pagination",
  1915. "produces": [
  1916. "application/json"
  1917. ],
  1918. "tags": [
  1919. "groups"
  1920. ],
  1921. "summary": "Get all groups",
  1922. "parameters": [
  1923. {
  1924. "type": "integer",
  1925. "description": "Page number",
  1926. "name": "page",
  1927. "in": "query"
  1928. },
  1929. {
  1930. "type": "integer",
  1931. "description": "Items per page",
  1932. "name": "per_page",
  1933. "in": "query"
  1934. }
  1935. ],
  1936. "responses": {
  1937. "200": {
  1938. "description": "OK",
  1939. "schema": {
  1940. "allOf": [
  1941. {
  1942. "$ref": "#/definitions/middleware.APIResponse"
  1943. },
  1944. {
  1945. "type": "object",
  1946. "properties": {
  1947. "data": {
  1948. "type": "object",
  1949. "additionalProperties": {
  1950. "allOf": [
  1951. {},
  1952. {
  1953. "type": "object",
  1954. "properties": {
  1955. "groups": {
  1956. "type": "array",
  1957. "items": {
  1958. "$ref": "#/definitions/controller.GroupResponse"
  1959. }
  1960. },
  1961. "total": {
  1962. "type": "integer"
  1963. }
  1964. }
  1965. }
  1966. ]
  1967. }
  1968. }
  1969. }
  1970. }
  1971. ]
  1972. }
  1973. }
  1974. }
  1975. }
  1976. },
  1977. "/api/groups/batch_delete": {
  1978. "post": {
  1979. "security": [
  1980. {
  1981. "ApiKeyAuth": []
  1982. }
  1983. ],
  1984. "description": "Deletes multiple groups by their IDs",
  1985. "consumes": [
  1986. "application/json"
  1987. ],
  1988. "produces": [
  1989. "application/json"
  1990. ],
  1991. "tags": [
  1992. "groups"
  1993. ],
  1994. "summary": "Delete multiple groups",
  1995. "parameters": [
  1996. {
  1997. "description": "Group IDs",
  1998. "name": "ids",
  1999. "in": "body",
  2000. "required": true,
  2001. "schema": {
  2002. "type": "array",
  2003. "items": {
  2004. "type": "string"
  2005. }
  2006. }
  2007. }
  2008. ],
  2009. "responses": {
  2010. "200": {
  2011. "description": "OK",
  2012. "schema": {
  2013. "$ref": "#/definitions/middleware.APIResponse"
  2014. }
  2015. }
  2016. }
  2017. }
  2018. },
  2019. "/api/groups/batch_status": {
  2020. "post": {
  2021. "security": [
  2022. {
  2023. "ApiKeyAuth": []
  2024. }
  2025. ],
  2026. "description": "Updates the status of multiple groups",
  2027. "consumes": [
  2028. "application/json"
  2029. ],
  2030. "produces": [
  2031. "application/json"
  2032. ],
  2033. "tags": [
  2034. "groups"
  2035. ],
  2036. "summary": "Update multiple groups status",
  2037. "parameters": [
  2038. {
  2039. "description": "Group IDs and status",
  2040. "name": "data",
  2041. "in": "body",
  2042. "required": true,
  2043. "schema": {
  2044. "$ref": "#/definitions/controller.UpdateGroupsStatusRequest"
  2045. }
  2046. }
  2047. ],
  2048. "responses": {
  2049. "200": {
  2050. "description": "OK",
  2051. "schema": {
  2052. "$ref": "#/definitions/middleware.APIResponse"
  2053. }
  2054. }
  2055. }
  2056. }
  2057. },
  2058. "/api/groups/ip_groups": {
  2059. "get": {
  2060. "security": [
  2061. {
  2062. "ApiKeyAuth": []
  2063. }
  2064. ],
  2065. "description": "Get IP group list",
  2066. "produces": [
  2067. "application/json"
  2068. ],
  2069. "tags": [
  2070. "groups"
  2071. ],
  2072. "summary": "Get IP group list",
  2073. "parameters": [
  2074. {
  2075. "type": "integer",
  2076. "description": "Threshold",
  2077. "name": "threshold",
  2078. "in": "query"
  2079. },
  2080. {
  2081. "type": "integer",
  2082. "description": "Start timestamp",
  2083. "name": "start_timestamp",
  2084. "in": "query"
  2085. },
  2086. {
  2087. "type": "integer",
  2088. "description": "End timestamp",
  2089. "name": "end_timestamp",
  2090. "in": "query"
  2091. }
  2092. ],
  2093. "responses": {
  2094. "200": {
  2095. "description": "OK",
  2096. "schema": {
  2097. "allOf": [
  2098. {
  2099. "$ref": "#/definitions/middleware.APIResponse"
  2100. },
  2101. {
  2102. "type": "object",
  2103. "properties": {
  2104. "data": {
  2105. "type": "object",
  2106. "additionalProperties": {
  2107. "type": "array",
  2108. "items": {
  2109. "type": "string"
  2110. }
  2111. }
  2112. }
  2113. }
  2114. }
  2115. ]
  2116. }
  2117. }
  2118. }
  2119. }
  2120. },
  2121. "/api/groups/search": {
  2122. "get": {
  2123. "security": [
  2124. {
  2125. "ApiKeyAuth": []
  2126. }
  2127. ],
  2128. "description": "Search groups with keyword and pagination",
  2129. "produces": [
  2130. "application/json"
  2131. ],
  2132. "tags": [
  2133. "groups"
  2134. ],
  2135. "summary": "Search groups",
  2136. "parameters": [
  2137. {
  2138. "type": "string",
  2139. "description": "Search keyword",
  2140. "name": "keyword",
  2141. "in": "query",
  2142. "required": true
  2143. },
  2144. {
  2145. "type": "integer",
  2146. "description": "Page number",
  2147. "name": "page",
  2148. "in": "query"
  2149. },
  2150. {
  2151. "type": "integer",
  2152. "description": "Items per page",
  2153. "name": "per_page",
  2154. "in": "query"
  2155. },
  2156. {
  2157. "type": "integer",
  2158. "description": "Status",
  2159. "name": "status",
  2160. "in": "query"
  2161. },
  2162. {
  2163. "type": "string",
  2164. "description": "Order",
  2165. "name": "order",
  2166. "in": "query"
  2167. }
  2168. ],
  2169. "responses": {
  2170. "200": {
  2171. "description": "OK",
  2172. "schema": {
  2173. "allOf": [
  2174. {
  2175. "$ref": "#/definitions/middleware.APIResponse"
  2176. },
  2177. {
  2178. "type": "object",
  2179. "properties": {
  2180. "data": {
  2181. "type": "object",
  2182. "additionalProperties": {
  2183. "allOf": [
  2184. {},
  2185. {
  2186. "type": "object",
  2187. "properties": {
  2188. "groups": {
  2189. "type": "array",
  2190. "items": {
  2191. "$ref": "#/definitions/controller.GroupResponse"
  2192. }
  2193. },
  2194. "total": {
  2195. "type": "integer"
  2196. }
  2197. }
  2198. }
  2199. ]
  2200. }
  2201. }
  2202. }
  2203. }
  2204. ]
  2205. }
  2206. }
  2207. }
  2208. }
  2209. },
  2210. "/api/log/{group}": {
  2211. "get": {
  2212. "security": [
  2213. {
  2214. "ApiKeyAuth": []
  2215. }
  2216. ],
  2217. "description": "Get logs for a specific group",
  2218. "produces": [
  2219. "application/json"
  2220. ],
  2221. "tags": [
  2222. "log"
  2223. ],
  2224. "summary": "Get group logs",
  2225. "parameters": [
  2226. {
  2227. "type": "string",
  2228. "description": "Group name",
  2229. "name": "group",
  2230. "in": "path",
  2231. "required": true
  2232. },
  2233. {
  2234. "type": "integer",
  2235. "description": "Page number",
  2236. "name": "page",
  2237. "in": "query"
  2238. },
  2239. {
  2240. "type": "integer",
  2241. "description": "Items per page",
  2242. "name": "per_page",
  2243. "in": "query"
  2244. },
  2245. {
  2246. "type": "integer",
  2247. "description": "Start timestamp (milliseconds)",
  2248. "name": "start_timestamp",
  2249. "in": "query"
  2250. },
  2251. {
  2252. "type": "integer",
  2253. "description": "End timestamp (milliseconds)",
  2254. "name": "end_timestamp",
  2255. "in": "query"
  2256. },
  2257. {
  2258. "type": "string",
  2259. "description": "Token name",
  2260. "name": "token_name",
  2261. "in": "query"
  2262. },
  2263. {
  2264. "type": "string",
  2265. "description": "Model name",
  2266. "name": "model_name",
  2267. "in": "query"
  2268. },
  2269. {
  2270. "type": "integer",
  2271. "description": "Channel ID",
  2272. "name": "channel",
  2273. "in": "query"
  2274. },
  2275. {
  2276. "type": "integer",
  2277. "description": "Token ID",
  2278. "name": "token_id",
  2279. "in": "query"
  2280. },
  2281. {
  2282. "type": "string",
  2283. "description": "Order",
  2284. "name": "order",
  2285. "in": "query"
  2286. },
  2287. {
  2288. "type": "string",
  2289. "description": "Request ID",
  2290. "name": "request_id",
  2291. "in": "query"
  2292. },
  2293. {
  2294. "type": "string",
  2295. "description": "Status code type",
  2296. "name": "code_type",
  2297. "in": "query"
  2298. },
  2299. {
  2300. "type": "integer",
  2301. "description": "Status code",
  2302. "name": "code",
  2303. "in": "query"
  2304. },
  2305. {
  2306. "type": "boolean",
  2307. "description": "With body",
  2308. "name": "with_body",
  2309. "in": "query"
  2310. },
  2311. {
  2312. "type": "string",
  2313. "description": "IP",
  2314. "name": "ip",
  2315. "in": "query"
  2316. },
  2317. {
  2318. "type": "string",
  2319. "description": "User",
  2320. "name": "user",
  2321. "in": "query"
  2322. }
  2323. ],
  2324. "responses": {
  2325. "200": {
  2326. "description": "OK",
  2327. "schema": {
  2328. "allOf": [
  2329. {
  2330. "$ref": "#/definitions/middleware.APIResponse"
  2331. },
  2332. {
  2333. "type": "object",
  2334. "properties": {
  2335. "data": {
  2336. "$ref": "#/definitions/model.GetGroupLogsResult"
  2337. }
  2338. }
  2339. }
  2340. ]
  2341. }
  2342. }
  2343. }
  2344. }
  2345. },
  2346. "/api/log/{group}/detail/{log_id}": {
  2347. "get": {
  2348. "security": [
  2349. {
  2350. "ApiKeyAuth": []
  2351. }
  2352. ],
  2353. "description": "Get detailed information about a specific log entry in a group",
  2354. "produces": [
  2355. "application/json"
  2356. ],
  2357. "tags": [
  2358. "log"
  2359. ],
  2360. "summary": "Get group log detail",
  2361. "parameters": [
  2362. {
  2363. "type": "string",
  2364. "description": "Group name",
  2365. "name": "group",
  2366. "in": "path",
  2367. "required": true
  2368. },
  2369. {
  2370. "type": "string",
  2371. "description": "Log ID",
  2372. "name": "log_id",
  2373. "in": "path",
  2374. "required": true
  2375. }
  2376. ],
  2377. "responses": {
  2378. "200": {
  2379. "description": "OK",
  2380. "schema": {
  2381. "allOf": [
  2382. {
  2383. "$ref": "#/definitions/middleware.APIResponse"
  2384. },
  2385. {
  2386. "type": "object",
  2387. "properties": {
  2388. "data": {
  2389. "$ref": "#/definitions/model.RequestDetail"
  2390. }
  2391. }
  2392. }
  2393. ]
  2394. }
  2395. }
  2396. }
  2397. }
  2398. },
  2399. "/api/log/{group}/search": {
  2400. "get": {
  2401. "security": [
  2402. {
  2403. "ApiKeyAuth": []
  2404. }
  2405. ],
  2406. "description": "Search logs for a specific group with filters",
  2407. "produces": [
  2408. "application/json"
  2409. ],
  2410. "tags": [
  2411. "log"
  2412. ],
  2413. "summary": "Search group logs",
  2414. "parameters": [
  2415. {
  2416. "type": "string",
  2417. "description": "Group name",
  2418. "name": "group",
  2419. "in": "path",
  2420. "required": true
  2421. },
  2422. {
  2423. "type": "string",
  2424. "description": "Keyword",
  2425. "name": "keyword",
  2426. "in": "query",
  2427. "required": true
  2428. },
  2429. {
  2430. "type": "integer",
  2431. "description": "Page number",
  2432. "name": "page",
  2433. "in": "query"
  2434. },
  2435. {
  2436. "type": "integer",
  2437. "description": "Items per page",
  2438. "name": "per_page",
  2439. "in": "query"
  2440. },
  2441. {
  2442. "type": "integer",
  2443. "description": "Start timestamp (milliseconds)",
  2444. "name": "start_timestamp",
  2445. "in": "query"
  2446. },
  2447. {
  2448. "type": "integer",
  2449. "description": "End timestamp (milliseconds)",
  2450. "name": "end_timestamp",
  2451. "in": "query"
  2452. },
  2453. {
  2454. "type": "string",
  2455. "description": "Filter by token name",
  2456. "name": "token_name",
  2457. "in": "query"
  2458. },
  2459. {
  2460. "type": "string",
  2461. "description": "Filter by model name",
  2462. "name": "model_name",
  2463. "in": "query"
  2464. },
  2465. {
  2466. "type": "integer",
  2467. "description": "Filter by channel",
  2468. "name": "channel",
  2469. "in": "query"
  2470. },
  2471. {
  2472. "type": "integer",
  2473. "description": "Filter by token id",
  2474. "name": "token_id",
  2475. "in": "query"
  2476. },
  2477. {
  2478. "type": "string",
  2479. "description": "Order",
  2480. "name": "order",
  2481. "in": "query"
  2482. },
  2483. {
  2484. "type": "string",
  2485. "description": "Request ID",
  2486. "name": "request_id",
  2487. "in": "query"
  2488. },
  2489. {
  2490. "type": "string",
  2491. "description": "Status code type",
  2492. "name": "code_type",
  2493. "in": "query"
  2494. },
  2495. {
  2496. "type": "integer",
  2497. "description": "Status code",
  2498. "name": "code",
  2499. "in": "query"
  2500. },
  2501. {
  2502. "type": "boolean",
  2503. "description": "With body",
  2504. "name": "with_body",
  2505. "in": "query"
  2506. },
  2507. {
  2508. "type": "string",
  2509. "description": "IP",
  2510. "name": "ip",
  2511. "in": "query"
  2512. },
  2513. {
  2514. "type": "string",
  2515. "description": "User",
  2516. "name": "user",
  2517. "in": "query"
  2518. }
  2519. ],
  2520. "responses": {
  2521. "200": {
  2522. "description": "OK",
  2523. "schema": {
  2524. "allOf": [
  2525. {
  2526. "$ref": "#/definitions/middleware.APIResponse"
  2527. },
  2528. {
  2529. "type": "object",
  2530. "properties": {
  2531. "data": {
  2532. "$ref": "#/definitions/model.GetGroupLogsResult"
  2533. }
  2534. }
  2535. }
  2536. ]
  2537. }
  2538. }
  2539. }
  2540. }
  2541. },
  2542. "/api/log/{group}/used/models": {
  2543. "get": {
  2544. "security": [
  2545. {
  2546. "ApiKeyAuth": []
  2547. }
  2548. ],
  2549. "description": "Get a list of models that have been used in a specific group's logs",
  2550. "produces": [
  2551. "application/json"
  2552. ],
  2553. "tags": [
  2554. "log"
  2555. ],
  2556. "summary": "Get group used models",
  2557. "parameters": [
  2558. {
  2559. "type": "string",
  2560. "description": "Group name",
  2561. "name": "group",
  2562. "in": "path",
  2563. "required": true
  2564. }
  2565. ],
  2566. "responses": {
  2567. "200": {
  2568. "description": "OK",
  2569. "schema": {
  2570. "allOf": [
  2571. {
  2572. "$ref": "#/definitions/middleware.APIResponse"
  2573. },
  2574. {
  2575. "type": "object",
  2576. "properties": {
  2577. "data": {
  2578. "type": "array",
  2579. "items": {
  2580. "type": "string"
  2581. }
  2582. }
  2583. }
  2584. }
  2585. ]
  2586. }
  2587. }
  2588. }
  2589. }
  2590. },
  2591. "/api/log/{group}/used/token_names": {
  2592. "get": {
  2593. "security": [
  2594. {
  2595. "ApiKeyAuth": []
  2596. }
  2597. ],
  2598. "description": "Get a list of token names that have been used in a specific group's logs",
  2599. "produces": [
  2600. "application/json"
  2601. ],
  2602. "tags": [
  2603. "log"
  2604. ],
  2605. "summary": "Get group used token names",
  2606. "parameters": [
  2607. {
  2608. "type": "string",
  2609. "description": "Group name",
  2610. "name": "group",
  2611. "in": "path",
  2612. "required": true
  2613. }
  2614. ],
  2615. "responses": {
  2616. "200": {
  2617. "description": "OK",
  2618. "schema": {
  2619. "allOf": [
  2620. {
  2621. "$ref": "#/definitions/middleware.APIResponse"
  2622. },
  2623. {
  2624. "type": "object",
  2625. "properties": {
  2626. "data": {
  2627. "type": "array",
  2628. "items": {
  2629. "type": "string"
  2630. }
  2631. }
  2632. }
  2633. }
  2634. ]
  2635. }
  2636. }
  2637. }
  2638. }
  2639. },
  2640. "/api/logs/": {
  2641. "get": {
  2642. "security": [
  2643. {
  2644. "ApiKeyAuth": []
  2645. }
  2646. ],
  2647. "description": "Returns a paginated list of all logs with optional filters",
  2648. "produces": [
  2649. "application/json"
  2650. ],
  2651. "tags": [
  2652. "logs"
  2653. ],
  2654. "summary": "Get all logs",
  2655. "parameters": [
  2656. {
  2657. "type": "string",
  2658. "description": "Group or *",
  2659. "name": "group",
  2660. "in": "query"
  2661. },
  2662. {
  2663. "type": "integer",
  2664. "description": "Page number",
  2665. "name": "page",
  2666. "in": "query"
  2667. },
  2668. {
  2669. "type": "integer",
  2670. "description": "Items per page",
  2671. "name": "per_page",
  2672. "in": "query"
  2673. },
  2674. {
  2675. "type": "integer",
  2676. "description": "Start timestamp (milliseconds)",
  2677. "name": "start_timestamp",
  2678. "in": "query"
  2679. },
  2680. {
  2681. "type": "integer",
  2682. "description": "End timestamp (milliseconds)",
  2683. "name": "end_timestamp",
  2684. "in": "query"
  2685. },
  2686. {
  2687. "type": "string",
  2688. "description": "Token name",
  2689. "name": "token_name",
  2690. "in": "query"
  2691. },
  2692. {
  2693. "type": "string",
  2694. "description": "Model name",
  2695. "name": "model_name",
  2696. "in": "query"
  2697. },
  2698. {
  2699. "type": "integer",
  2700. "description": "Channel ID",
  2701. "name": "channel",
  2702. "in": "query"
  2703. },
  2704. {
  2705. "type": "integer",
  2706. "description": "Token ID",
  2707. "name": "token_id",
  2708. "in": "query"
  2709. },
  2710. {
  2711. "type": "string",
  2712. "description": "Order",
  2713. "name": "order",
  2714. "in": "query"
  2715. },
  2716. {
  2717. "type": "string",
  2718. "description": "Request ID",
  2719. "name": "request_id",
  2720. "in": "query"
  2721. },
  2722. {
  2723. "type": "string",
  2724. "description": "Status code type",
  2725. "name": "code_type",
  2726. "in": "query"
  2727. },
  2728. {
  2729. "type": "integer",
  2730. "description": "Status code",
  2731. "name": "code",
  2732. "in": "query"
  2733. },
  2734. {
  2735. "type": "boolean",
  2736. "description": "With body",
  2737. "name": "with_body",
  2738. "in": "query"
  2739. },
  2740. {
  2741. "type": "string",
  2742. "description": "IP",
  2743. "name": "ip",
  2744. "in": "query"
  2745. },
  2746. {
  2747. "type": "string",
  2748. "description": "User",
  2749. "name": "user",
  2750. "in": "query"
  2751. }
  2752. ],
  2753. "responses": {
  2754. "200": {
  2755. "description": "OK",
  2756. "schema": {
  2757. "allOf": [
  2758. {
  2759. "$ref": "#/definitions/middleware.APIResponse"
  2760. },
  2761. {
  2762. "type": "object",
  2763. "properties": {
  2764. "data": {
  2765. "$ref": "#/definitions/model.GetLogsResult"
  2766. }
  2767. }
  2768. }
  2769. ]
  2770. }
  2771. }
  2772. }
  2773. },
  2774. "delete": {
  2775. "security": [
  2776. {
  2777. "ApiKeyAuth": []
  2778. }
  2779. ],
  2780. "description": "Deletes logs older than the specified retention period",
  2781. "produces": [
  2782. "application/json"
  2783. ],
  2784. "tags": [
  2785. "logs"
  2786. ],
  2787. "summary": "Delete historical logs",
  2788. "parameters": [
  2789. {
  2790. "type": "integer",
  2791. "description": "Timestamp (milliseconds)",
  2792. "name": "timestamp",
  2793. "in": "query",
  2794. "required": true
  2795. }
  2796. ],
  2797. "responses": {
  2798. "200": {
  2799. "description": "OK",
  2800. "schema": {
  2801. "allOf": [
  2802. {
  2803. "$ref": "#/definitions/middleware.APIResponse"
  2804. },
  2805. {
  2806. "type": "object",
  2807. "properties": {
  2808. "data": {
  2809. "type": "integer"
  2810. }
  2811. }
  2812. }
  2813. ]
  2814. }
  2815. }
  2816. }
  2817. }
  2818. },
  2819. "/api/logs/consume_error": {
  2820. "get": {
  2821. "security": [
  2822. {
  2823. "ApiKeyAuth": []
  2824. }
  2825. ],
  2826. "description": "Search for logs with consumption errors",
  2827. "produces": [
  2828. "application/json"
  2829. ],
  2830. "tags": [
  2831. "logs"
  2832. ],
  2833. "summary": "Search consumption errors",
  2834. "parameters": [
  2835. {
  2836. "type": "integer",
  2837. "description": "Page number",
  2838. "name": "page",
  2839. "in": "query"
  2840. },
  2841. {
  2842. "type": "integer",
  2843. "description": "Items per page",
  2844. "name": "per_page",
  2845. "in": "query"
  2846. },
  2847. {
  2848. "type": "integer",
  2849. "description": "Start timestamp (milliseconds)",
  2850. "name": "start_timestamp",
  2851. "in": "query"
  2852. },
  2853. {
  2854. "type": "integer",
  2855. "description": "End timestamp (milliseconds)",
  2856. "name": "end_timestamp",
  2857. "in": "query"
  2858. },
  2859. {
  2860. "type": "string",
  2861. "description": "Keyword",
  2862. "name": "keyword",
  2863. "in": "query"
  2864. },
  2865. {
  2866. "type": "string",
  2867. "description": "Group",
  2868. "name": "group",
  2869. "in": "query"
  2870. },
  2871. {
  2872. "type": "string",
  2873. "description": "Token name",
  2874. "name": "token_name",
  2875. "in": "query"
  2876. },
  2877. {
  2878. "type": "string",
  2879. "description": "Model name",
  2880. "name": "model_name",
  2881. "in": "query"
  2882. },
  2883. {
  2884. "type": "string",
  2885. "description": "Content",
  2886. "name": "content",
  2887. "in": "query"
  2888. },
  2889. {
  2890. "type": "integer",
  2891. "description": "Token ID",
  2892. "name": "token_id",
  2893. "in": "query"
  2894. },
  2895. {
  2896. "type": "string",
  2897. "description": "Order",
  2898. "name": "order",
  2899. "in": "query"
  2900. },
  2901. {
  2902. "type": "string",
  2903. "description": "Request ID",
  2904. "name": "request_id",
  2905. "in": "query"
  2906. }
  2907. ],
  2908. "responses": {
  2909. "200": {
  2910. "description": "OK",
  2911. "schema": {
  2912. "allOf": [
  2913. {
  2914. "$ref": "#/definitions/middleware.APIResponse"
  2915. },
  2916. {
  2917. "type": "object",
  2918. "properties": {
  2919. "data": {
  2920. "type": "object",
  2921. "additionalProperties": {
  2922. "allOf": [
  2923. {},
  2924. {
  2925. "type": "object",
  2926. "properties": {
  2927. "logs": {
  2928. "type": "array",
  2929. "items": {
  2930. "$ref": "#/definitions/model.RequestDetail"
  2931. }
  2932. },
  2933. "total": {
  2934. "type": "integer"
  2935. }
  2936. }
  2937. }
  2938. ]
  2939. }
  2940. }
  2941. }
  2942. }
  2943. ]
  2944. }
  2945. }
  2946. }
  2947. }
  2948. },
  2949. "/api/logs/detail/{log_id}": {
  2950. "get": {
  2951. "security": [
  2952. {
  2953. "ApiKeyAuth": []
  2954. }
  2955. ],
  2956. "description": "Get detailed information about a specific log entry",
  2957. "produces": [
  2958. "application/json"
  2959. ],
  2960. "tags": [
  2961. "logs"
  2962. ],
  2963. "summary": "Get log detail",
  2964. "parameters": [
  2965. {
  2966. "type": "string",
  2967. "description": "Log ID",
  2968. "name": "log_id",
  2969. "in": "path",
  2970. "required": true
  2971. }
  2972. ],
  2973. "responses": {
  2974. "200": {
  2975. "description": "OK",
  2976. "schema": {
  2977. "allOf": [
  2978. {
  2979. "$ref": "#/definitions/middleware.APIResponse"
  2980. },
  2981. {
  2982. "type": "object",
  2983. "properties": {
  2984. "data": {
  2985. "$ref": "#/definitions/model.RequestDetail"
  2986. }
  2987. }
  2988. }
  2989. ]
  2990. }
  2991. }
  2992. }
  2993. }
  2994. },
  2995. "/api/logs/search": {
  2996. "get": {
  2997. "security": [
  2998. {
  2999. "ApiKeyAuth": []
  3000. }
  3001. ],
  3002. "description": "Search logs with various filters",
  3003. "produces": [
  3004. "application/json"
  3005. ],
  3006. "tags": [
  3007. "logs"
  3008. ],
  3009. "summary": "Search logs",
  3010. "parameters": [
  3011. {
  3012. "type": "string",
  3013. "description": "Group or *",
  3014. "name": "group",
  3015. "in": "query"
  3016. },
  3017. {
  3018. "type": "string",
  3019. "description": "Keyword",
  3020. "name": "keyword",
  3021. "in": "query",
  3022. "required": true
  3023. },
  3024. {
  3025. "type": "integer",
  3026. "description": "Page number",
  3027. "name": "page",
  3028. "in": "query"
  3029. },
  3030. {
  3031. "type": "integer",
  3032. "description": "Items per page",
  3033. "name": "per_page",
  3034. "in": "query"
  3035. },
  3036. {
  3037. "type": "integer",
  3038. "description": "Start timestamp (milliseconds)",
  3039. "name": "start_timestamp",
  3040. "in": "query"
  3041. },
  3042. {
  3043. "type": "integer",
  3044. "description": "End timestamp (milliseconds)",
  3045. "name": "end_timestamp",
  3046. "in": "query"
  3047. },
  3048. {
  3049. "type": "string",
  3050. "description": "Filter by token name",
  3051. "name": "token_name",
  3052. "in": "query"
  3053. },
  3054. {
  3055. "type": "string",
  3056. "description": "Filter by model name",
  3057. "name": "model_name",
  3058. "in": "query"
  3059. },
  3060. {
  3061. "type": "integer",
  3062. "description": "Filter by channel",
  3063. "name": "channel",
  3064. "in": "query"
  3065. },
  3066. {
  3067. "type": "integer",
  3068. "description": "Filter by token id",
  3069. "name": "token_id",
  3070. "in": "query"
  3071. },
  3072. {
  3073. "type": "string",
  3074. "description": "Order",
  3075. "name": "order",
  3076. "in": "query"
  3077. },
  3078. {
  3079. "type": "string",
  3080. "description": "Request ID",
  3081. "name": "request_id",
  3082. "in": "query"
  3083. },
  3084. {
  3085. "type": "string",
  3086. "description": "Status code type",
  3087. "name": "code_type",
  3088. "in": "query"
  3089. },
  3090. {
  3091. "type": "integer",
  3092. "description": "Status code",
  3093. "name": "code",
  3094. "in": "query"
  3095. },
  3096. {
  3097. "type": "boolean",
  3098. "description": "With body",
  3099. "name": "with_body",
  3100. "in": "query"
  3101. },
  3102. {
  3103. "type": "string",
  3104. "description": "IP",
  3105. "name": "ip",
  3106. "in": "query"
  3107. },
  3108. {
  3109. "type": "string",
  3110. "description": "User",
  3111. "name": "user",
  3112. "in": "query"
  3113. }
  3114. ],
  3115. "responses": {
  3116. "200": {
  3117. "description": "OK",
  3118. "schema": {
  3119. "allOf": [
  3120. {
  3121. "$ref": "#/definitions/middleware.APIResponse"
  3122. },
  3123. {
  3124. "type": "object",
  3125. "properties": {
  3126. "data": {
  3127. "$ref": "#/definitions/model.GetLogsResult"
  3128. }
  3129. }
  3130. }
  3131. ]
  3132. }
  3133. }
  3134. }
  3135. }
  3136. },
  3137. "/api/logs/used/models": {
  3138. "get": {
  3139. "security": [
  3140. {
  3141. "ApiKeyAuth": []
  3142. }
  3143. ],
  3144. "description": "Get a list of models that have been used in logs",
  3145. "produces": [
  3146. "application/json"
  3147. ],
  3148. "tags": [
  3149. "logs"
  3150. ],
  3151. "summary": "Get used models",
  3152. "parameters": [
  3153. {
  3154. "type": "string",
  3155. "description": "Group or *",
  3156. "name": "group",
  3157. "in": "query"
  3158. }
  3159. ],
  3160. "responses": {
  3161. "200": {
  3162. "description": "OK",
  3163. "schema": {
  3164. "allOf": [
  3165. {
  3166. "$ref": "#/definitions/middleware.APIResponse"
  3167. },
  3168. {
  3169. "type": "object",
  3170. "properties": {
  3171. "data": {
  3172. "type": "array",
  3173. "items": {
  3174. "type": "string"
  3175. }
  3176. }
  3177. }
  3178. }
  3179. ]
  3180. }
  3181. }
  3182. }
  3183. }
  3184. },
  3185. "/api/logs/used/token_names": {
  3186. "get": {
  3187. "security": [
  3188. {
  3189. "ApiKeyAuth": []
  3190. }
  3191. ],
  3192. "description": "Get a list of token names that have been used in logs",
  3193. "produces": [
  3194. "application/json"
  3195. ],
  3196. "tags": [
  3197. "logs"
  3198. ],
  3199. "summary": "Get used token names",
  3200. "parameters": [
  3201. {
  3202. "type": "string",
  3203. "description": "Group or *",
  3204. "name": "group",
  3205. "in": "query"
  3206. }
  3207. ],
  3208. "responses": {
  3209. "200": {
  3210. "description": "OK",
  3211. "schema": {
  3212. "allOf": [
  3213. {
  3214. "$ref": "#/definitions/middleware.APIResponse"
  3215. },
  3216. {
  3217. "type": "object",
  3218. "properties": {
  3219. "data": {
  3220. "type": "array",
  3221. "items": {
  3222. "type": "string"
  3223. }
  3224. }
  3225. }
  3226. }
  3227. ]
  3228. }
  3229. }
  3230. }
  3231. }
  3232. },
  3233. "/api/mcp/group/{group}": {
  3234. "get": {
  3235. "security": [
  3236. {
  3237. "ApiKeyAuth": []
  3238. }
  3239. ],
  3240. "description": "Get a list of Group MCPs with pagination and filtering",
  3241. "produces": [
  3242. "application/json"
  3243. ],
  3244. "tags": [
  3245. "mcp"
  3246. ],
  3247. "summary": "Get Group MCPs",
  3248. "parameters": [
  3249. {
  3250. "type": "string",
  3251. "description": "Group ID",
  3252. "name": "group",
  3253. "in": "path",
  3254. "required": true
  3255. },
  3256. {
  3257. "type": "integer",
  3258. "description": "Page number",
  3259. "name": "page",
  3260. "in": "query"
  3261. },
  3262. {
  3263. "type": "integer",
  3264. "description": "Items per page",
  3265. "name": "per_page",
  3266. "in": "query"
  3267. },
  3268. {
  3269. "type": "string",
  3270. "description": "MCP type",
  3271. "name": "type",
  3272. "in": "query"
  3273. },
  3274. {
  3275. "type": "string",
  3276. "description": "Search keyword",
  3277. "name": "keyword",
  3278. "in": "query"
  3279. },
  3280. {
  3281. "type": "integer",
  3282. "description": "MCP status",
  3283. "name": "status",
  3284. "in": "query"
  3285. }
  3286. ],
  3287. "responses": {
  3288. "200": {
  3289. "description": "OK",
  3290. "schema": {
  3291. "allOf": [
  3292. {
  3293. "$ref": "#/definitions/middleware.APIResponse"
  3294. },
  3295. {
  3296. "type": "object",
  3297. "properties": {
  3298. "data": {
  3299. "type": "array",
  3300. "items": {
  3301. "$ref": "#/definitions/model.GroupMCP"
  3302. }
  3303. }
  3304. }
  3305. }
  3306. ]
  3307. }
  3308. }
  3309. }
  3310. },
  3311. "post": {
  3312. "security": [
  3313. {
  3314. "ApiKeyAuth": []
  3315. }
  3316. ],
  3317. "description": "Create a new Group MCP",
  3318. "consumes": [
  3319. "application/json"
  3320. ],
  3321. "produces": [
  3322. "application/json"
  3323. ],
  3324. "tags": [
  3325. "mcp"
  3326. ],
  3327. "summary": "Create Group MCP",
  3328. "parameters": [
  3329. {
  3330. "type": "string",
  3331. "description": "Group ID",
  3332. "name": "group",
  3333. "in": "path",
  3334. "required": true
  3335. },
  3336. {
  3337. "description": "Group MCP object",
  3338. "name": "mcp",
  3339. "in": "body",
  3340. "required": true,
  3341. "schema": {
  3342. "$ref": "#/definitions/model.GroupMCP"
  3343. }
  3344. }
  3345. ],
  3346. "responses": {
  3347. "200": {
  3348. "description": "OK",
  3349. "schema": {
  3350. "allOf": [
  3351. {
  3352. "$ref": "#/definitions/middleware.APIResponse"
  3353. },
  3354. {
  3355. "type": "object",
  3356. "properties": {
  3357. "data": {
  3358. "$ref": "#/definitions/model.GroupMCP"
  3359. }
  3360. }
  3361. }
  3362. ]
  3363. }
  3364. }
  3365. }
  3366. }
  3367. },
  3368. "/api/mcp/group/{group}/{id}": {
  3369. "get": {
  3370. "security": [
  3371. {
  3372. "ApiKeyAuth": []
  3373. }
  3374. ],
  3375. "description": "Get a specific Group MCP by its ID and Group ID",
  3376. "produces": [
  3377. "application/json"
  3378. ],
  3379. "tags": [
  3380. "mcp"
  3381. ],
  3382. "summary": "Get Group MCP by ID",
  3383. "parameters": [
  3384. {
  3385. "type": "string",
  3386. "description": "MCP ID",
  3387. "name": "id",
  3388. "in": "path",
  3389. "required": true
  3390. },
  3391. {
  3392. "type": "string",
  3393. "description": "Group ID",
  3394. "name": "group",
  3395. "in": "path",
  3396. "required": true
  3397. }
  3398. ],
  3399. "responses": {
  3400. "200": {
  3401. "description": "OK",
  3402. "schema": {
  3403. "allOf": [
  3404. {
  3405. "$ref": "#/definitions/middleware.APIResponse"
  3406. },
  3407. {
  3408. "type": "object",
  3409. "properties": {
  3410. "data": {
  3411. "$ref": "#/definitions/model.GroupMCP"
  3412. }
  3413. }
  3414. }
  3415. ]
  3416. }
  3417. }
  3418. }
  3419. },
  3420. "put": {
  3421. "security": [
  3422. {
  3423. "ApiKeyAuth": []
  3424. }
  3425. ],
  3426. "description": "Update an existing Group MCP",
  3427. "consumes": [
  3428. "application/json"
  3429. ],
  3430. "produces": [
  3431. "application/json"
  3432. ],
  3433. "tags": [
  3434. "mcp"
  3435. ],
  3436. "summary": "Update Group MCP",
  3437. "parameters": [
  3438. {
  3439. "type": "string",
  3440. "description": "MCP ID",
  3441. "name": "id",
  3442. "in": "path",
  3443. "required": true
  3444. },
  3445. {
  3446. "type": "string",
  3447. "description": "Group ID",
  3448. "name": "group",
  3449. "in": "path",
  3450. "required": true
  3451. },
  3452. {
  3453. "description": "Group MCP object",
  3454. "name": "mcp",
  3455. "in": "body",
  3456. "required": true,
  3457. "schema": {
  3458. "$ref": "#/definitions/model.GroupMCP"
  3459. }
  3460. }
  3461. ],
  3462. "responses": {
  3463. "200": {
  3464. "description": "OK",
  3465. "schema": {
  3466. "allOf": [
  3467. {
  3468. "$ref": "#/definitions/middleware.APIResponse"
  3469. },
  3470. {
  3471. "type": "object",
  3472. "properties": {
  3473. "data": {
  3474. "$ref": "#/definitions/model.GroupMCP"
  3475. }
  3476. }
  3477. }
  3478. ]
  3479. }
  3480. }
  3481. }
  3482. },
  3483. "delete": {
  3484. "security": [
  3485. {
  3486. "ApiKeyAuth": []
  3487. }
  3488. ],
  3489. "description": "Delete a Group MCP by ID and Group ID",
  3490. "produces": [
  3491. "application/json"
  3492. ],
  3493. "tags": [
  3494. "mcp"
  3495. ],
  3496. "summary": "Delete Group MCP",
  3497. "parameters": [
  3498. {
  3499. "type": "string",
  3500. "description": "MCP ID",
  3501. "name": "id",
  3502. "in": "path",
  3503. "required": true
  3504. },
  3505. {
  3506. "type": "string",
  3507. "description": "Group ID",
  3508. "name": "group",
  3509. "in": "path",
  3510. "required": true
  3511. }
  3512. ],
  3513. "responses": {
  3514. "200": {
  3515. "description": "OK",
  3516. "schema": {
  3517. "$ref": "#/definitions/middleware.APIResponse"
  3518. }
  3519. }
  3520. }
  3521. }
  3522. },
  3523. "/api/mcp/group/{group}/{id}/status": {
  3524. "post": {
  3525. "security": [
  3526. {
  3527. "ApiKeyAuth": []
  3528. }
  3529. ],
  3530. "description": "Update the status of a Group MCP",
  3531. "consumes": [
  3532. "application/json"
  3533. ],
  3534. "produces": [
  3535. "application/json"
  3536. ],
  3537. "tags": [
  3538. "mcp"
  3539. ],
  3540. "summary": "Update Group MCP status",
  3541. "parameters": [
  3542. {
  3543. "type": "string",
  3544. "description": "MCP ID",
  3545. "name": "id",
  3546. "in": "path",
  3547. "required": true
  3548. },
  3549. {
  3550. "type": "string",
  3551. "description": "Group ID",
  3552. "name": "group",
  3553. "in": "path",
  3554. "required": true
  3555. },
  3556. {
  3557. "description": "MCP status",
  3558. "name": "status",
  3559. "in": "body",
  3560. "required": true,
  3561. "schema": {
  3562. "$ref": "#/definitions/controller.UpdateGroupMCPStatusRequest"
  3563. }
  3564. }
  3565. ],
  3566. "responses": {
  3567. "200": {
  3568. "description": "OK",
  3569. "schema": {
  3570. "$ref": "#/definitions/middleware.APIResponse"
  3571. }
  3572. }
  3573. }
  3574. }
  3575. },
  3576. "/api/mcp/public/": {
  3577. "get": {
  3578. "security": [
  3579. {
  3580. "ApiKeyAuth": []
  3581. }
  3582. ],
  3583. "description": "Get a list of MCPs with pagination and filtering",
  3584. "produces": [
  3585. "application/json"
  3586. ],
  3587. "tags": [
  3588. "mcp"
  3589. ],
  3590. "summary": "Get MCPs",
  3591. "parameters": [
  3592. {
  3593. "type": "integer",
  3594. "description": "Page number",
  3595. "name": "page",
  3596. "in": "query"
  3597. },
  3598. {
  3599. "type": "integer",
  3600. "description": "Items per page",
  3601. "name": "per_page",
  3602. "in": "query"
  3603. },
  3604. {
  3605. "type": "string",
  3606. "description": "MCP type",
  3607. "name": "type",
  3608. "in": "query"
  3609. },
  3610. {
  3611. "type": "string",
  3612. "description": "Search keyword",
  3613. "name": "keyword",
  3614. "in": "query"
  3615. },
  3616. {
  3617. "type": "integer",
  3618. "description": "MCP status",
  3619. "name": "status",
  3620. "in": "query"
  3621. }
  3622. ],
  3623. "responses": {
  3624. "200": {
  3625. "description": "OK",
  3626. "schema": {
  3627. "allOf": [
  3628. {
  3629. "$ref": "#/definitions/middleware.APIResponse"
  3630. },
  3631. {
  3632. "type": "object",
  3633. "properties": {
  3634. "data": {
  3635. "type": "array",
  3636. "items": {
  3637. "$ref": "#/definitions/model.PublicMCP"
  3638. }
  3639. }
  3640. }
  3641. }
  3642. ]
  3643. }
  3644. }
  3645. }
  3646. },
  3647. "post": {
  3648. "security": [
  3649. {
  3650. "ApiKeyAuth": []
  3651. }
  3652. ],
  3653. "description": "Create a new MCP",
  3654. "consumes": [
  3655. "application/json"
  3656. ],
  3657. "produces": [
  3658. "application/json"
  3659. ],
  3660. "tags": [
  3661. "mcp"
  3662. ],
  3663. "summary": "Create MCP",
  3664. "parameters": [
  3665. {
  3666. "description": "MCP object",
  3667. "name": "mcp",
  3668. "in": "body",
  3669. "required": true,
  3670. "schema": {
  3671. "$ref": "#/definitions/model.PublicMCP"
  3672. }
  3673. }
  3674. ],
  3675. "responses": {
  3676. "200": {
  3677. "description": "OK",
  3678. "schema": {
  3679. "$ref": "#/definitions/middleware.APIResponse"
  3680. }
  3681. }
  3682. }
  3683. }
  3684. },
  3685. "/api/mcp/public/{id}": {
  3686. "get": {
  3687. "security": [
  3688. {
  3689. "ApiKeyAuth": []
  3690. }
  3691. ],
  3692. "description": "Get a specific MCP by its ID",
  3693. "produces": [
  3694. "application/json"
  3695. ],
  3696. "tags": [
  3697. "mcp"
  3698. ],
  3699. "summary": "Get MCP by ID",
  3700. "parameters": [
  3701. {
  3702. "type": "string",
  3703. "description": "MCP ID",
  3704. "name": "id",
  3705. "in": "path",
  3706. "required": true
  3707. }
  3708. ],
  3709. "responses": {
  3710. "200": {
  3711. "description": "OK",
  3712. "schema": {
  3713. "allOf": [
  3714. {
  3715. "$ref": "#/definitions/middleware.APIResponse"
  3716. },
  3717. {
  3718. "type": "object",
  3719. "properties": {
  3720. "data": {
  3721. "$ref": "#/definitions/model.PublicMCP"
  3722. }
  3723. }
  3724. }
  3725. ]
  3726. }
  3727. }
  3728. }
  3729. },
  3730. "put": {
  3731. "security": [
  3732. {
  3733. "ApiKeyAuth": []
  3734. }
  3735. ],
  3736. "description": "Update an existing MCP",
  3737. "consumes": [
  3738. "application/json"
  3739. ],
  3740. "produces": [
  3741. "application/json"
  3742. ],
  3743. "tags": [
  3744. "mcp"
  3745. ],
  3746. "summary": "Update MCP",
  3747. "parameters": [
  3748. {
  3749. "type": "string",
  3750. "description": "MCP ID",
  3751. "name": "id",
  3752. "in": "path",
  3753. "required": true
  3754. },
  3755. {
  3756. "description": "MCP object",
  3757. "name": "mcp",
  3758. "in": "body",
  3759. "required": true,
  3760. "schema": {
  3761. "$ref": "#/definitions/model.PublicMCP"
  3762. }
  3763. }
  3764. ],
  3765. "responses": {
  3766. "200": {
  3767. "description": "OK",
  3768. "schema": {
  3769. "$ref": "#/definitions/middleware.APIResponse"
  3770. }
  3771. }
  3772. }
  3773. },
  3774. "delete": {
  3775. "security": [
  3776. {
  3777. "ApiKeyAuth": []
  3778. }
  3779. ],
  3780. "description": "Delete an MCP by ID",
  3781. "produces": [
  3782. "application/json"
  3783. ],
  3784. "tags": [
  3785. "mcp"
  3786. ],
  3787. "summary": "Delete MCP",
  3788. "parameters": [
  3789. {
  3790. "type": "string",
  3791. "description": "MCP ID",
  3792. "name": "id",
  3793. "in": "path",
  3794. "required": true
  3795. }
  3796. ],
  3797. "responses": {
  3798. "200": {
  3799. "description": "OK",
  3800. "schema": {
  3801. "$ref": "#/definitions/middleware.APIResponse"
  3802. }
  3803. }
  3804. }
  3805. }
  3806. },
  3807. "/api/mcp/public/{id}/group/{group}/params": {
  3808. "get": {
  3809. "security": [
  3810. {
  3811. "ApiKeyAuth": []
  3812. }
  3813. ],
  3814. "description": "Get reusing parameters for a specific group and MCP",
  3815. "produces": [
  3816. "application/json"
  3817. ],
  3818. "tags": [
  3819. "mcp"
  3820. ],
  3821. "summary": "Get group MCP reusing parameters",
  3822. "parameters": [
  3823. {
  3824. "type": "string",
  3825. "description": "MCP ID",
  3826. "name": "id",
  3827. "in": "path",
  3828. "required": true
  3829. },
  3830. {
  3831. "type": "string",
  3832. "description": "Group ID",
  3833. "name": "group",
  3834. "in": "path",
  3835. "required": true
  3836. }
  3837. ],
  3838. "responses": {
  3839. "200": {
  3840. "description": "OK",
  3841. "schema": {
  3842. "allOf": [
  3843. {
  3844. "$ref": "#/definitions/middleware.APIResponse"
  3845. },
  3846. {
  3847. "type": "object",
  3848. "properties": {
  3849. "data": {
  3850. "$ref": "#/definitions/model.PublicMCPReusingParam"
  3851. }
  3852. }
  3853. }
  3854. ]
  3855. }
  3856. }
  3857. }
  3858. },
  3859. "post": {
  3860. "security": [
  3861. {
  3862. "ApiKeyAuth": []
  3863. }
  3864. ],
  3865. "description": "Create or update reusing parameters for a specific group and MCP",
  3866. "consumes": [
  3867. "application/json"
  3868. ],
  3869. "produces": [
  3870. "application/json"
  3871. ],
  3872. "tags": [
  3873. "mcp"
  3874. ],
  3875. "summary": "Create or update group MCP reusing parameters",
  3876. "parameters": [
  3877. {
  3878. "type": "string",
  3879. "description": "MCP ID",
  3880. "name": "id",
  3881. "in": "path",
  3882. "required": true
  3883. },
  3884. {
  3885. "type": "string",
  3886. "description": "Group ID",
  3887. "name": "group",
  3888. "in": "path",
  3889. "required": true
  3890. },
  3891. {
  3892. "description": "Reusing parameters",
  3893. "name": "params",
  3894. "in": "body",
  3895. "required": true,
  3896. "schema": {
  3897. "$ref": "#/definitions/model.PublicMCPReusingParam"
  3898. }
  3899. }
  3900. ],
  3901. "responses": {
  3902. "200": {
  3903. "description": "OK",
  3904. "schema": {
  3905. "$ref": "#/definitions/middleware.APIResponse"
  3906. }
  3907. }
  3908. }
  3909. }
  3910. },
  3911. "/api/mcp/public/{id}/status": {
  3912. "post": {
  3913. "security": [
  3914. {
  3915. "ApiKeyAuth": []
  3916. }
  3917. ],
  3918. "description": "Update the status of an MCP",
  3919. "consumes": [
  3920. "application/json"
  3921. ],
  3922. "produces": [
  3923. "application/json"
  3924. ],
  3925. "tags": [
  3926. "mcp"
  3927. ],
  3928. "summary": "Update MCP status",
  3929. "parameters": [
  3930. {
  3931. "type": "string",
  3932. "description": "MCP ID",
  3933. "name": "id",
  3934. "in": "path",
  3935. "required": true
  3936. },
  3937. {
  3938. "description": "MCP status",
  3939. "name": "status",
  3940. "in": "body",
  3941. "required": true,
  3942. "schema": {
  3943. "$ref": "#/definitions/controller.UpdatePublicMCPStatusRequest"
  3944. }
  3945. }
  3946. ],
  3947. "responses": {
  3948. "200": {
  3949. "description": "OK",
  3950. "schema": {
  3951. "$ref": "#/definitions/middleware.APIResponse"
  3952. }
  3953. }
  3954. }
  3955. }
  3956. },
  3957. "/api/model_config/": {
  3958. "post": {
  3959. "security": [
  3960. {
  3961. "ApiKeyAuth": []
  3962. }
  3963. ],
  3964. "description": "Saves a model config",
  3965. "produces": [
  3966. "application/json"
  3967. ],
  3968. "tags": [
  3969. "modelconfig"
  3970. ],
  3971. "summary": "Save model config",
  3972. "parameters": [
  3973. {
  3974. "description": "Model config",
  3975. "name": "config",
  3976. "in": "body",
  3977. "required": true,
  3978. "schema": {
  3979. "$ref": "#/definitions/controller.SaveModelConfigsRequest"
  3980. }
  3981. }
  3982. ],
  3983. "responses": {
  3984. "200": {
  3985. "description": "OK",
  3986. "schema": {
  3987. "$ref": "#/definitions/middleware.APIResponse"
  3988. }
  3989. }
  3990. }
  3991. }
  3992. },
  3993. "/api/model_config/{model}": {
  3994. "get": {
  3995. "security": [
  3996. {
  3997. "ApiKeyAuth": []
  3998. }
  3999. ],
  4000. "description": "Returns a model config",
  4001. "produces": [
  4002. "application/json"
  4003. ],
  4004. "tags": [
  4005. "modelconfig"
  4006. ],
  4007. "summary": "Get model config",
  4008. "parameters": [
  4009. {
  4010. "type": "string",
  4011. "description": "Model name",
  4012. "name": "model",
  4013. "in": "path",
  4014. "required": true
  4015. }
  4016. ],
  4017. "responses": {
  4018. "200": {
  4019. "description": "OK",
  4020. "schema": {
  4021. "allOf": [
  4022. {
  4023. "$ref": "#/definitions/middleware.APIResponse"
  4024. },
  4025. {
  4026. "type": "object",
  4027. "properties": {
  4028. "data": {
  4029. "$ref": "#/definitions/model.ModelConfig"
  4030. }
  4031. }
  4032. }
  4033. ]
  4034. }
  4035. }
  4036. }
  4037. },
  4038. "delete": {
  4039. "security": [
  4040. {
  4041. "ApiKeyAuth": []
  4042. }
  4043. ],
  4044. "description": "Deletes a model config",
  4045. "produces": [
  4046. "application/json"
  4047. ],
  4048. "tags": [
  4049. "modelconfig"
  4050. ],
  4051. "summary": "Delete model config",
  4052. "parameters": [
  4053. {
  4054. "type": "string",
  4055. "description": "Model name",
  4056. "name": "model",
  4057. "in": "path",
  4058. "required": true
  4059. }
  4060. ],
  4061. "responses": {
  4062. "200": {
  4063. "description": "OK",
  4064. "schema": {
  4065. "$ref": "#/definitions/middleware.APIResponse"
  4066. }
  4067. }
  4068. }
  4069. }
  4070. },
  4071. "/api/model_configs/": {
  4072. "get": {
  4073. "security": [
  4074. {
  4075. "ApiKeyAuth": []
  4076. }
  4077. ],
  4078. "description": "Returns a list of model configs with pagination",
  4079. "produces": [
  4080. "application/json"
  4081. ],
  4082. "tags": [
  4083. "modelconfig"
  4084. ],
  4085. "summary": "Get model configs",
  4086. "parameters": [
  4087. {
  4088. "type": "string",
  4089. "description": "Model name",
  4090. "name": "model",
  4091. "in": "query"
  4092. }
  4093. ],
  4094. "responses": {
  4095. "200": {
  4096. "description": "OK",
  4097. "schema": {
  4098. "allOf": [
  4099. {
  4100. "$ref": "#/definitions/middleware.APIResponse"
  4101. },
  4102. {
  4103. "type": "object",
  4104. "properties": {
  4105. "data": {
  4106. "type": "object",
  4107. "additionalProperties": {
  4108. "allOf": [
  4109. {},
  4110. {
  4111. "type": "object",
  4112. "properties": {
  4113. "configs": {
  4114. "type": "array",
  4115. "items": {
  4116. "$ref": "#/definitions/model.ModelConfig"
  4117. }
  4118. },
  4119. "total": {
  4120. "type": "integer"
  4121. }
  4122. }
  4123. }
  4124. ]
  4125. }
  4126. }
  4127. }
  4128. }
  4129. ]
  4130. }
  4131. }
  4132. }
  4133. },
  4134. "post": {
  4135. "security": [
  4136. {
  4137. "ApiKeyAuth": []
  4138. }
  4139. ],
  4140. "description": "Saves a list of model configs",
  4141. "produces": [
  4142. "application/json"
  4143. ],
  4144. "tags": [
  4145. "modelconfig"
  4146. ],
  4147. "summary": "Save model configs",
  4148. "parameters": [
  4149. {
  4150. "description": "Model configs",
  4151. "name": "configs",
  4152. "in": "body",
  4153. "required": true,
  4154. "schema": {
  4155. "type": "array",
  4156. "items": {
  4157. "$ref": "#/definitions/controller.SaveModelConfigsRequest"
  4158. }
  4159. }
  4160. }
  4161. ],
  4162. "responses": {
  4163. "200": {
  4164. "description": "OK",
  4165. "schema": {
  4166. "$ref": "#/definitions/middleware.APIResponse"
  4167. }
  4168. }
  4169. }
  4170. }
  4171. },
  4172. "/api/model_configs/all": {
  4173. "get": {
  4174. "security": [
  4175. {
  4176. "ApiKeyAuth": []
  4177. }
  4178. ],
  4179. "description": "Returns a list of all model configs",
  4180. "produces": [
  4181. "application/json"
  4182. ],
  4183. "tags": [
  4184. "modelconfig"
  4185. ],
  4186. "summary": "Get all model configs",
  4187. "responses": {
  4188. "200": {
  4189. "description": "OK",
  4190. "schema": {
  4191. "allOf": [
  4192. {
  4193. "$ref": "#/definitions/middleware.APIResponse"
  4194. },
  4195. {
  4196. "type": "object",
  4197. "properties": {
  4198. "data": {
  4199. "type": "array",
  4200. "items": {
  4201. "$ref": "#/definitions/model.ModelConfig"
  4202. }
  4203. }
  4204. }
  4205. }
  4206. ]
  4207. }
  4208. }
  4209. }
  4210. }
  4211. },
  4212. "/api/model_configs/batch_delete": {
  4213. "post": {
  4214. "security": [
  4215. {
  4216. "ApiKeyAuth": []
  4217. }
  4218. ],
  4219. "description": "Deletes a list of model configs",
  4220. "produces": [
  4221. "application/json"
  4222. ],
  4223. "tags": [
  4224. "modelconfig"
  4225. ],
  4226. "summary": "Delete model configs",
  4227. "parameters": [
  4228. {
  4229. "description": "Model names",
  4230. "name": "models",
  4231. "in": "body",
  4232. "required": true,
  4233. "schema": {
  4234. "type": "array",
  4235. "items": {
  4236. "type": "string"
  4237. }
  4238. }
  4239. }
  4240. ],
  4241. "responses": {
  4242. "200": {
  4243. "description": "OK",
  4244. "schema": {
  4245. "$ref": "#/definitions/middleware.APIResponse"
  4246. }
  4247. }
  4248. }
  4249. }
  4250. },
  4251. "/api/model_configs/contains": {
  4252. "post": {
  4253. "security": [
  4254. {
  4255. "ApiKeyAuth": []
  4256. }
  4257. ],
  4258. "description": "Returns a list of model configs by models contains",
  4259. "produces": [
  4260. "application/json"
  4261. ],
  4262. "tags": [
  4263. "modelconfig"
  4264. ],
  4265. "summary": "Get model configs by models contains",
  4266. "parameters": [
  4267. {
  4268. "description": "Models",
  4269. "name": "models",
  4270. "in": "body",
  4271. "required": true,
  4272. "schema": {
  4273. "$ref": "#/definitions/controller.GetModelConfigsByModelsContainsRequest"
  4274. }
  4275. }
  4276. ],
  4277. "responses": {
  4278. "200": {
  4279. "description": "OK",
  4280. "schema": {
  4281. "allOf": [
  4282. {
  4283. "$ref": "#/definitions/middleware.APIResponse"
  4284. },
  4285. {
  4286. "type": "object",
  4287. "properties": {
  4288. "data": {
  4289. "type": "array",
  4290. "items": {
  4291. "$ref": "#/definitions/model.ModelConfig"
  4292. }
  4293. }
  4294. }
  4295. }
  4296. ]
  4297. }
  4298. }
  4299. }
  4300. }
  4301. },
  4302. "/api/model_configs/search": {
  4303. "get": {
  4304. "security": [
  4305. {
  4306. "ApiKeyAuth": []
  4307. }
  4308. ],
  4309. "description": "Returns a list of model configs by keyword",
  4310. "produces": [
  4311. "application/json"
  4312. ],
  4313. "tags": [
  4314. "modelconfig"
  4315. ],
  4316. "summary": "Search model configs",
  4317. "parameters": [
  4318. {
  4319. "type": "string",
  4320. "description": "Keyword",
  4321. "name": "keyword",
  4322. "in": "query"
  4323. },
  4324. {
  4325. "type": "string",
  4326. "description": "Model name",
  4327. "name": "model",
  4328. "in": "query"
  4329. },
  4330. {
  4331. "type": "string",
  4332. "description": "Owner",
  4333. "name": "owner",
  4334. "in": "query"
  4335. },
  4336. {
  4337. "type": "integer",
  4338. "description": "Page",
  4339. "name": "page",
  4340. "in": "query"
  4341. },
  4342. {
  4343. "type": "integer",
  4344. "description": "Per page",
  4345. "name": "per_page",
  4346. "in": "query"
  4347. }
  4348. ],
  4349. "responses": {
  4350. "200": {
  4351. "description": "OK",
  4352. "schema": {
  4353. "allOf": [
  4354. {
  4355. "$ref": "#/definitions/middleware.APIResponse"
  4356. },
  4357. {
  4358. "type": "object",
  4359. "properties": {
  4360. "data": {
  4361. "type": "object",
  4362. "additionalProperties": {
  4363. "allOf": [
  4364. {},
  4365. {
  4366. "type": "object",
  4367. "properties": {
  4368. "configs": {
  4369. "type": "array",
  4370. "items": {
  4371. "$ref": "#/definitions/model.ModelConfig"
  4372. }
  4373. },
  4374. "total": {
  4375. "type": "integer"
  4376. }
  4377. }
  4378. }
  4379. ]
  4380. }
  4381. }
  4382. }
  4383. }
  4384. ]
  4385. }
  4386. }
  4387. }
  4388. }
  4389. },
  4390. "/api/model_cost_rank/": {
  4391. "get": {
  4392. "security": [
  4393. {
  4394. "ApiKeyAuth": []
  4395. }
  4396. ],
  4397. "description": "Returns ranking data for models based on cost",
  4398. "produces": [
  4399. "application/json"
  4400. ],
  4401. "tags": [
  4402. "dashboard"
  4403. ],
  4404. "summary": "Get model cost ranking data",
  4405. "parameters": [
  4406. {
  4407. "type": "string",
  4408. "description": "Group or *",
  4409. "name": "group",
  4410. "in": "query"
  4411. },
  4412. {
  4413. "type": "integer",
  4414. "description": "Channel ID",
  4415. "name": "channel",
  4416. "in": "query"
  4417. },
  4418. {
  4419. "type": "integer",
  4420. "description": "Start timestamp",
  4421. "name": "start_timestamp",
  4422. "in": "query"
  4423. },
  4424. {
  4425. "type": "integer",
  4426. "description": "End timestamp",
  4427. "name": "end_timestamp",
  4428. "in": "query"
  4429. }
  4430. ],
  4431. "responses": {
  4432. "200": {
  4433. "description": "OK",
  4434. "schema": {
  4435. "allOf": [
  4436. {
  4437. "$ref": "#/definitions/middleware.APIResponse"
  4438. },
  4439. {
  4440. "type": "object",
  4441. "properties": {
  4442. "data": {
  4443. "type": "array",
  4444. "items": {
  4445. "$ref": "#/definitions/model.CostRank"
  4446. }
  4447. }
  4448. }
  4449. }
  4450. ]
  4451. }
  4452. }
  4453. }
  4454. }
  4455. },
  4456. "/api/model_cost_rank/{group}": {
  4457. "get": {
  4458. "security": [
  4459. {
  4460. "ApiKeyAuth": []
  4461. }
  4462. ],
  4463. "description": "Returns model cost ranking data specific to the given group",
  4464. "produces": [
  4465. "application/json"
  4466. ],
  4467. "tags": [
  4468. "dashboard"
  4469. ],
  4470. "summary": "Get model cost ranking data for a specific group",
  4471. "parameters": [
  4472. {
  4473. "type": "string",
  4474. "description": "Group",
  4475. "name": "group",
  4476. "in": "path",
  4477. "required": true
  4478. },
  4479. {
  4480. "type": "integer",
  4481. "description": "Start timestamp",
  4482. "name": "start_timestamp",
  4483. "in": "query"
  4484. },
  4485. {
  4486. "type": "integer",
  4487. "description": "End timestamp",
  4488. "name": "end_timestamp",
  4489. "in": "query"
  4490. }
  4491. ],
  4492. "responses": {
  4493. "200": {
  4494. "description": "OK",
  4495. "schema": {
  4496. "allOf": [
  4497. {
  4498. "$ref": "#/definitions/middleware.APIResponse"
  4499. },
  4500. {
  4501. "type": "object",
  4502. "properties": {
  4503. "data": {
  4504. "type": "array",
  4505. "items": {
  4506. "$ref": "#/definitions/model.CostRank"
  4507. }
  4508. }
  4509. }
  4510. }
  4511. ]
  4512. }
  4513. }
  4514. }
  4515. }
  4516. },
  4517. "/api/models/builtin": {
  4518. "get": {
  4519. "security": [
  4520. {
  4521. "ApiKeyAuth": []
  4522. }
  4523. ],
  4524. "description": "Returns a list of builtin models",
  4525. "produces": [
  4526. "application/json"
  4527. ],
  4528. "tags": [
  4529. "model"
  4530. ],
  4531. "summary": "Get builtin models",
  4532. "responses": {
  4533. "200": {
  4534. "description": "OK",
  4535. "schema": {
  4536. "allOf": [
  4537. {
  4538. "$ref": "#/definitions/middleware.APIResponse"
  4539. },
  4540. {
  4541. "type": "object",
  4542. "properties": {
  4543. "data": {
  4544. "type": "array",
  4545. "items": {
  4546. "$ref": "#/definitions/controller.BuiltinModelConfig"
  4547. }
  4548. }
  4549. }
  4550. }
  4551. ]
  4552. }
  4553. }
  4554. }
  4555. }
  4556. },
  4557. "/api/models/builtin/channel": {
  4558. "get": {
  4559. "security": [
  4560. {
  4561. "ApiKeyAuth": []
  4562. }
  4563. ],
  4564. "description": "Returns a list of channel builtin models",
  4565. "produces": [
  4566. "application/json"
  4567. ],
  4568. "tags": [
  4569. "model"
  4570. ],
  4571. "summary": "Get channel builtin models",
  4572. "responses": {
  4573. "200": {
  4574. "description": "OK",
  4575. "schema": {
  4576. "allOf": [
  4577. {
  4578. "$ref": "#/definitions/middleware.APIResponse"
  4579. },
  4580. {
  4581. "type": "object",
  4582. "properties": {
  4583. "data": {
  4584. "type": "object",
  4585. "additionalProperties": {
  4586. "type": "array",
  4587. "items": {
  4588. "$ref": "#/definitions/controller.BuiltinModelConfig"
  4589. }
  4590. }
  4591. }
  4592. }
  4593. }
  4594. ]
  4595. }
  4596. }
  4597. }
  4598. }
  4599. },
  4600. "/api/models/builtin/channel/{type}": {
  4601. "get": {
  4602. "security": [
  4603. {
  4604. "ApiKeyAuth": []
  4605. }
  4606. ],
  4607. "description": "Returns a list of channel builtin models by type",
  4608. "produces": [
  4609. "application/json"
  4610. ],
  4611. "tags": [
  4612. "model"
  4613. ],
  4614. "summary": "Get channel builtin models by type",
  4615. "parameters": [
  4616. {
  4617. "enum": [
  4618. 1,
  4619. 3,
  4620. 12,
  4621. 13,
  4622. 14,
  4623. 15,
  4624. 16,
  4625. 17,
  4626. 18,
  4627. 19,
  4628. 20,
  4629. 23,
  4630. 24,
  4631. 25,
  4632. 26,
  4633. 27,
  4634. 28,
  4635. 29,
  4636. 30,
  4637. 31,
  4638. 32,
  4639. 33,
  4640. 34,
  4641. 35,
  4642. 36,
  4643. 37,
  4644. 40,
  4645. 41,
  4646. 42,
  4647. 43,
  4648. 44,
  4649. 45,
  4650. 46,
  4651. 47,
  4652. 48
  4653. ],
  4654. "type": "integer",
  4655. "description": "Channel type",
  4656. "name": "type",
  4657. "in": "path",
  4658. "required": true
  4659. }
  4660. ],
  4661. "responses": {
  4662. "200": {
  4663. "description": "OK",
  4664. "schema": {
  4665. "allOf": [
  4666. {
  4667. "$ref": "#/definitions/middleware.APIResponse"
  4668. },
  4669. {
  4670. "type": "object",
  4671. "properties": {
  4672. "data": {
  4673. "type": "array",
  4674. "items": {
  4675. "$ref": "#/definitions/controller.BuiltinModelConfig"
  4676. }
  4677. }
  4678. }
  4679. }
  4680. ]
  4681. }
  4682. }
  4683. }
  4684. }
  4685. },
  4686. "/api/models/channel": {
  4687. "get": {
  4688. "security": [
  4689. {
  4690. "ApiKeyAuth": []
  4691. }
  4692. ],
  4693. "description": "Returns a list of enabled models",
  4694. "produces": [
  4695. "application/json"
  4696. ],
  4697. "tags": [
  4698. "model"
  4699. ],
  4700. "summary": "Get enabled models and channels",
  4701. "responses": {
  4702. "200": {
  4703. "description": "OK",
  4704. "schema": {
  4705. "allOf": [
  4706. {
  4707. "$ref": "#/definitions/middleware.APIResponse"
  4708. },
  4709. {
  4710. "type": "object",
  4711. "properties": {
  4712. "data": {
  4713. "type": "object",
  4714. "additionalProperties": {
  4715. "type": "object",
  4716. "additionalProperties": {
  4717. "type": "array",
  4718. "items": {
  4719. "$ref": "#/definitions/controller.EnabledModelChannel"
  4720. }
  4721. }
  4722. }
  4723. }
  4724. }
  4725. }
  4726. ]
  4727. }
  4728. }
  4729. }
  4730. }
  4731. },
  4732. "/api/models/channel/{set}": {
  4733. "get": {
  4734. "security": [
  4735. {
  4736. "ApiKeyAuth": []
  4737. }
  4738. ],
  4739. "description": "Returns a list of enabled models and channels by set",
  4740. "produces": [
  4741. "application/json"
  4742. ],
  4743. "tags": [
  4744. "model"
  4745. ],
  4746. "summary": "Get enabled models and channels by set",
  4747. "parameters": [
  4748. {
  4749. "type": "string",
  4750. "description": "Models set",
  4751. "name": "set",
  4752. "in": "path",
  4753. "required": true
  4754. }
  4755. ],
  4756. "responses": {
  4757. "200": {
  4758. "description": "OK",
  4759. "schema": {
  4760. "allOf": [
  4761. {
  4762. "$ref": "#/definitions/middleware.APIResponse"
  4763. },
  4764. {
  4765. "type": "object",
  4766. "properties": {
  4767. "data": {
  4768. "type": "object",
  4769. "additionalProperties": {
  4770. "type": "array",
  4771. "items": {
  4772. "$ref": "#/definitions/controller.EnabledModelChannel"
  4773. }
  4774. }
  4775. }
  4776. }
  4777. }
  4778. ]
  4779. }
  4780. }
  4781. }
  4782. }
  4783. },
  4784. "/api/models/default": {
  4785. "get": {
  4786. "security": [
  4787. {
  4788. "ApiKeyAuth": []
  4789. }
  4790. ],
  4791. "description": "Returns a list of channel default models and mapping",
  4792. "produces": [
  4793. "application/json"
  4794. ],
  4795. "tags": [
  4796. "model"
  4797. ],
  4798. "summary": "Get channel default models and mapping",
  4799. "responses": {
  4800. "200": {
  4801. "description": "OK",
  4802. "schema": {
  4803. "allOf": [
  4804. {
  4805. "$ref": "#/definitions/middleware.APIResponse"
  4806. },
  4807. {
  4808. "type": "object",
  4809. "properties": {
  4810. "data": {
  4811. "type": "object",
  4812. "additionalProperties": {
  4813. "allOf": [
  4814. {},
  4815. {
  4816. "type": "object",
  4817. "properties": {
  4818. "mapping": {
  4819. "type": "object",
  4820. "additionalProperties": {
  4821. "type": "string"
  4822. }
  4823. },
  4824. "models": {
  4825. "type": "array",
  4826. "items": {
  4827. "type": "string"
  4828. }
  4829. }
  4830. }
  4831. }
  4832. ]
  4833. }
  4834. }
  4835. }
  4836. }
  4837. ]
  4838. }
  4839. }
  4840. }
  4841. }
  4842. },
  4843. "/api/models/default/{type}": {
  4844. "get": {
  4845. "security": [
  4846. {
  4847. "ApiKeyAuth": []
  4848. }
  4849. ],
  4850. "description": "Returns a list of channel default models and mapping by type",
  4851. "produces": [
  4852. "application/json"
  4853. ],
  4854. "tags": [
  4855. "model"
  4856. ],
  4857. "summary": "Get channel default models and mapping by type",
  4858. "parameters": [
  4859. {
  4860. "type": "string",
  4861. "description": "Channel type",
  4862. "name": "type",
  4863. "in": "path",
  4864. "required": true
  4865. }
  4866. ],
  4867. "responses": {
  4868. "200": {
  4869. "description": "OK",
  4870. "schema": {
  4871. "allOf": [
  4872. {
  4873. "$ref": "#/definitions/middleware.APIResponse"
  4874. },
  4875. {
  4876. "type": "object",
  4877. "properties": {
  4878. "data": {
  4879. "type": "object",
  4880. "additionalProperties": {
  4881. "allOf": [
  4882. {},
  4883. {
  4884. "type": "object",
  4885. "properties": {
  4886. "mapping": {
  4887. "type": "object",
  4888. "additionalProperties": {
  4889. "type": "string"
  4890. }
  4891. },
  4892. "models": {
  4893. "type": "array",
  4894. "items": {
  4895. "type": "string"
  4896. }
  4897. }
  4898. }
  4899. }
  4900. ]
  4901. }
  4902. }
  4903. }
  4904. }
  4905. ]
  4906. }
  4907. }
  4908. }
  4909. }
  4910. },
  4911. "/api/models/enabled": {
  4912. "get": {
  4913. "security": [
  4914. {
  4915. "ApiKeyAuth": []
  4916. }
  4917. ],
  4918. "description": "Returns a list of enabled models",
  4919. "produces": [
  4920. "application/json"
  4921. ],
  4922. "tags": [
  4923. "model"
  4924. ],
  4925. "summary": "Get enabled models",
  4926. "responses": {
  4927. "200": {
  4928. "description": "OK",
  4929. "schema": {
  4930. "allOf": [
  4931. {
  4932. "$ref": "#/definitions/middleware.APIResponse"
  4933. },
  4934. {
  4935. "type": "object",
  4936. "properties": {
  4937. "data": {
  4938. "type": "object",
  4939. "additionalProperties": {
  4940. "type": "array",
  4941. "items": {
  4942. "$ref": "#/definitions/model.ModelConfig"
  4943. }
  4944. }
  4945. }
  4946. }
  4947. }
  4948. ]
  4949. }
  4950. }
  4951. }
  4952. }
  4953. },
  4954. "/api/models/enabled/{set}": {
  4955. "get": {
  4956. "security": [
  4957. {
  4958. "ApiKeyAuth": []
  4959. }
  4960. ],
  4961. "description": "Returns a list of enabled models by set",
  4962. "produces": [
  4963. "application/json"
  4964. ],
  4965. "tags": [
  4966. "model"
  4967. ],
  4968. "summary": "Get enabled models by set",
  4969. "parameters": [
  4970. {
  4971. "type": "string",
  4972. "description": "Models set",
  4973. "name": "set",
  4974. "in": "path",
  4975. "required": true
  4976. }
  4977. ],
  4978. "responses": {
  4979. "200": {
  4980. "description": "OK",
  4981. "schema": {
  4982. "allOf": [
  4983. {
  4984. "$ref": "#/definitions/middleware.APIResponse"
  4985. },
  4986. {
  4987. "type": "object",
  4988. "properties": {
  4989. "data": {
  4990. "type": "array",
  4991. "items": {
  4992. "$ref": "#/definitions/model.ModelConfig"
  4993. }
  4994. }
  4995. }
  4996. }
  4997. ]
  4998. }
  4999. }
  5000. }
  5001. }
  5002. },
  5003. "/api/monitor/": {
  5004. "get": {
  5005. "security": [
  5006. {
  5007. "ApiKeyAuth": []
  5008. }
  5009. ],
  5010. "description": "Returns a list of all channel model error rates",
  5011. "produces": [
  5012. "application/json"
  5013. ],
  5014. "tags": [
  5015. "monitor"
  5016. ],
  5017. "summary": "Get all channel model error rates",
  5018. "responses": {
  5019. "200": {
  5020. "description": "OK",
  5021. "schema": {
  5022. "allOf": [
  5023. {
  5024. "$ref": "#/definitions/middleware.APIResponse"
  5025. },
  5026. {
  5027. "type": "object",
  5028. "properties": {
  5029. "data": {
  5030. "type": "object",
  5031. "additionalProperties": {
  5032. "type": "object",
  5033. "additionalProperties": {
  5034. "type": "number"
  5035. }
  5036. }
  5037. }
  5038. }
  5039. }
  5040. ]
  5041. }
  5042. }
  5043. }
  5044. },
  5045. "delete": {
  5046. "security": [
  5047. {
  5048. "ApiKeyAuth": []
  5049. }
  5050. ],
  5051. "description": "Clears all model errors",
  5052. "produces": [
  5053. "application/json"
  5054. ],
  5055. "tags": [
  5056. "monitor"
  5057. ],
  5058. "summary": "Clear all model errors",
  5059. "responses": {
  5060. "200": {
  5061. "description": "OK",
  5062. "schema": {
  5063. "$ref": "#/definitions/middleware.APIResponse"
  5064. }
  5065. }
  5066. }
  5067. }
  5068. },
  5069. "/api/monitor/banned_channels": {
  5070. "get": {
  5071. "security": [
  5072. {
  5073. "ApiKeyAuth": []
  5074. }
  5075. ],
  5076. "description": "Returns a list of all banned model channels",
  5077. "produces": [
  5078. "application/json"
  5079. ],
  5080. "tags": [
  5081. "monitor"
  5082. ],
  5083. "summary": "Get all banned model channels",
  5084. "responses": {
  5085. "200": {
  5086. "description": "OK",
  5087. "schema": {
  5088. "allOf": [
  5089. {
  5090. "$ref": "#/definitions/middleware.APIResponse"
  5091. },
  5092. {
  5093. "type": "object",
  5094. "properties": {
  5095. "data": {
  5096. "type": "object",
  5097. "additionalProperties": {
  5098. "type": "array",
  5099. "items": {
  5100. "type": "integer"
  5101. }
  5102. }
  5103. }
  5104. }
  5105. }
  5106. ]
  5107. }
  5108. }
  5109. }
  5110. }
  5111. },
  5112. "/api/monitor/models": {
  5113. "get": {
  5114. "security": [
  5115. {
  5116. "ApiKeyAuth": []
  5117. }
  5118. ],
  5119. "description": "Returns a list of models error rate",
  5120. "produces": [
  5121. "application/json"
  5122. ],
  5123. "tags": [
  5124. "monitor"
  5125. ],
  5126. "summary": "Get models error rate",
  5127. "responses": {
  5128. "200": {
  5129. "description": "OK",
  5130. "schema": {
  5131. "allOf": [
  5132. {
  5133. "$ref": "#/definitions/middleware.APIResponse"
  5134. },
  5135. {
  5136. "type": "object",
  5137. "properties": {
  5138. "data": {
  5139. "type": "object",
  5140. "additionalProperties": {
  5141. "type": "number"
  5142. }
  5143. }
  5144. }
  5145. }
  5146. ]
  5147. }
  5148. }
  5149. }
  5150. }
  5151. },
  5152. "/api/monitor/{id}": {
  5153. "get": {
  5154. "security": [
  5155. {
  5156. "ApiKeyAuth": []
  5157. }
  5158. ],
  5159. "description": "Returns a list of channel model error rates",
  5160. "produces": [
  5161. "application/json"
  5162. ],
  5163. "tags": [
  5164. "monitor"
  5165. ],
  5166. "summary": "Get channel model error rates",
  5167. "parameters": [
  5168. {
  5169. "type": "integer",
  5170. "description": "Channel ID",
  5171. "name": "id",
  5172. "in": "path",
  5173. "required": true
  5174. }
  5175. ],
  5176. "responses": {
  5177. "200": {
  5178. "description": "OK",
  5179. "schema": {
  5180. "allOf": [
  5181. {
  5182. "$ref": "#/definitions/middleware.APIResponse"
  5183. },
  5184. {
  5185. "type": "object",
  5186. "properties": {
  5187. "data": {
  5188. "type": "array",
  5189. "items": {
  5190. "type": "object",
  5191. "additionalProperties": {
  5192. "type": "number"
  5193. }
  5194. }
  5195. }
  5196. }
  5197. }
  5198. ]
  5199. }
  5200. }
  5201. }
  5202. },
  5203. "delete": {
  5204. "security": [
  5205. {
  5206. "ApiKeyAuth": []
  5207. }
  5208. ],
  5209. "description": "Clears all model errors for a specific channel",
  5210. "produces": [
  5211. "application/json"
  5212. ],
  5213. "tags": [
  5214. "monitor"
  5215. ],
  5216. "summary": "Clear channel all model errors",
  5217. "parameters": [
  5218. {
  5219. "type": "integer",
  5220. "description": "Channel ID",
  5221. "name": "id",
  5222. "in": "path",
  5223. "required": true
  5224. }
  5225. ],
  5226. "responses": {
  5227. "200": {
  5228. "description": "OK",
  5229. "schema": {
  5230. "$ref": "#/definitions/middleware.APIResponse"
  5231. }
  5232. }
  5233. }
  5234. }
  5235. },
  5236. "/api/monitor/{id}/{model}": {
  5237. "delete": {
  5238. "security": [
  5239. {
  5240. "ApiKeyAuth": []
  5241. }
  5242. ],
  5243. "description": "Clears model errors for a specific channel and model",
  5244. "produces": [
  5245. "application/json"
  5246. ],
  5247. "tags": [
  5248. "monitor"
  5249. ],
  5250. "summary": "Clear channel model errors",
  5251. "parameters": [
  5252. {
  5253. "type": "integer",
  5254. "description": "Channel ID",
  5255. "name": "id",
  5256. "in": "path",
  5257. "required": true
  5258. },
  5259. {
  5260. "type": "string",
  5261. "description": "Model name",
  5262. "name": "model",
  5263. "in": "path",
  5264. "required": true
  5265. }
  5266. ],
  5267. "responses": {
  5268. "200": {
  5269. "description": "OK",
  5270. "schema": {
  5271. "$ref": "#/definitions/middleware.APIResponse"
  5272. }
  5273. }
  5274. }
  5275. }
  5276. },
  5277. "/api/option/": {
  5278. "get": {
  5279. "security": [
  5280. {
  5281. "ApiKeyAuth": []
  5282. }
  5283. ],
  5284. "description": "Returns a list of options",
  5285. "produces": [
  5286. "application/json"
  5287. ],
  5288. "tags": [
  5289. "option"
  5290. ],
  5291. "summary": "Get options",
  5292. "responses": {
  5293. "200": {
  5294. "description": "OK",
  5295. "schema": {
  5296. "allOf": [
  5297. {
  5298. "$ref": "#/definitions/middleware.APIResponse"
  5299. },
  5300. {
  5301. "type": "object",
  5302. "properties": {
  5303. "data": {
  5304. "type": "object",
  5305. "additionalProperties": {
  5306. "type": "string"
  5307. }
  5308. }
  5309. }
  5310. }
  5311. ]
  5312. }
  5313. }
  5314. }
  5315. },
  5316. "put": {
  5317. "security": [
  5318. {
  5319. "ApiKeyAuth": []
  5320. }
  5321. ],
  5322. "description": "Updates a single option",
  5323. "produces": [
  5324. "application/json"
  5325. ],
  5326. "tags": [
  5327. "option"
  5328. ],
  5329. "summary": "Update option",
  5330. "parameters": [
  5331. {
  5332. "description": "Option value",
  5333. "name": "value",
  5334. "in": "body",
  5335. "required": true,
  5336. "schema": {
  5337. "$ref": "#/definitions/model.Option"
  5338. }
  5339. }
  5340. ],
  5341. "responses": {
  5342. "200": {
  5343. "description": "OK",
  5344. "schema": {
  5345. "$ref": "#/definitions/middleware.APIResponse"
  5346. }
  5347. }
  5348. }
  5349. },
  5350. "post": {
  5351. "security": [
  5352. {
  5353. "ApiKeyAuth": []
  5354. }
  5355. ],
  5356. "description": "Updates a single option",
  5357. "produces": [
  5358. "application/json"
  5359. ],
  5360. "tags": [
  5361. "option"
  5362. ],
  5363. "summary": "Update option",
  5364. "parameters": [
  5365. {
  5366. "description": "Option value",
  5367. "name": "value",
  5368. "in": "body",
  5369. "required": true,
  5370. "schema": {
  5371. "$ref": "#/definitions/model.Option"
  5372. }
  5373. }
  5374. ],
  5375. "responses": {
  5376. "200": {
  5377. "description": "OK",
  5378. "schema": {
  5379. "$ref": "#/definitions/middleware.APIResponse"
  5380. }
  5381. }
  5382. }
  5383. }
  5384. },
  5385. "/api/option/batch": {
  5386. "post": {
  5387. "security": [
  5388. {
  5389. "ApiKeyAuth": []
  5390. }
  5391. ],
  5392. "description": "Updates multiple options",
  5393. "produces": [
  5394. "application/json"
  5395. ],
  5396. "tags": [
  5397. "option"
  5398. ],
  5399. "summary": "Update options",
  5400. "parameters": [
  5401. {
  5402. "description": "Options",
  5403. "name": "options",
  5404. "in": "body",
  5405. "required": true,
  5406. "schema": {
  5407. "type": "object",
  5408. "additionalProperties": {
  5409. "type": "string"
  5410. }
  5411. }
  5412. }
  5413. ],
  5414. "responses": {
  5415. "200": {
  5416. "description": "OK",
  5417. "schema": {
  5418. "$ref": "#/definitions/middleware.APIResponse"
  5419. }
  5420. }
  5421. }
  5422. }
  5423. },
  5424. "/api/option/{key}": {
  5425. "get": {
  5426. "security": [
  5427. {
  5428. "ApiKeyAuth": []
  5429. }
  5430. ],
  5431. "description": "Returns a single option",
  5432. "produces": [
  5433. "application/json"
  5434. ],
  5435. "tags": [
  5436. "option"
  5437. ],
  5438. "summary": "Get option",
  5439. "parameters": [
  5440. {
  5441. "type": "string",
  5442. "description": "Option key",
  5443. "name": "key",
  5444. "in": "path",
  5445. "required": true
  5446. }
  5447. ],
  5448. "responses": {
  5449. "200": {
  5450. "description": "OK",
  5451. "schema": {
  5452. "allOf": [
  5453. {
  5454. "$ref": "#/definitions/middleware.APIResponse"
  5455. },
  5456. {
  5457. "type": "object",
  5458. "properties": {
  5459. "data": {
  5460. "$ref": "#/definitions/model.Option"
  5461. }
  5462. }
  5463. }
  5464. ]
  5465. }
  5466. }
  5467. }
  5468. },
  5469. "put": {
  5470. "security": [
  5471. {
  5472. "ApiKeyAuth": []
  5473. }
  5474. ],
  5475. "description": "Updates a single option by key",
  5476. "produces": [
  5477. "application/json"
  5478. ],
  5479. "tags": [
  5480. "option"
  5481. ],
  5482. "summary": "Update option by key",
  5483. "parameters": [
  5484. {
  5485. "type": "string",
  5486. "description": "Option key",
  5487. "name": "key",
  5488. "in": "path",
  5489. "required": true
  5490. },
  5491. {
  5492. "description": "Option value",
  5493. "name": "value",
  5494. "in": "body",
  5495. "required": true,
  5496. "schema": {
  5497. "type": "string"
  5498. }
  5499. }
  5500. ],
  5501. "responses": {
  5502. "200": {
  5503. "description": "OK",
  5504. "schema": {
  5505. "$ref": "#/definitions/middleware.APIResponse"
  5506. }
  5507. }
  5508. }
  5509. }
  5510. },
  5511. "/api/status": {
  5512. "get": {
  5513. "description": "Returns the status of the server",
  5514. "produces": [
  5515. "application/json"
  5516. ],
  5517. "tags": [
  5518. "misc"
  5519. ],
  5520. "summary": "Get status",
  5521. "responses": {
  5522. "200": {
  5523. "description": "OK",
  5524. "schema": {
  5525. "allOf": [
  5526. {
  5527. "$ref": "#/definitions/middleware.APIResponse"
  5528. },
  5529. {
  5530. "type": "object",
  5531. "properties": {
  5532. "data": {
  5533. "$ref": "#/definitions/controller.StatusData"
  5534. }
  5535. }
  5536. }
  5537. ]
  5538. }
  5539. }
  5540. }
  5541. }
  5542. },
  5543. "/api/token/{group}": {
  5544. "post": {
  5545. "security": [
  5546. {
  5547. "ApiKeyAuth": []
  5548. }
  5549. ],
  5550. "description": "Adds a new token to a specific group",
  5551. "consumes": [
  5552. "application/json"
  5553. ],
  5554. "produces": [
  5555. "application/json"
  5556. ],
  5557. "tags": [
  5558. "token"
  5559. ],
  5560. "summary": "Add group token",
  5561. "parameters": [
  5562. {
  5563. "type": "string",
  5564. "description": "Group name",
  5565. "name": "group",
  5566. "in": "path",
  5567. "required": true
  5568. },
  5569. {
  5570. "type": "boolean",
  5571. "description": "Auto create group",
  5572. "name": "auto_create_group",
  5573. "in": "query"
  5574. },
  5575. {
  5576. "type": "boolean",
  5577. "description": "Ignore exist",
  5578. "name": "ignore_exist",
  5579. "in": "query"
  5580. },
  5581. {
  5582. "description": "Token information",
  5583. "name": "token",
  5584. "in": "body",
  5585. "required": true,
  5586. "schema": {
  5587. "$ref": "#/definitions/controller.AddTokenRequest"
  5588. }
  5589. }
  5590. ],
  5591. "responses": {
  5592. "200": {
  5593. "description": "OK",
  5594. "schema": {
  5595. "allOf": [
  5596. {
  5597. "$ref": "#/definitions/middleware.APIResponse"
  5598. },
  5599. {
  5600. "type": "object",
  5601. "properties": {
  5602. "data": {
  5603. "$ref": "#/definitions/controller.TokenResponse"
  5604. }
  5605. }
  5606. }
  5607. ]
  5608. }
  5609. }
  5610. }
  5611. }
  5612. },
  5613. "/api/token/{group}/batch_delete": {
  5614. "post": {
  5615. "security": [
  5616. {
  5617. "ApiKeyAuth": []
  5618. }
  5619. ],
  5620. "description": "Deletes multiple tokens from a specific group",
  5621. "produces": [
  5622. "application/json"
  5623. ],
  5624. "tags": [
  5625. "token"
  5626. ],
  5627. "summary": "Delete group tokens",
  5628. "parameters": [
  5629. {
  5630. "type": "string",
  5631. "description": "Group name",
  5632. "name": "group",
  5633. "in": "path",
  5634. "required": true
  5635. },
  5636. {
  5637. "description": "Token IDs",
  5638. "name": "ids",
  5639. "in": "body",
  5640. "required": true,
  5641. "schema": {
  5642. "type": "array",
  5643. "items": {
  5644. "type": "integer"
  5645. }
  5646. }
  5647. }
  5648. ],
  5649. "responses": {
  5650. "200": {
  5651. "description": "OK",
  5652. "schema": {
  5653. "$ref": "#/definitions/middleware.APIResponse"
  5654. }
  5655. }
  5656. }
  5657. }
  5658. },
  5659. "/api/token/{group}/search": {
  5660. "get": {
  5661. "security": [
  5662. {
  5663. "ApiKeyAuth": []
  5664. }
  5665. ],
  5666. "description": "Returns a paginated list of tokens for a specific group based on search criteria",
  5667. "produces": [
  5668. "application/json"
  5669. ],
  5670. "tags": [
  5671. "token"
  5672. ],
  5673. "summary": "Search tokens for a specific group",
  5674. "parameters": [
  5675. {
  5676. "type": "string",
  5677. "description": "Group name",
  5678. "name": "group",
  5679. "in": "path",
  5680. "required": true
  5681. },
  5682. {
  5683. "type": "string",
  5684. "description": "Keyword",
  5685. "name": "keyword",
  5686. "in": "query"
  5687. },
  5688. {
  5689. "type": "integer",
  5690. "description": "Page number",
  5691. "name": "page",
  5692. "in": "query"
  5693. },
  5694. {
  5695. "type": "integer",
  5696. "description": "Items per page",
  5697. "name": "per_page",
  5698. "in": "query"
  5699. },
  5700. {
  5701. "type": "string",
  5702. "description": "Order",
  5703. "name": "order",
  5704. "in": "query"
  5705. },
  5706. {
  5707. "type": "string",
  5708. "description": "Name",
  5709. "name": "name",
  5710. "in": "query"
  5711. },
  5712. {
  5713. "type": "string",
  5714. "description": "Key",
  5715. "name": "key",
  5716. "in": "query"
  5717. },
  5718. {
  5719. "type": "integer",
  5720. "description": "Status",
  5721. "name": "status",
  5722. "in": "query"
  5723. }
  5724. ],
  5725. "responses": {
  5726. "200": {
  5727. "description": "OK",
  5728. "schema": {
  5729. "allOf": [
  5730. {
  5731. "$ref": "#/definitions/middleware.APIResponse"
  5732. },
  5733. {
  5734. "type": "object",
  5735. "properties": {
  5736. "data": {
  5737. "type": "object",
  5738. "additionalProperties": {
  5739. "allOf": [
  5740. {},
  5741. {
  5742. "type": "object",
  5743. "properties": {
  5744. "tokens": {
  5745. "type": "array",
  5746. "items": {
  5747. "$ref": "#/definitions/controller.TokenResponse"
  5748. }
  5749. },
  5750. "total": {
  5751. "type": "integer"
  5752. }
  5753. }
  5754. }
  5755. ]
  5756. }
  5757. }
  5758. }
  5759. }
  5760. ]
  5761. }
  5762. }
  5763. }
  5764. }
  5765. },
  5766. "/api/token/{group}/{id}": {
  5767. "get": {
  5768. "security": [
  5769. {
  5770. "ApiKeyAuth": []
  5771. }
  5772. ],
  5773. "description": "Returns detailed information about a specific token for a specific group",
  5774. "produces": [
  5775. "application/json"
  5776. ],
  5777. "tags": [
  5778. "token"
  5779. ],
  5780. "summary": "Get token by ID for a specific group",
  5781. "parameters": [
  5782. {
  5783. "type": "string",
  5784. "description": "Group name",
  5785. "name": "group",
  5786. "in": "path",
  5787. "required": true
  5788. },
  5789. {
  5790. "type": "integer",
  5791. "description": "Token ID",
  5792. "name": "id",
  5793. "in": "path",
  5794. "required": true
  5795. }
  5796. ],
  5797. "responses": {
  5798. "200": {
  5799. "description": "OK",
  5800. "schema": {
  5801. "allOf": [
  5802. {
  5803. "$ref": "#/definitions/middleware.APIResponse"
  5804. },
  5805. {
  5806. "type": "object",
  5807. "properties": {
  5808. "data": {
  5809. "$ref": "#/definitions/controller.TokenResponse"
  5810. }
  5811. }
  5812. }
  5813. ]
  5814. }
  5815. }
  5816. }
  5817. },
  5818. "put": {
  5819. "security": [
  5820. {
  5821. "ApiKeyAuth": []
  5822. }
  5823. ],
  5824. "description": "Updates an existing token in a specific group",
  5825. "consumes": [
  5826. "application/json"
  5827. ],
  5828. "produces": [
  5829. "application/json"
  5830. ],
  5831. "tags": [
  5832. "token"
  5833. ],
  5834. "summary": "Update group token",
  5835. "parameters": [
  5836. {
  5837. "type": "string",
  5838. "description": "Group name",
  5839. "name": "group",
  5840. "in": "path",
  5841. "required": true
  5842. },
  5843. {
  5844. "type": "integer",
  5845. "description": "Token ID",
  5846. "name": "id",
  5847. "in": "path",
  5848. "required": true
  5849. },
  5850. {
  5851. "description": "Updated token information",
  5852. "name": "token",
  5853. "in": "body",
  5854. "required": true,
  5855. "schema": {
  5856. "$ref": "#/definitions/controller.AddTokenRequest"
  5857. }
  5858. }
  5859. ],
  5860. "responses": {
  5861. "200": {
  5862. "description": "OK",
  5863. "schema": {
  5864. "allOf": [
  5865. {
  5866. "$ref": "#/definitions/middleware.APIResponse"
  5867. },
  5868. {
  5869. "type": "object",
  5870. "properties": {
  5871. "data": {
  5872. "$ref": "#/definitions/controller.TokenResponse"
  5873. }
  5874. }
  5875. }
  5876. ]
  5877. }
  5878. }
  5879. }
  5880. },
  5881. "delete": {
  5882. "security": [
  5883. {
  5884. "ApiKeyAuth": []
  5885. }
  5886. ],
  5887. "description": "Deletes a specific token from a group",
  5888. "produces": [
  5889. "application/json"
  5890. ],
  5891. "tags": [
  5892. "token"
  5893. ],
  5894. "summary": "Delete group token",
  5895. "parameters": [
  5896. {
  5897. "type": "string",
  5898. "description": "Group name",
  5899. "name": "group",
  5900. "in": "path",
  5901. "required": true
  5902. },
  5903. {
  5904. "type": "integer",
  5905. "description": "Token ID",
  5906. "name": "id",
  5907. "in": "path",
  5908. "required": true
  5909. }
  5910. ],
  5911. "responses": {
  5912. "200": {
  5913. "description": "OK",
  5914. "schema": {
  5915. "$ref": "#/definitions/middleware.APIResponse"
  5916. }
  5917. }
  5918. }
  5919. }
  5920. },
  5921. "/api/token/{group}/{id}/name": {
  5922. "post": {
  5923. "security": [
  5924. {
  5925. "ApiKeyAuth": []
  5926. }
  5927. ],
  5928. "description": "Updates the name of a token in a specific group",
  5929. "consumes": [
  5930. "application/json"
  5931. ],
  5932. "produces": [
  5933. "application/json"
  5934. ],
  5935. "tags": [
  5936. "token"
  5937. ],
  5938. "summary": "Update group token name",
  5939. "parameters": [
  5940. {
  5941. "type": "string",
  5942. "description": "Group name",
  5943. "name": "group",
  5944. "in": "path",
  5945. "required": true
  5946. },
  5947. {
  5948. "type": "integer",
  5949. "description": "Token ID",
  5950. "name": "id",
  5951. "in": "path",
  5952. "required": true
  5953. },
  5954. {
  5955. "description": "Name information",
  5956. "name": "name",
  5957. "in": "body",
  5958. "required": true,
  5959. "schema": {
  5960. "$ref": "#/definitions/controller.UpdateTokenNameRequest"
  5961. }
  5962. }
  5963. ],
  5964. "responses": {
  5965. "200": {
  5966. "description": "OK",
  5967. "schema": {
  5968. "$ref": "#/definitions/middleware.APIResponse"
  5969. }
  5970. }
  5971. }
  5972. }
  5973. },
  5974. "/api/token/{group}/{id}/status": {
  5975. "post": {
  5976. "security": [
  5977. {
  5978. "ApiKeyAuth": []
  5979. }
  5980. ],
  5981. "description": "Updates the status of a token in a specific group",
  5982. "consumes": [
  5983. "application/json"
  5984. ],
  5985. "produces": [
  5986. "application/json"
  5987. ],
  5988. "tags": [
  5989. "token"
  5990. ],
  5991. "summary": "Update group token status",
  5992. "parameters": [
  5993. {
  5994. "type": "string",
  5995. "description": "Group name",
  5996. "name": "group",
  5997. "in": "path",
  5998. "required": true
  5999. },
  6000. {
  6001. "type": "integer",
  6002. "description": "Token ID",
  6003. "name": "id",
  6004. "in": "path",
  6005. "required": true
  6006. },
  6007. {
  6008. "description": "Status information",
  6009. "name": "status",
  6010. "in": "body",
  6011. "required": true,
  6012. "schema": {
  6013. "$ref": "#/definitions/controller.UpdateTokenStatusRequest"
  6014. }
  6015. }
  6016. ],
  6017. "responses": {
  6018. "200": {
  6019. "description": "OK",
  6020. "schema": {
  6021. "$ref": "#/definitions/middleware.APIResponse"
  6022. }
  6023. }
  6024. }
  6025. }
  6026. },
  6027. "/api/tokens/": {
  6028. "get": {
  6029. "security": [
  6030. {
  6031. "ApiKeyAuth": []
  6032. }
  6033. ],
  6034. "description": "Returns a paginated list of all tokens",
  6035. "produces": [
  6036. "application/json"
  6037. ],
  6038. "tags": [
  6039. "tokens"
  6040. ],
  6041. "summary": "Get all tokens",
  6042. "parameters": [
  6043. {
  6044. "type": "integer",
  6045. "description": "Page number",
  6046. "name": "page",
  6047. "in": "query"
  6048. },
  6049. {
  6050. "type": "integer",
  6051. "description": "Items per page",
  6052. "name": "per_page",
  6053. "in": "query"
  6054. },
  6055. {
  6056. "type": "string",
  6057. "description": "Group name",
  6058. "name": "group",
  6059. "in": "query"
  6060. },
  6061. {
  6062. "type": "string",
  6063. "description": "Order",
  6064. "name": "order",
  6065. "in": "query"
  6066. },
  6067. {
  6068. "type": "integer",
  6069. "description": "Status",
  6070. "name": "status",
  6071. "in": "query"
  6072. }
  6073. ],
  6074. "responses": {
  6075. "200": {
  6076. "description": "OK",
  6077. "schema": {
  6078. "allOf": [
  6079. {
  6080. "$ref": "#/definitions/middleware.APIResponse"
  6081. },
  6082. {
  6083. "type": "object",
  6084. "properties": {
  6085. "data": {
  6086. "type": "object",
  6087. "additionalProperties": {
  6088. "allOf": [
  6089. {},
  6090. {
  6091. "type": "object",
  6092. "properties": {
  6093. "tokens": {
  6094. "type": "array",
  6095. "items": {
  6096. "$ref": "#/definitions/controller.TokenResponse"
  6097. }
  6098. },
  6099. "total": {
  6100. "type": "integer"
  6101. }
  6102. }
  6103. }
  6104. ]
  6105. }
  6106. }
  6107. }
  6108. }
  6109. ]
  6110. }
  6111. }
  6112. }
  6113. }
  6114. },
  6115. "/api/tokens/batch_delete": {
  6116. "post": {
  6117. "security": [
  6118. {
  6119. "ApiKeyAuth": []
  6120. }
  6121. ],
  6122. "description": "Deletes multiple tokens by their IDs",
  6123. "consumes": [
  6124. "application/json"
  6125. ],
  6126. "produces": [
  6127. "application/json"
  6128. ],
  6129. "tags": [
  6130. "tokens"
  6131. ],
  6132. "summary": "Delete multiple tokens",
  6133. "parameters": [
  6134. {
  6135. "description": "Token IDs",
  6136. "name": "ids",
  6137. "in": "body",
  6138. "required": true,
  6139. "schema": {
  6140. "type": "array",
  6141. "items": {
  6142. "type": "integer"
  6143. }
  6144. }
  6145. }
  6146. ],
  6147. "responses": {
  6148. "200": {
  6149. "description": "OK",
  6150. "schema": {
  6151. "$ref": "#/definitions/middleware.APIResponse"
  6152. }
  6153. }
  6154. }
  6155. }
  6156. },
  6157. "/api/tokens/search": {
  6158. "get": {
  6159. "security": [
  6160. {
  6161. "ApiKeyAuth": []
  6162. }
  6163. ],
  6164. "description": "Returns a paginated list of tokens based on search criteria",
  6165. "produces": [
  6166. "application/json"
  6167. ],
  6168. "tags": [
  6169. "tokens"
  6170. ],
  6171. "summary": "Search tokens",
  6172. "parameters": [
  6173. {
  6174. "type": "string",
  6175. "description": "Keyword",
  6176. "name": "keyword",
  6177. "in": "query"
  6178. },
  6179. {
  6180. "type": "integer",
  6181. "description": "Page number",
  6182. "name": "page",
  6183. "in": "query"
  6184. },
  6185. {
  6186. "type": "integer",
  6187. "description": "Items per page",
  6188. "name": "per_page",
  6189. "in": "query"
  6190. },
  6191. {
  6192. "type": "string",
  6193. "description": "Order",
  6194. "name": "order",
  6195. "in": "query"
  6196. },
  6197. {
  6198. "type": "string",
  6199. "description": "Name",
  6200. "name": "name",
  6201. "in": "query"
  6202. },
  6203. {
  6204. "type": "string",
  6205. "description": "Key",
  6206. "name": "key",
  6207. "in": "query"
  6208. },
  6209. {
  6210. "type": "integer",
  6211. "description": "Status",
  6212. "name": "status",
  6213. "in": "query"
  6214. },
  6215. {
  6216. "type": "string",
  6217. "description": "Group",
  6218. "name": "group",
  6219. "in": "query"
  6220. }
  6221. ],
  6222. "responses": {
  6223. "200": {
  6224. "description": "OK",
  6225. "schema": {
  6226. "allOf": [
  6227. {
  6228. "$ref": "#/definitions/middleware.APIResponse"
  6229. },
  6230. {
  6231. "type": "object",
  6232. "properties": {
  6233. "data": {
  6234. "type": "object",
  6235. "additionalProperties": {
  6236. "allOf": [
  6237. {},
  6238. {
  6239. "type": "object",
  6240. "properties": {
  6241. "tokens": {
  6242. "type": "array",
  6243. "items": {
  6244. "$ref": "#/definitions/controller.TokenResponse"
  6245. }
  6246. },
  6247. "total": {
  6248. "type": "integer"
  6249. }
  6250. }
  6251. }
  6252. ]
  6253. }
  6254. }
  6255. }
  6256. }
  6257. ]
  6258. }
  6259. }
  6260. }
  6261. }
  6262. },
  6263. "/api/tokens/{group}": {
  6264. "get": {
  6265. "security": [
  6266. {
  6267. "ApiKeyAuth": []
  6268. }
  6269. ],
  6270. "description": "Returns a paginated list of all tokens for a specific group",
  6271. "produces": [
  6272. "application/json"
  6273. ],
  6274. "tags": [
  6275. "tokens"
  6276. ],
  6277. "summary": "Get all tokens for a specific group",
  6278. "parameters": [
  6279. {
  6280. "type": "string",
  6281. "description": "Group name",
  6282. "name": "group",
  6283. "in": "path",
  6284. "required": true
  6285. },
  6286. {
  6287. "type": "integer",
  6288. "description": "Page number",
  6289. "name": "page",
  6290. "in": "query"
  6291. },
  6292. {
  6293. "type": "integer",
  6294. "description": "Items per page",
  6295. "name": "per_page",
  6296. "in": "query"
  6297. },
  6298. {
  6299. "type": "string",
  6300. "description": "Order",
  6301. "name": "order",
  6302. "in": "query"
  6303. },
  6304. {
  6305. "type": "integer",
  6306. "description": "Status",
  6307. "name": "status",
  6308. "in": "query"
  6309. }
  6310. ],
  6311. "responses": {
  6312. "200": {
  6313. "description": "OK",
  6314. "schema": {
  6315. "allOf": [
  6316. {
  6317. "$ref": "#/definitions/middleware.APIResponse"
  6318. },
  6319. {
  6320. "type": "object",
  6321. "properties": {
  6322. "data": {
  6323. "type": "object",
  6324. "additionalProperties": {
  6325. "allOf": [
  6326. {},
  6327. {
  6328. "type": "object",
  6329. "properties": {
  6330. "tokens": {
  6331. "type": "array",
  6332. "items": {
  6333. "$ref": "#/definitions/controller.TokenResponse"
  6334. }
  6335. },
  6336. "total": {
  6337. "type": "integer"
  6338. }
  6339. }
  6340. }
  6341. ]
  6342. }
  6343. }
  6344. }
  6345. }
  6346. ]
  6347. }
  6348. }
  6349. }
  6350. }
  6351. },
  6352. "/api/tokens/{id}": {
  6353. "get": {
  6354. "security": [
  6355. {
  6356. "ApiKeyAuth": []
  6357. }
  6358. ],
  6359. "description": "Returns detailed information about a specific token",
  6360. "produces": [
  6361. "application/json"
  6362. ],
  6363. "tags": [
  6364. "tokens"
  6365. ],
  6366. "summary": "Get token by ID",
  6367. "parameters": [
  6368. {
  6369. "type": "integer",
  6370. "description": "Token ID",
  6371. "name": "id",
  6372. "in": "path",
  6373. "required": true
  6374. }
  6375. ],
  6376. "responses": {
  6377. "200": {
  6378. "description": "OK",
  6379. "schema": {
  6380. "allOf": [
  6381. {
  6382. "$ref": "#/definitions/middleware.APIResponse"
  6383. },
  6384. {
  6385. "type": "object",
  6386. "properties": {
  6387. "data": {
  6388. "$ref": "#/definitions/controller.TokenResponse"
  6389. }
  6390. }
  6391. }
  6392. ]
  6393. }
  6394. }
  6395. }
  6396. },
  6397. "put": {
  6398. "security": [
  6399. {
  6400. "ApiKeyAuth": []
  6401. }
  6402. ],
  6403. "description": "Updates an existing token's information",
  6404. "consumes": [
  6405. "application/json"
  6406. ],
  6407. "produces": [
  6408. "application/json"
  6409. ],
  6410. "tags": [
  6411. "tokens"
  6412. ],
  6413. "summary": "Update token",
  6414. "parameters": [
  6415. {
  6416. "type": "integer",
  6417. "description": "Token ID",
  6418. "name": "id",
  6419. "in": "path",
  6420. "required": true
  6421. },
  6422. {
  6423. "description": "Updated token information",
  6424. "name": "token",
  6425. "in": "body",
  6426. "required": true,
  6427. "schema": {
  6428. "$ref": "#/definitions/controller.AddTokenRequest"
  6429. }
  6430. }
  6431. ],
  6432. "responses": {
  6433. "200": {
  6434. "description": "OK",
  6435. "schema": {
  6436. "allOf": [
  6437. {
  6438. "$ref": "#/definitions/middleware.APIResponse"
  6439. },
  6440. {
  6441. "type": "object",
  6442. "properties": {
  6443. "data": {
  6444. "$ref": "#/definitions/controller.TokenResponse"
  6445. }
  6446. }
  6447. }
  6448. ]
  6449. }
  6450. }
  6451. }
  6452. },
  6453. "delete": {
  6454. "security": [
  6455. {
  6456. "ApiKeyAuth": []
  6457. }
  6458. ],
  6459. "description": "Deletes a specific token by ID",
  6460. "produces": [
  6461. "application/json"
  6462. ],
  6463. "tags": [
  6464. "tokens"
  6465. ],
  6466. "summary": "Delete token",
  6467. "parameters": [
  6468. {
  6469. "type": "integer",
  6470. "description": "Token ID",
  6471. "name": "id",
  6472. "in": "path",
  6473. "required": true
  6474. }
  6475. ],
  6476. "responses": {
  6477. "200": {
  6478. "description": "OK",
  6479. "schema": {
  6480. "$ref": "#/definitions/middleware.APIResponse"
  6481. }
  6482. }
  6483. }
  6484. }
  6485. },
  6486. "/api/tokens/{id}/name": {
  6487. "post": {
  6488. "security": [
  6489. {
  6490. "ApiKeyAuth": []
  6491. }
  6492. ],
  6493. "description": "Updates the name of a specific token",
  6494. "consumes": [
  6495. "application/json"
  6496. ],
  6497. "produces": [
  6498. "application/json"
  6499. ],
  6500. "tags": [
  6501. "tokens"
  6502. ],
  6503. "summary": "Update token name",
  6504. "parameters": [
  6505. {
  6506. "type": "integer",
  6507. "description": "Token ID",
  6508. "name": "id",
  6509. "in": "path",
  6510. "required": true
  6511. },
  6512. {
  6513. "description": "Name information",
  6514. "name": "name",
  6515. "in": "body",
  6516. "required": true,
  6517. "schema": {
  6518. "$ref": "#/definitions/controller.UpdateTokenNameRequest"
  6519. }
  6520. }
  6521. ],
  6522. "responses": {
  6523. "200": {
  6524. "description": "OK",
  6525. "schema": {
  6526. "$ref": "#/definitions/middleware.APIResponse"
  6527. }
  6528. }
  6529. }
  6530. }
  6531. },
  6532. "/api/tokens/{id}/status": {
  6533. "post": {
  6534. "security": [
  6535. {
  6536. "ApiKeyAuth": []
  6537. }
  6538. ],
  6539. "description": "Updates the status of a specific token",
  6540. "consumes": [
  6541. "application/json"
  6542. ],
  6543. "produces": [
  6544. "application/json"
  6545. ],
  6546. "tags": [
  6547. "tokens"
  6548. ],
  6549. "summary": "Update token status",
  6550. "parameters": [
  6551. {
  6552. "type": "integer",
  6553. "description": "Token ID",
  6554. "name": "id",
  6555. "in": "path",
  6556. "required": true
  6557. },
  6558. {
  6559. "description": "Status information",
  6560. "name": "status",
  6561. "in": "body",
  6562. "required": true,
  6563. "schema": {
  6564. "$ref": "#/definitions/controller.UpdateTokenStatusRequest"
  6565. }
  6566. }
  6567. ],
  6568. "responses": {
  6569. "200": {
  6570. "description": "OK",
  6571. "schema": {
  6572. "$ref": "#/definitions/middleware.APIResponse"
  6573. }
  6574. }
  6575. }
  6576. }
  6577. },
  6578. "/mcp/group/message": {
  6579. "post": {
  6580. "security": [
  6581. {
  6582. "ApiKeyAuth": []
  6583. }
  6584. ],
  6585. "summary": "MCP SSE Proxy",
  6586. "responses": {}
  6587. }
  6588. },
  6589. "/mcp/group/{id}/sse": {
  6590. "get": {
  6591. "security": [
  6592. {
  6593. "ApiKeyAuth": []
  6594. }
  6595. ],
  6596. "summary": "Group MCP SSE Server",
  6597. "responses": {}
  6598. }
  6599. },
  6600. "/mcp/group/{id}/streamable": {
  6601. "get": {
  6602. "security": [
  6603. {
  6604. "ApiKeyAuth": []
  6605. }
  6606. ],
  6607. "summary": "Group MCP Streamable Server",
  6608. "responses": {}
  6609. },
  6610. "post": {
  6611. "security": [
  6612. {
  6613. "ApiKeyAuth": []
  6614. }
  6615. ],
  6616. "summary": "Group MCP Streamable Server",
  6617. "responses": {}
  6618. },
  6619. "delete": {
  6620. "security": [
  6621. {
  6622. "ApiKeyAuth": []
  6623. }
  6624. ],
  6625. "summary": "Group MCP Streamable Server",
  6626. "responses": {}
  6627. }
  6628. },
  6629. "/mcp/public/message": {
  6630. "post": {
  6631. "security": [
  6632. {
  6633. "ApiKeyAuth": []
  6634. }
  6635. ],
  6636. "summary": "Public MCP SSE Server",
  6637. "responses": {}
  6638. }
  6639. },
  6640. "/mcp/public/{id}/sse": {
  6641. "get": {
  6642. "security": [
  6643. {
  6644. "ApiKeyAuth": []
  6645. }
  6646. ],
  6647. "summary": "Public MCP SSE Server",
  6648. "responses": {}
  6649. }
  6650. },
  6651. "/mcp/public/{id}/streamable": {
  6652. "get": {
  6653. "security": [
  6654. {
  6655. "ApiKeyAuth": []
  6656. }
  6657. ],
  6658. "summary": "Public MCP Streamable Server",
  6659. "responses": {}
  6660. },
  6661. "post": {
  6662. "security": [
  6663. {
  6664. "ApiKeyAuth": []
  6665. }
  6666. ],
  6667. "summary": "Public MCP Streamable Server",
  6668. "responses": {}
  6669. },
  6670. "delete": {
  6671. "security": [
  6672. {
  6673. "ApiKeyAuth": []
  6674. }
  6675. ],
  6676. "summary": "Public MCP Streamable Server",
  6677. "responses": {}
  6678. }
  6679. },
  6680. "/v1/audio/speech": {
  6681. "post": {
  6682. "security": [
  6683. {
  6684. "ApiKeyAuth": []
  6685. }
  6686. ],
  6687. "description": "AudioSpeech",
  6688. "produces": [
  6689. "application/json"
  6690. ],
  6691. "tags": [
  6692. "relay"
  6693. ],
  6694. "summary": "AudioSpeech",
  6695. "parameters": [
  6696. {
  6697. "description": "Request",
  6698. "name": "request",
  6699. "in": "body",
  6700. "required": true,
  6701. "schema": {
  6702. "$ref": "#/definitions/model.TextToSpeechRequest"
  6703. }
  6704. },
  6705. {
  6706. "type": "string",
  6707. "description": "Optional Aiproxy-Channel header",
  6708. "name": "Aiproxy-Channel",
  6709. "in": "header"
  6710. }
  6711. ],
  6712. "responses": {
  6713. "200": {
  6714. "description": "audio binary",
  6715. "schema": {
  6716. "type": "file"
  6717. },
  6718. "headers": {
  6719. "X-RateLimit-Limit-Requests": {
  6720. "type": "integer",
  6721. "description": "X-RateLimit-Limit-Requests"
  6722. },
  6723. "X-RateLimit-Limit-Tokens": {
  6724. "type": "integer",
  6725. "description": "X-RateLimit-Limit-Tokens"
  6726. },
  6727. "X-RateLimit-Remaining-Requests": {
  6728. "type": "integer",
  6729. "description": "X-RateLimit-Remaining-Requests"
  6730. },
  6731. "X-RateLimit-Remaining-Tokens": {
  6732. "type": "integer",
  6733. "description": "X-RateLimit-Remaining-Tokens"
  6734. },
  6735. "X-RateLimit-Reset-Requests": {
  6736. "type": "string",
  6737. "description": "X-RateLimit-Reset-Requests"
  6738. },
  6739. "X-RateLimit-Reset-Tokens": {
  6740. "type": "string",
  6741. "description": "X-RateLimit-Reset-Tokens"
  6742. }
  6743. }
  6744. }
  6745. }
  6746. }
  6747. },
  6748. "/v1/audio/transcriptions": {
  6749. "post": {
  6750. "security": [
  6751. {
  6752. "ApiKeyAuth": []
  6753. }
  6754. ],
  6755. "description": "AudioTranscription",
  6756. "produces": [
  6757. "application/json"
  6758. ],
  6759. "tags": [
  6760. "relay"
  6761. ],
  6762. "summary": "AudioTranscription",
  6763. "parameters": [
  6764. {
  6765. "type": "string",
  6766. "description": "Model",
  6767. "name": "model",
  6768. "in": "formData",
  6769. "required": true
  6770. },
  6771. {
  6772. "type": "file",
  6773. "description": "File",
  6774. "name": "file",
  6775. "in": "formData",
  6776. "required": true
  6777. },
  6778. {
  6779. "type": "string",
  6780. "description": "Optional Aiproxy-Channel header",
  6781. "name": "Aiproxy-Channel",
  6782. "in": "header"
  6783. }
  6784. ],
  6785. "responses": {
  6786. "200": {
  6787. "description": "OK",
  6788. "schema": {
  6789. "$ref": "#/definitions/model.SttJSONResponse"
  6790. },
  6791. "headers": {
  6792. "X-RateLimit-Limit-Requests": {
  6793. "type": "integer",
  6794. "description": "X-RateLimit-Limit-Requests"
  6795. },
  6796. "X-RateLimit-Limit-Tokens": {
  6797. "type": "integer",
  6798. "description": "X-RateLimit-Limit-Tokens"
  6799. },
  6800. "X-RateLimit-Remaining-Requests": {
  6801. "type": "integer",
  6802. "description": "X-RateLimit-Remaining-Requests"
  6803. },
  6804. "X-RateLimit-Remaining-Tokens": {
  6805. "type": "integer",
  6806. "description": "X-RateLimit-Remaining-Tokens"
  6807. },
  6808. "X-RateLimit-Reset-Requests": {
  6809. "type": "string",
  6810. "description": "X-RateLimit-Reset-Requests"
  6811. },
  6812. "X-RateLimit-Reset-Tokens": {
  6813. "type": "string",
  6814. "description": "X-RateLimit-Reset-Tokens"
  6815. }
  6816. }
  6817. }
  6818. }
  6819. }
  6820. },
  6821. "/v1/audio/translations": {
  6822. "post": {
  6823. "security": [
  6824. {
  6825. "ApiKeyAuth": []
  6826. }
  6827. ],
  6828. "description": "AudioTranslation",
  6829. "produces": [
  6830. "application/json"
  6831. ],
  6832. "tags": [
  6833. "relay"
  6834. ],
  6835. "summary": "AudioTranslation",
  6836. "parameters": [
  6837. {
  6838. "type": "string",
  6839. "description": "Model",
  6840. "name": "model",
  6841. "in": "formData",
  6842. "required": true
  6843. },
  6844. {
  6845. "type": "file",
  6846. "description": "File",
  6847. "name": "file",
  6848. "in": "formData",
  6849. "required": true
  6850. },
  6851. {
  6852. "type": "string",
  6853. "description": "Optional Aiproxy-Channel header",
  6854. "name": "Aiproxy-Channel",
  6855. "in": "header"
  6856. }
  6857. ],
  6858. "responses": {
  6859. "200": {
  6860. "description": "OK",
  6861. "schema": {
  6862. "$ref": "#/definitions/model.SttJSONResponse"
  6863. },
  6864. "headers": {
  6865. "X-RateLimit-Limit-Requests": {
  6866. "type": "integer",
  6867. "description": "X-RateLimit-Limit-Requests"
  6868. },
  6869. "X-RateLimit-Limit-Tokens": {
  6870. "type": "integer",
  6871. "description": "X-RateLimit-Limit-Tokens"
  6872. },
  6873. "X-RateLimit-Remaining-Requests": {
  6874. "type": "integer",
  6875. "description": "X-RateLimit-Remaining-Requests"
  6876. },
  6877. "X-RateLimit-Remaining-Tokens": {
  6878. "type": "integer",
  6879. "description": "X-RateLimit-Remaining-Tokens"
  6880. },
  6881. "X-RateLimit-Reset-Requests": {
  6882. "type": "string",
  6883. "description": "X-RateLimit-Reset-Requests"
  6884. },
  6885. "X-RateLimit-Reset-Tokens": {
  6886. "type": "string",
  6887. "description": "X-RateLimit-Reset-Tokens"
  6888. }
  6889. }
  6890. }
  6891. }
  6892. }
  6893. },
  6894. "/v1/chat/completions": {
  6895. "post": {
  6896. "security": [
  6897. {
  6898. "ApiKeyAuth": []
  6899. }
  6900. ],
  6901. "description": "ChatCompletions",
  6902. "produces": [
  6903. "application/json"
  6904. ],
  6905. "tags": [
  6906. "relay"
  6907. ],
  6908. "summary": "ChatCompletions",
  6909. "parameters": [
  6910. {
  6911. "description": "Request",
  6912. "name": "request",
  6913. "in": "body",
  6914. "required": true,
  6915. "schema": {
  6916. "$ref": "#/definitions/model.GeneralOpenAIRequest"
  6917. }
  6918. },
  6919. {
  6920. "type": "string",
  6921. "description": "Optional Aiproxy-Channel header",
  6922. "name": "Aiproxy-Channel",
  6923. "in": "header"
  6924. }
  6925. ],
  6926. "responses": {
  6927. "200": {
  6928. "description": "OK",
  6929. "schema": {
  6930. "$ref": "#/definitions/model.TextResponse"
  6931. },
  6932. "headers": {
  6933. "X-RateLimit-Limit-Requests": {
  6934. "type": "integer",
  6935. "description": "X-RateLimit-Limit-Requests"
  6936. },
  6937. "X-RateLimit-Limit-Tokens": {
  6938. "type": "integer",
  6939. "description": "X-RateLimit-Limit-Tokens"
  6940. },
  6941. "X-RateLimit-Remaining-Requests": {
  6942. "type": "integer",
  6943. "description": "X-RateLimit-Remaining-Requests"
  6944. },
  6945. "X-RateLimit-Remaining-Tokens": {
  6946. "type": "integer",
  6947. "description": "X-RateLimit-Remaining-Tokens"
  6948. },
  6949. "X-RateLimit-Reset-Requests": {
  6950. "type": "string",
  6951. "description": "X-RateLimit-Reset-Requests"
  6952. },
  6953. "X-RateLimit-Reset-Tokens": {
  6954. "type": "string",
  6955. "description": "X-RateLimit-Reset-Tokens"
  6956. }
  6957. }
  6958. }
  6959. }
  6960. }
  6961. },
  6962. "/v1/completions": {
  6963. "post": {
  6964. "security": [
  6965. {
  6966. "ApiKeyAuth": []
  6967. }
  6968. ],
  6969. "description": "Completions",
  6970. "produces": [
  6971. "application/json"
  6972. ],
  6973. "tags": [
  6974. "relay"
  6975. ],
  6976. "summary": "Completions",
  6977. "parameters": [
  6978. {
  6979. "description": "Request",
  6980. "name": "request",
  6981. "in": "body",
  6982. "required": true,
  6983. "schema": {
  6984. "$ref": "#/definitions/model.GeneralOpenAIRequest"
  6985. }
  6986. },
  6987. {
  6988. "type": "string",
  6989. "description": "Optional Aiproxy-Channel header",
  6990. "name": "Aiproxy-Channel",
  6991. "in": "header"
  6992. }
  6993. ],
  6994. "responses": {
  6995. "200": {
  6996. "description": "OK",
  6997. "schema": {
  6998. "$ref": "#/definitions/model.TextResponse"
  6999. },
  7000. "headers": {
  7001. "X-RateLimit-Limit-Requests": {
  7002. "type": "integer",
  7003. "description": "X-RateLimit-Limit-Requests"
  7004. },
  7005. "X-RateLimit-Limit-Tokens": {
  7006. "type": "integer",
  7007. "description": "X-RateLimit-Limit-Tokens"
  7008. },
  7009. "X-RateLimit-Remaining-Requests": {
  7010. "type": "integer",
  7011. "description": "X-RateLimit-Remaining-Requests"
  7012. },
  7013. "X-RateLimit-Remaining-Tokens": {
  7014. "type": "integer",
  7015. "description": "X-RateLimit-Remaining-Tokens"
  7016. },
  7017. "X-RateLimit-Reset-Requests": {
  7018. "type": "string",
  7019. "description": "X-RateLimit-Reset-Requests"
  7020. },
  7021. "X-RateLimit-Reset-Tokens": {
  7022. "type": "string",
  7023. "description": "X-RateLimit-Reset-Tokens"
  7024. }
  7025. }
  7026. }
  7027. }
  7028. }
  7029. },
  7030. "/v1/dashboard/billing/subscription": {
  7031. "get": {
  7032. "security": [
  7033. {
  7034. "ApiKeyAuth": []
  7035. }
  7036. ],
  7037. "description": "Get subscription",
  7038. "produces": [
  7039. "application/json"
  7040. ],
  7041. "tags": [
  7042. "relay"
  7043. ],
  7044. "summary": "Get subscription",
  7045. "responses": {
  7046. "200": {
  7047. "description": "OK",
  7048. "schema": {
  7049. "$ref": "#/definitions/openai.SubscriptionResponse"
  7050. }
  7051. }
  7052. }
  7053. }
  7054. },
  7055. "/v1/dashboard/billing/usage": {
  7056. "get": {
  7057. "security": [
  7058. {
  7059. "ApiKeyAuth": []
  7060. }
  7061. ],
  7062. "description": "Get usage",
  7063. "produces": [
  7064. "application/json"
  7065. ],
  7066. "tags": [
  7067. "relay"
  7068. ],
  7069. "summary": "Get usage",
  7070. "responses": {
  7071. "200": {
  7072. "description": "OK",
  7073. "schema": {
  7074. "$ref": "#/definitions/openai.UsageResponse"
  7075. }
  7076. }
  7077. }
  7078. }
  7079. },
  7080. "/v1/embeddings": {
  7081. "post": {
  7082. "security": [
  7083. {
  7084. "ApiKeyAuth": []
  7085. }
  7086. ],
  7087. "description": "Embeddings",
  7088. "produces": [
  7089. "application/json"
  7090. ],
  7091. "tags": [
  7092. "relay"
  7093. ],
  7094. "summary": "Embeddings",
  7095. "parameters": [
  7096. {
  7097. "description": "Request",
  7098. "name": "request",
  7099. "in": "body",
  7100. "required": true,
  7101. "schema": {
  7102. "$ref": "#/definitions/model.EmbeddingRequest"
  7103. }
  7104. },
  7105. {
  7106. "type": "string",
  7107. "description": "Optional Aiproxy-Channel header",
  7108. "name": "Aiproxy-Channel",
  7109. "in": "header"
  7110. }
  7111. ],
  7112. "responses": {
  7113. "200": {
  7114. "description": "OK",
  7115. "schema": {
  7116. "$ref": "#/definitions/model.EmbeddingResponse"
  7117. },
  7118. "headers": {
  7119. "X-RateLimit-Limit-Requests": {
  7120. "type": "integer",
  7121. "description": "X-RateLimit-Limit-Requests"
  7122. },
  7123. "X-RateLimit-Limit-Tokens": {
  7124. "type": "integer",
  7125. "description": "X-RateLimit-Limit-Tokens"
  7126. },
  7127. "X-RateLimit-Remaining-Requests": {
  7128. "type": "integer",
  7129. "description": "X-RateLimit-Remaining-Requests"
  7130. },
  7131. "X-RateLimit-Remaining-Tokens": {
  7132. "type": "integer",
  7133. "description": "X-RateLimit-Remaining-Tokens"
  7134. },
  7135. "X-RateLimit-Reset-Requests": {
  7136. "type": "string",
  7137. "description": "X-RateLimit-Reset-Requests"
  7138. },
  7139. "X-RateLimit-Reset-Tokens": {
  7140. "type": "string",
  7141. "description": "X-RateLimit-Reset-Tokens"
  7142. }
  7143. }
  7144. }
  7145. }
  7146. }
  7147. },
  7148. "/v1/images/edits": {
  7149. "post": {
  7150. "security": [
  7151. {
  7152. "ApiKeyAuth": []
  7153. }
  7154. ],
  7155. "description": "ImagesEdits",
  7156. "produces": [
  7157. "application/json"
  7158. ],
  7159. "tags": [
  7160. "relay"
  7161. ],
  7162. "summary": "ImagesEdits",
  7163. "parameters": [
  7164. {
  7165. "type": "string",
  7166. "description": "Prompt",
  7167. "name": "prompt",
  7168. "in": "formData",
  7169. "required": true
  7170. },
  7171. {
  7172. "type": "string",
  7173. "description": "Model",
  7174. "name": "model",
  7175. "in": "formData",
  7176. "required": true
  7177. },
  7178. {
  7179. "type": "file",
  7180. "description": "Images",
  7181. "name": "image",
  7182. "in": "formData",
  7183. "required": true
  7184. },
  7185. {
  7186. "type": "string",
  7187. "description": "Optional Aiproxy-Channel header",
  7188. "name": "Aiproxy-Channel",
  7189. "in": "header"
  7190. }
  7191. ],
  7192. "responses": {
  7193. "200": {
  7194. "description": "OK",
  7195. "schema": {
  7196. "$ref": "#/definitions/model.SttJSONResponse"
  7197. },
  7198. "headers": {
  7199. "X-RateLimit-Limit-Requests": {
  7200. "type": "integer",
  7201. "description": "X-RateLimit-Limit-Requests"
  7202. },
  7203. "X-RateLimit-Limit-Tokens": {
  7204. "type": "integer",
  7205. "description": "X-RateLimit-Limit-Tokens"
  7206. },
  7207. "X-RateLimit-Remaining-Requests": {
  7208. "type": "integer",
  7209. "description": "X-RateLimit-Remaining-Requests"
  7210. },
  7211. "X-RateLimit-Remaining-Tokens": {
  7212. "type": "integer",
  7213. "description": "X-RateLimit-Remaining-Tokens"
  7214. },
  7215. "X-RateLimit-Reset-Requests": {
  7216. "type": "string",
  7217. "description": "X-RateLimit-Reset-Requests"
  7218. },
  7219. "X-RateLimit-Reset-Tokens": {
  7220. "type": "string",
  7221. "description": "X-RateLimit-Reset-Tokens"
  7222. }
  7223. }
  7224. }
  7225. }
  7226. }
  7227. },
  7228. "/v1/images/generations": {
  7229. "post": {
  7230. "security": [
  7231. {
  7232. "ApiKeyAuth": []
  7233. }
  7234. ],
  7235. "description": "ImagesGenerations",
  7236. "produces": [
  7237. "application/json"
  7238. ],
  7239. "tags": [
  7240. "relay"
  7241. ],
  7242. "summary": "ImagesGenerations",
  7243. "parameters": [
  7244. {
  7245. "description": "Request",
  7246. "name": "request",
  7247. "in": "body",
  7248. "required": true,
  7249. "schema": {
  7250. "$ref": "#/definitions/model.ImageRequest"
  7251. }
  7252. },
  7253. {
  7254. "type": "string",
  7255. "description": "Optional Aiproxy-Channel header",
  7256. "name": "Aiproxy-Channel",
  7257. "in": "header"
  7258. }
  7259. ],
  7260. "responses": {
  7261. "200": {
  7262. "description": "OK",
  7263. "schema": {
  7264. "$ref": "#/definitions/model.ImageResponse"
  7265. },
  7266. "headers": {
  7267. "X-RateLimit-Limit-Requests": {
  7268. "type": "integer",
  7269. "description": "X-RateLimit-Limit-Requests"
  7270. },
  7271. "X-RateLimit-Limit-Tokens": {
  7272. "type": "integer",
  7273. "description": "X-RateLimit-Limit-Tokens"
  7274. },
  7275. "X-RateLimit-Remaining-Requests": {
  7276. "type": "integer",
  7277. "description": "X-RateLimit-Remaining-Requests"
  7278. },
  7279. "X-RateLimit-Remaining-Tokens": {
  7280. "type": "integer",
  7281. "description": "X-RateLimit-Remaining-Tokens"
  7282. },
  7283. "X-RateLimit-Reset-Requests": {
  7284. "type": "string",
  7285. "description": "X-RateLimit-Reset-Requests"
  7286. },
  7287. "X-RateLimit-Reset-Tokens": {
  7288. "type": "string",
  7289. "description": "X-RateLimit-Reset-Tokens"
  7290. }
  7291. }
  7292. }
  7293. }
  7294. }
  7295. },
  7296. "/v1/messages": {
  7297. "post": {
  7298. "security": [
  7299. {
  7300. "ApiKeyAuth": []
  7301. }
  7302. ],
  7303. "description": "Anthropic",
  7304. "produces": [
  7305. "application/json"
  7306. ],
  7307. "tags": [
  7308. "relay"
  7309. ],
  7310. "summary": "Anthropic",
  7311. "parameters": [
  7312. {
  7313. "description": "Request",
  7314. "name": "request",
  7315. "in": "body",
  7316. "required": true,
  7317. "schema": {
  7318. "$ref": "#/definitions/model.AnthropicMessageRequest"
  7319. }
  7320. },
  7321. {
  7322. "type": "string",
  7323. "description": "Optional Aiproxy-Channel header",
  7324. "name": "Aiproxy-Channel",
  7325. "in": "header"
  7326. }
  7327. ],
  7328. "responses": {
  7329. "200": {
  7330. "description": "OK",
  7331. "schema": {
  7332. "$ref": "#/definitions/model.TextResponse"
  7333. },
  7334. "headers": {
  7335. "X-RateLimit-Limit-Requests": {
  7336. "type": "integer",
  7337. "description": "X-RateLimit-Limit-Requests"
  7338. },
  7339. "X-RateLimit-Limit-Tokens": {
  7340. "type": "integer",
  7341. "description": "X-RateLimit-Limit-Tokens"
  7342. },
  7343. "X-RateLimit-Remaining-Requests": {
  7344. "type": "integer",
  7345. "description": "X-RateLimit-Remaining-Requests"
  7346. },
  7347. "X-RateLimit-Remaining-Tokens": {
  7348. "type": "integer",
  7349. "description": "X-RateLimit-Remaining-Tokens"
  7350. },
  7351. "X-RateLimit-Reset-Requests": {
  7352. "type": "string",
  7353. "description": "X-RateLimit-Reset-Requests"
  7354. },
  7355. "X-RateLimit-Reset-Tokens": {
  7356. "type": "string",
  7357. "description": "X-RateLimit-Reset-Tokens"
  7358. }
  7359. }
  7360. }
  7361. }
  7362. }
  7363. },
  7364. "/v1/models": {
  7365. "get": {
  7366. "security": [
  7367. {
  7368. "ApiKeyAuth": []
  7369. }
  7370. ],
  7371. "description": "List all models",
  7372. "produces": [
  7373. "application/json"
  7374. ],
  7375. "tags": [
  7376. "relay"
  7377. ],
  7378. "summary": "List models",
  7379. "responses": {
  7380. "200": {
  7381. "description": "OK",
  7382. "schema": {
  7383. "type": "object",
  7384. "properties": {
  7385. "data": {
  7386. "type": "array",
  7387. "items": {
  7388. "$ref": "#/definitions/controller.OpenAIModels"
  7389. }
  7390. },
  7391. "object": {
  7392. "type": "string"
  7393. }
  7394. }
  7395. }
  7396. }
  7397. }
  7398. }
  7399. },
  7400. "/v1/models/{model}": {
  7401. "get": {
  7402. "security": [
  7403. {
  7404. "ApiKeyAuth": []
  7405. }
  7406. ],
  7407. "description": "Retrieve a model",
  7408. "produces": [
  7409. "application/json"
  7410. ],
  7411. "tags": [
  7412. "relay"
  7413. ],
  7414. "summary": "Retrieve model",
  7415. "responses": {
  7416. "200": {
  7417. "description": "OK",
  7418. "schema": {
  7419. "$ref": "#/definitions/controller.OpenAIModels"
  7420. }
  7421. }
  7422. }
  7423. }
  7424. },
  7425. "/v1/parse/pdf": {
  7426. "post": {
  7427. "security": [
  7428. {
  7429. "ApiKeyAuth": []
  7430. }
  7431. ],
  7432. "description": "ParsePdf",
  7433. "produces": [
  7434. "application/json"
  7435. ],
  7436. "tags": [
  7437. "relay"
  7438. ],
  7439. "summary": "ParsePdf",
  7440. "parameters": [
  7441. {
  7442. "type": "string",
  7443. "description": "Model",
  7444. "name": "model",
  7445. "in": "formData",
  7446. "required": true
  7447. },
  7448. {
  7449. "type": "file",
  7450. "description": "File",
  7451. "name": "file",
  7452. "in": "formData",
  7453. "required": true
  7454. },
  7455. {
  7456. "type": "string",
  7457. "description": "Optional Aiproxy-Channel header",
  7458. "name": "Aiproxy-Channel",
  7459. "in": "header"
  7460. }
  7461. ],
  7462. "responses": {
  7463. "200": {
  7464. "description": "OK",
  7465. "schema": {
  7466. "$ref": "#/definitions/model.ParsePdfResponse"
  7467. },
  7468. "headers": {
  7469. "X-RateLimit-Limit-Requests": {
  7470. "type": "integer",
  7471. "description": "X-RateLimit-Limit-Requests"
  7472. },
  7473. "X-RateLimit-Limit-Tokens": {
  7474. "type": "integer",
  7475. "description": "X-RateLimit-Limit-Tokens"
  7476. },
  7477. "X-RateLimit-Remaining-Requests": {
  7478. "type": "integer",
  7479. "description": "X-RateLimit-Remaining-Requests"
  7480. },
  7481. "X-RateLimit-Remaining-Tokens": {
  7482. "type": "integer",
  7483. "description": "X-RateLimit-Remaining-Tokens"
  7484. },
  7485. "X-RateLimit-Reset-Requests": {
  7486. "type": "string",
  7487. "description": "X-RateLimit-Reset-Requests"
  7488. },
  7489. "X-RateLimit-Reset-Tokens": {
  7490. "type": "string",
  7491. "description": "X-RateLimit-Reset-Tokens"
  7492. }
  7493. }
  7494. }
  7495. }
  7496. }
  7497. },
  7498. "/v1/rerank": {
  7499. "post": {
  7500. "security": [
  7501. {
  7502. "ApiKeyAuth": []
  7503. }
  7504. ],
  7505. "description": "Rerank",
  7506. "produces": [
  7507. "application/json"
  7508. ],
  7509. "tags": [
  7510. "relay"
  7511. ],
  7512. "summary": "Rerank",
  7513. "parameters": [
  7514. {
  7515. "description": "Request",
  7516. "name": "request",
  7517. "in": "body",
  7518. "required": true,
  7519. "schema": {
  7520. "$ref": "#/definitions/model.RerankRequest"
  7521. }
  7522. },
  7523. {
  7524. "type": "string",
  7525. "description": "Optional Aiproxy-Channel header",
  7526. "name": "Aiproxy-Channel",
  7527. "in": "header"
  7528. }
  7529. ],
  7530. "responses": {
  7531. "200": {
  7532. "description": "OK",
  7533. "schema": {
  7534. "$ref": "#/definitions/model.RerankResponse"
  7535. },
  7536. "headers": {
  7537. "X-RateLimit-Limit-Requests": {
  7538. "type": "integer",
  7539. "description": "X-RateLimit-Limit-Requests"
  7540. },
  7541. "X-RateLimit-Limit-Tokens": {
  7542. "type": "integer",
  7543. "description": "X-RateLimit-Limit-Tokens"
  7544. },
  7545. "X-RateLimit-Remaining-Requests": {
  7546. "type": "integer",
  7547. "description": "X-RateLimit-Remaining-Requests"
  7548. },
  7549. "X-RateLimit-Remaining-Tokens": {
  7550. "type": "integer",
  7551. "description": "X-RateLimit-Remaining-Tokens"
  7552. },
  7553. "X-RateLimit-Reset-Requests": {
  7554. "type": "string",
  7555. "description": "X-RateLimit-Reset-Requests"
  7556. },
  7557. "X-RateLimit-Reset-Tokens": {
  7558. "type": "string",
  7559. "description": "X-RateLimit-Reset-Tokens"
  7560. }
  7561. }
  7562. }
  7563. }
  7564. }
  7565. }
  7566. },
  7567. "definitions": {
  7568. "adaptors.AdaptorMeta": {
  7569. "type": "object",
  7570. "properties": {
  7571. "defaultBaseUrl": {
  7572. "type": "string"
  7573. },
  7574. "fetures": {
  7575. "type": "array",
  7576. "items": {
  7577. "type": "string"
  7578. }
  7579. },
  7580. "keyHelp": {
  7581. "type": "string"
  7582. },
  7583. "name": {
  7584. "type": "string"
  7585. }
  7586. }
  7587. },
  7588. "controller.AddChannelRequest": {
  7589. "type": "object",
  7590. "properties": {
  7591. "base_url": {
  7592. "type": "string"
  7593. },
  7594. "config": {
  7595. "$ref": "#/definitions/model.ChannelConfig"
  7596. },
  7597. "key": {
  7598. "type": "string"
  7599. },
  7600. "model_mapping": {
  7601. "type": "object",
  7602. "additionalProperties": {
  7603. "type": "string"
  7604. }
  7605. },
  7606. "models": {
  7607. "type": "array",
  7608. "items": {
  7609. "type": "string"
  7610. }
  7611. },
  7612. "name": {
  7613. "type": "string"
  7614. },
  7615. "priority": {
  7616. "type": "integer"
  7617. },
  7618. "sets": {
  7619. "type": "array",
  7620. "items": {
  7621. "type": "string"
  7622. }
  7623. },
  7624. "status": {
  7625. "type": "integer"
  7626. },
  7627. "type": {
  7628. "$ref": "#/definitions/model.ChannelType"
  7629. }
  7630. }
  7631. },
  7632. "controller.AddTokenRequest": {
  7633. "type": "object",
  7634. "properties": {
  7635. "expiredAt": {
  7636. "type": "integer"
  7637. },
  7638. "models": {
  7639. "type": "array",
  7640. "items": {
  7641. "type": "string"
  7642. }
  7643. },
  7644. "name": {
  7645. "type": "string"
  7646. },
  7647. "quota": {
  7648. "type": "number"
  7649. },
  7650. "subnets": {
  7651. "type": "array",
  7652. "items": {
  7653. "type": "string"
  7654. }
  7655. }
  7656. }
  7657. },
  7658. "controller.BuiltinModelConfig": {
  7659. "type": "object",
  7660. "properties": {
  7661. "config": {
  7662. "type": "object",
  7663. "additionalProperties": {}
  7664. },
  7665. "created_at": {
  7666. "type": "string"
  7667. },
  7668. "exclude_from_tests": {
  7669. "type": "boolean"
  7670. },
  7671. "image_prices": {
  7672. "description": "map[size]price_per_image",
  7673. "type": "object",
  7674. "additionalProperties": {
  7675. "type": "number"
  7676. }
  7677. },
  7678. "image_quality_prices": {
  7679. "description": "map[size]map[quality]price_per_image",
  7680. "type": "object",
  7681. "additionalProperties": {
  7682. "type": "object",
  7683. "additionalProperties": {
  7684. "type": "number"
  7685. }
  7686. }
  7687. },
  7688. "model": {
  7689. "type": "string"
  7690. },
  7691. "owner": {
  7692. "$ref": "#/definitions/model.ModelOwner"
  7693. },
  7694. "price": {
  7695. "$ref": "#/definitions/model.Price"
  7696. },
  7697. "retry_times": {
  7698. "type": "integer"
  7699. },
  7700. "rpm": {
  7701. "type": "integer"
  7702. },
  7703. "tpm": {
  7704. "type": "integer"
  7705. },
  7706. "type": {
  7707. "$ref": "#/definitions/mode.Mode"
  7708. },
  7709. "updated_at": {
  7710. "type": "string"
  7711. }
  7712. }
  7713. },
  7714. "controller.CreateGroupRequest": {
  7715. "type": "object",
  7716. "properties": {
  7717. "available_sets": {
  7718. "type": "array",
  7719. "items": {
  7720. "type": "string"
  7721. }
  7722. },
  7723. "balance_alert_enabled": {
  7724. "type": "boolean"
  7725. },
  7726. "balance_alert_threshold": {
  7727. "type": "number"
  7728. },
  7729. "rpm_ratio": {
  7730. "type": "number"
  7731. },
  7732. "tpm_ratio": {
  7733. "type": "number"
  7734. }
  7735. }
  7736. },
  7737. "controller.EmbedMCP": {
  7738. "type": "object",
  7739. "properties": {
  7740. "config_templates": {
  7741. "$ref": "#/definitions/controller.EmbedMCPConfigTemplates"
  7742. },
  7743. "enabled": {
  7744. "type": "boolean"
  7745. },
  7746. "id": {
  7747. "type": "string"
  7748. },
  7749. "name": {
  7750. "type": "string"
  7751. },
  7752. "readme": {
  7753. "type": "string"
  7754. },
  7755. "tags": {
  7756. "type": "array",
  7757. "items": {
  7758. "type": "string"
  7759. }
  7760. }
  7761. }
  7762. },
  7763. "controller.EmbedMCPConfigTemplate": {
  7764. "type": "object",
  7765. "properties": {
  7766. "description": {
  7767. "type": "string"
  7768. },
  7769. "example": {
  7770. "type": "string"
  7771. },
  7772. "name": {
  7773. "type": "string"
  7774. },
  7775. "required": {
  7776. "type": "boolean"
  7777. }
  7778. }
  7779. },
  7780. "controller.EmbedMCPConfigTemplates": {
  7781. "type": "object",
  7782. "additionalProperties": {
  7783. "$ref": "#/definitions/controller.EmbedMCPConfigTemplate"
  7784. }
  7785. },
  7786. "controller.EnabledModelChannel": {
  7787. "type": "object",
  7788. "properties": {
  7789. "id": {
  7790. "type": "integer"
  7791. },
  7792. "name": {
  7793. "type": "string"
  7794. },
  7795. "type": {
  7796. "$ref": "#/definitions/model.ChannelType"
  7797. }
  7798. }
  7799. },
  7800. "controller.GetModelConfigsByModelsContainsRequest": {
  7801. "type": "object",
  7802. "properties": {
  7803. "models": {
  7804. "type": "array",
  7805. "items": {
  7806. "type": "string"
  7807. }
  7808. }
  7809. }
  7810. },
  7811. "controller.GroupResponse": {
  7812. "type": "object",
  7813. "properties": {
  7814. "accessed_at": {
  7815. "type": "string"
  7816. },
  7817. "available_sets": {
  7818. "type": "array",
  7819. "items": {
  7820. "type": "string"
  7821. }
  7822. },
  7823. "balance_alert_enabled": {
  7824. "type": "boolean"
  7825. },
  7826. "balance_alert_threshold": {
  7827. "type": "number"
  7828. },
  7829. "created_at": {
  7830. "type": "string"
  7831. },
  7832. "id": {
  7833. "type": "string"
  7834. },
  7835. "request_count": {
  7836. "type": "integer"
  7837. },
  7838. "rpm_ratio": {
  7839. "type": "number"
  7840. },
  7841. "status": {
  7842. "type": "integer"
  7843. },
  7844. "tpm_ratio": {
  7845. "type": "number"
  7846. },
  7847. "used_amount": {
  7848. "type": "number"
  7849. }
  7850. }
  7851. },
  7852. "controller.ImportChannelFromOneAPIRequest": {
  7853. "type": "object",
  7854. "properties": {
  7855. "dsn": {
  7856. "type": "string"
  7857. }
  7858. }
  7859. },
  7860. "controller.OpenAIModelPermission": {
  7861. "type": "object",
  7862. "properties": {
  7863. "allow_create_engine": {
  7864. "type": "boolean"
  7865. },
  7866. "allow_fine_tuning": {
  7867. "type": "boolean"
  7868. },
  7869. "allow_logprobs": {
  7870. "type": "boolean"
  7871. },
  7872. "allow_sampling": {
  7873. "type": "boolean"
  7874. },
  7875. "allow_search_indices": {
  7876. "type": "boolean"
  7877. },
  7878. "allow_view": {
  7879. "type": "boolean"
  7880. },
  7881. "created": {
  7882. "type": "integer"
  7883. },
  7884. "group": {
  7885. "type": "string"
  7886. },
  7887. "id": {
  7888. "type": "string"
  7889. },
  7890. "is_blocking": {
  7891. "type": "boolean"
  7892. },
  7893. "object": {
  7894. "type": "string"
  7895. },
  7896. "organization": {
  7897. "type": "string"
  7898. }
  7899. }
  7900. },
  7901. "controller.OpenAIModels": {
  7902. "type": "object",
  7903. "properties": {
  7904. "created": {
  7905. "type": "integer"
  7906. },
  7907. "id": {
  7908. "type": "string"
  7909. },
  7910. "object": {
  7911. "type": "string"
  7912. },
  7913. "owned_by": {
  7914. "type": "string"
  7915. },
  7916. "parent": {
  7917. "type": "string"
  7918. },
  7919. "permission": {
  7920. "type": "array",
  7921. "items": {
  7922. "$ref": "#/definitions/controller.OpenAIModelPermission"
  7923. }
  7924. },
  7925. "root": {
  7926. "type": "string"
  7927. }
  7928. }
  7929. },
  7930. "controller.SaveEmbedMCPRequest": {
  7931. "type": "object",
  7932. "properties": {
  7933. "enabled": {
  7934. "type": "boolean"
  7935. },
  7936. "id": {
  7937. "type": "string"
  7938. },
  7939. "init_config": {
  7940. "type": "object",
  7941. "additionalProperties": {
  7942. "type": "string"
  7943. }
  7944. }
  7945. }
  7946. },
  7947. "controller.SaveGroupModelConfigRequest": {
  7948. "type": "object",
  7949. "properties": {
  7950. "image_prices": {
  7951. "type": "object",
  7952. "additionalProperties": {
  7953. "type": "number"
  7954. }
  7955. },
  7956. "model": {
  7957. "type": "string"
  7958. },
  7959. "override_limit": {
  7960. "type": "boolean"
  7961. },
  7962. "override_price": {
  7963. "type": "boolean"
  7964. },
  7965. "price": {
  7966. "$ref": "#/definitions/model.Price"
  7967. },
  7968. "rpm": {
  7969. "type": "integer"
  7970. },
  7971. "tpm": {
  7972. "type": "integer"
  7973. }
  7974. }
  7975. },
  7976. "controller.SaveModelConfigsRequest": {
  7977. "type": "object",
  7978. "properties": {
  7979. "config": {
  7980. "type": "object",
  7981. "additionalProperties": {}
  7982. },
  7983. "created_at": {
  7984. "type": "string"
  7985. },
  7986. "exclude_from_tests": {
  7987. "type": "boolean"
  7988. },
  7989. "image_prices": {
  7990. "description": "map[size]price_per_image",
  7991. "type": "object",
  7992. "additionalProperties": {
  7993. "type": "number"
  7994. }
  7995. },
  7996. "image_quality_prices": {
  7997. "description": "map[size]map[quality]price_per_image",
  7998. "type": "object",
  7999. "additionalProperties": {
  8000. "type": "object",
  8001. "additionalProperties": {
  8002. "type": "number"
  8003. }
  8004. }
  8005. },
  8006. "model": {
  8007. "type": "string"
  8008. },
  8009. "owner": {
  8010. "$ref": "#/definitions/model.ModelOwner"
  8011. },
  8012. "price": {
  8013. "$ref": "#/definitions/model.Price"
  8014. },
  8015. "retry_times": {
  8016. "type": "integer"
  8017. },
  8018. "rpm": {
  8019. "type": "integer"
  8020. },
  8021. "tpm": {
  8022. "type": "integer"
  8023. },
  8024. "type": {
  8025. "$ref": "#/definitions/mode.Mode"
  8026. },
  8027. "updated_at": {
  8028. "type": "string"
  8029. }
  8030. }
  8031. },
  8032. "controller.StatusData": {
  8033. "type": "object",
  8034. "properties": {
  8035. "startTime": {
  8036. "type": "integer"
  8037. }
  8038. }
  8039. },
  8040. "controller.TestResult": {
  8041. "type": "object",
  8042. "properties": {
  8043. "data": {
  8044. "$ref": "#/definitions/model.ChannelTest"
  8045. },
  8046. "message": {
  8047. "type": "string"
  8048. },
  8049. "success": {
  8050. "type": "boolean"
  8051. }
  8052. }
  8053. },
  8054. "controller.TokenResponse": {
  8055. "type": "object",
  8056. "properties": {
  8057. "accessed_at": {
  8058. "type": "string"
  8059. },
  8060. "created_at": {
  8061. "type": "string"
  8062. },
  8063. "expired_at": {
  8064. "type": "string"
  8065. },
  8066. "group": {
  8067. "type": "string"
  8068. },
  8069. "id": {
  8070. "type": "integer"
  8071. },
  8072. "key": {
  8073. "type": "string"
  8074. },
  8075. "models": {
  8076. "type": "array",
  8077. "items": {
  8078. "type": "string"
  8079. }
  8080. },
  8081. "name": {
  8082. "type": "string"
  8083. },
  8084. "quota": {
  8085. "type": "number"
  8086. },
  8087. "request_count": {
  8088. "type": "integer"
  8089. },
  8090. "status": {
  8091. "type": "integer"
  8092. },
  8093. "subnets": {
  8094. "type": "array",
  8095. "items": {
  8096. "type": "string"
  8097. }
  8098. },
  8099. "used_amount": {
  8100. "type": "number"
  8101. }
  8102. }
  8103. },
  8104. "controller.UpdateChannelStatusRequest": {
  8105. "type": "object",
  8106. "properties": {
  8107. "status": {
  8108. "type": "integer"
  8109. }
  8110. }
  8111. },
  8112. "controller.UpdateGroupMCPStatusRequest": {
  8113. "type": "object",
  8114. "properties": {
  8115. "status": {
  8116. "$ref": "#/definitions/model.GroupMCPStatus"
  8117. }
  8118. }
  8119. },
  8120. "controller.UpdateGroupRPMRatioRequest": {
  8121. "type": "object",
  8122. "properties": {
  8123. "rpm_ratio": {
  8124. "type": "number"
  8125. }
  8126. }
  8127. },
  8128. "controller.UpdateGroupStatusRequest": {
  8129. "type": "object",
  8130. "properties": {
  8131. "status": {
  8132. "type": "integer"
  8133. }
  8134. }
  8135. },
  8136. "controller.UpdateGroupTPMRatioRequest": {
  8137. "type": "object",
  8138. "properties": {
  8139. "tpm_ratio": {
  8140. "type": "number"
  8141. }
  8142. }
  8143. },
  8144. "controller.UpdateGroupsStatusRequest": {
  8145. "type": "object",
  8146. "properties": {
  8147. "groups": {
  8148. "type": "array",
  8149. "items": {
  8150. "type": "string"
  8151. }
  8152. },
  8153. "status": {
  8154. "type": "integer"
  8155. }
  8156. }
  8157. },
  8158. "controller.UpdatePublicMCPStatusRequest": {
  8159. "type": "object",
  8160. "properties": {
  8161. "status": {
  8162. "$ref": "#/definitions/model.PublicMCPStatus"
  8163. }
  8164. }
  8165. },
  8166. "controller.UpdateTokenNameRequest": {
  8167. "type": "object",
  8168. "properties": {
  8169. "name": {
  8170. "type": "string"
  8171. }
  8172. }
  8173. },
  8174. "controller.UpdateTokenStatusRequest": {
  8175. "type": "object",
  8176. "properties": {
  8177. "status": {
  8178. "type": "integer"
  8179. }
  8180. }
  8181. },
  8182. "github_com_labring_aiproxy_core_model.Usage": {
  8183. "type": "object",
  8184. "properties": {
  8185. "cache_creation_tokens": {
  8186. "type": "integer"
  8187. },
  8188. "cached_tokens": {
  8189. "type": "integer"
  8190. },
  8191. "image_input_tokens": {
  8192. "type": "integer"
  8193. },
  8194. "input_tokens": {
  8195. "type": "integer"
  8196. },
  8197. "output_tokens": {
  8198. "type": "integer"
  8199. },
  8200. "reasoning_tokens": {
  8201. "type": "integer"
  8202. },
  8203. "total_tokens": {
  8204. "type": "integer"
  8205. },
  8206. "web_search_count": {
  8207. "type": "integer"
  8208. }
  8209. }
  8210. },
  8211. "github_com_labring_aiproxy_core_relay_model.Usage": {
  8212. "type": "object",
  8213. "properties": {
  8214. "completion_tokens": {
  8215. "type": "integer"
  8216. },
  8217. "completion_tokens_details": {
  8218. "$ref": "#/definitions/model.CompletionTokensDetails"
  8219. },
  8220. "prompt_tokens": {
  8221. "type": "integer"
  8222. },
  8223. "prompt_tokens_details": {
  8224. "$ref": "#/definitions/model.PromptTokensDetails"
  8225. },
  8226. "total_tokens": {
  8227. "type": "integer"
  8228. },
  8229. "web_search_count": {
  8230. "type": "integer"
  8231. }
  8232. }
  8233. },
  8234. "middleware.APIResponse": {
  8235. "type": "object",
  8236. "properties": {
  8237. "data": {},
  8238. "message": {
  8239. "type": "string"
  8240. },
  8241. "success": {
  8242. "type": "boolean"
  8243. }
  8244. }
  8245. },
  8246. "mode.Mode": {
  8247. "type": "integer",
  8248. "enum": [
  8249. 0,
  8250. 1,
  8251. 2,
  8252. 3,
  8253. 4,
  8254. 5,
  8255. 6,
  8256. 7,
  8257. 8,
  8258. 9,
  8259. 10,
  8260. 11,
  8261. 12
  8262. ],
  8263. "x-enum-varnames": [
  8264. "Unknown",
  8265. "ChatCompletions",
  8266. "Completions",
  8267. "Embeddings",
  8268. "Moderations",
  8269. "ImagesGenerations",
  8270. "ImagesEdits",
  8271. "AudioSpeech",
  8272. "AudioTranscription",
  8273. "AudioTranslation",
  8274. "Rerank",
  8275. "ParsePdf",
  8276. "Anthropic"
  8277. ]
  8278. },
  8279. "model.AnthropicMessageRequest": {
  8280. "type": "object",
  8281. "properties": {
  8282. "messages": {
  8283. "type": "array",
  8284. "items": {
  8285. "$ref": "#/definitions/model.Message"
  8286. }
  8287. },
  8288. "model": {
  8289. "type": "string"
  8290. }
  8291. }
  8292. },
  8293. "model.Audio": {
  8294. "type": "object",
  8295. "properties": {
  8296. "format": {
  8297. "type": "string"
  8298. },
  8299. "voice": {
  8300. "type": "string"
  8301. }
  8302. }
  8303. },
  8304. "model.Channel": {
  8305. "type": "object",
  8306. "properties": {
  8307. "balance": {
  8308. "type": "number"
  8309. },
  8310. "balance_threshold": {
  8311. "type": "number"
  8312. },
  8313. "balance_updated_at": {
  8314. "type": "string"
  8315. },
  8316. "base_url": {
  8317. "type": "string"
  8318. },
  8319. "channel_tests": {
  8320. "type": "array",
  8321. "items": {
  8322. "$ref": "#/definitions/model.ChannelTest"
  8323. }
  8324. },
  8325. "config": {
  8326. "$ref": "#/definitions/model.ChannelConfig"
  8327. },
  8328. "created_at": {
  8329. "type": "string"
  8330. },
  8331. "enabled_auto_balance_check": {
  8332. "type": "boolean"
  8333. },
  8334. "id": {
  8335. "type": "integer"
  8336. },
  8337. "key": {
  8338. "type": "string"
  8339. },
  8340. "last_test_error_at": {
  8341. "type": "string"
  8342. },
  8343. "model_mapping": {
  8344. "type": "object",
  8345. "additionalProperties": {
  8346. "type": "string"
  8347. }
  8348. },
  8349. "models": {
  8350. "type": "array",
  8351. "items": {
  8352. "type": "string"
  8353. }
  8354. },
  8355. "name": {
  8356. "type": "string"
  8357. },
  8358. "priority": {
  8359. "type": "integer"
  8360. },
  8361. "request_count": {
  8362. "type": "integer"
  8363. },
  8364. "sets": {
  8365. "type": "array",
  8366. "items": {
  8367. "type": "string"
  8368. }
  8369. },
  8370. "status": {
  8371. "type": "integer"
  8372. },
  8373. "type": {
  8374. "$ref": "#/definitions/model.ChannelType"
  8375. },
  8376. "used_amount": {
  8377. "type": "number"
  8378. }
  8379. }
  8380. },
  8381. "model.ChannelConfig": {
  8382. "type": "object",
  8383. "properties": {
  8384. "split_think": {
  8385. "type": "boolean"
  8386. }
  8387. }
  8388. },
  8389. "model.ChannelTest": {
  8390. "type": "object",
  8391. "properties": {
  8392. "actual_model": {
  8393. "type": "string"
  8394. },
  8395. "channel_id": {
  8396. "type": "integer"
  8397. },
  8398. "channel_name": {
  8399. "type": "string"
  8400. },
  8401. "channel_type": {
  8402. "$ref": "#/definitions/model.ChannelType"
  8403. },
  8404. "code": {
  8405. "type": "integer"
  8406. },
  8407. "mode": {
  8408. "$ref": "#/definitions/mode.Mode"
  8409. },
  8410. "model": {
  8411. "type": "string"
  8412. },
  8413. "response": {
  8414. "type": "string"
  8415. },
  8416. "success": {
  8417. "type": "boolean"
  8418. },
  8419. "test_at": {
  8420. "type": "string"
  8421. },
  8422. "took": {
  8423. "type": "number"
  8424. }
  8425. }
  8426. },
  8427. "model.ChannelType": {
  8428. "type": "integer",
  8429. "enum": [
  8430. 1,
  8431. 3,
  8432. 12,
  8433. 13,
  8434. 14,
  8435. 15,
  8436. 16,
  8437. 17,
  8438. 18,
  8439. 19,
  8440. 20,
  8441. 23,
  8442. 24,
  8443. 25,
  8444. 26,
  8445. 27,
  8446. 28,
  8447. 29,
  8448. 30,
  8449. 31,
  8450. 32,
  8451. 33,
  8452. 34,
  8453. 35,
  8454. 36,
  8455. 37,
  8456. 40,
  8457. 41,
  8458. 42,
  8459. 43,
  8460. 44,
  8461. 45,
  8462. 46,
  8463. 47,
  8464. 48
  8465. ],
  8466. "x-enum-varnames": [
  8467. "ChannelTypeOpenAI",
  8468. "ChannelTypeAzure",
  8469. "ChannelTypeGoogleGeminiOpenAI",
  8470. "ChannelTypeBaiduV2",
  8471. "ChannelTypeAnthropic",
  8472. "ChannelTypeBaidu",
  8473. "ChannelTypeZhipu",
  8474. "ChannelTypeAli",
  8475. "ChannelTypeXunfei",
  8476. "ChannelTypeAI360",
  8477. "ChannelTypeOpenRouter",
  8478. "ChannelTypeTencent",
  8479. "ChannelTypeGoogleGemini",
  8480. "ChannelTypeMoonshot",
  8481. "ChannelTypeBaichuan",
  8482. "ChannelTypeMinimax",
  8483. "ChannelTypeMistral",
  8484. "ChannelTypeGroq",
  8485. "ChannelTypeOllama",
  8486. "ChannelTypeLingyiwanwu",
  8487. "ChannelTypeStepfun",
  8488. "ChannelTypeAWS",
  8489. "ChannelTypeCoze",
  8490. "ChannelTypeCohere",
  8491. "ChannelTypeDeepseek",
  8492. "ChannelTypeCloudflare",
  8493. "ChannelTypeDoubao",
  8494. "ChannelTypeNovita",
  8495. "ChannelTypeVertexAI",
  8496. "ChannelTypeSiliconflow",
  8497. "ChannelTypeDoubaoAudio",
  8498. "ChannelTypeXAI",
  8499. "ChannelTypeDoc2x",
  8500. "ChannelTypeJina",
  8501. "ChannelTypeTextEmbeddingsInference"
  8502. ]
  8503. },
  8504. "model.ChartData": {
  8505. "type": "object",
  8506. "properties": {
  8507. "cache_creation_tokens": {
  8508. "type": "integer"
  8509. },
  8510. "cached_tokens": {
  8511. "type": "integer"
  8512. },
  8513. "exception_count": {
  8514. "type": "integer"
  8515. },
  8516. "input_tokens": {
  8517. "type": "integer"
  8518. },
  8519. "max_rpm": {
  8520. "type": "integer"
  8521. },
  8522. "max_rps": {
  8523. "type": "integer"
  8524. },
  8525. "max_tpm": {
  8526. "type": "integer"
  8527. },
  8528. "max_tps": {
  8529. "type": "integer"
  8530. },
  8531. "output_tokens": {
  8532. "type": "integer"
  8533. },
  8534. "request_count": {
  8535. "type": "integer"
  8536. },
  8537. "timestamp": {
  8538. "type": "integer"
  8539. },
  8540. "total_tokens": {
  8541. "type": "integer"
  8542. },
  8543. "used_amount": {
  8544. "type": "number"
  8545. },
  8546. "web_search_count": {
  8547. "type": "integer"
  8548. }
  8549. }
  8550. },
  8551. "model.CompletionTokensDetails": {
  8552. "type": "object",
  8553. "properties": {
  8554. "accepted_prediction_tokens": {
  8555. "type": "integer"
  8556. },
  8557. "audio_tokens": {
  8558. "type": "integer"
  8559. },
  8560. "reasoning_tokens": {
  8561. "type": "integer"
  8562. },
  8563. "rejected_prediction_tokens": {
  8564. "type": "integer"
  8565. }
  8566. }
  8567. },
  8568. "model.CostRank": {
  8569. "type": "object",
  8570. "properties": {
  8571. "cache_creation_tokens": {
  8572. "type": "integer"
  8573. },
  8574. "cached_tokens": {
  8575. "type": "integer"
  8576. },
  8577. "input_tokens": {
  8578. "type": "integer"
  8579. },
  8580. "max_rpm": {
  8581. "type": "integer"
  8582. },
  8583. "max_rps": {
  8584. "type": "integer"
  8585. },
  8586. "max_tpm": {
  8587. "type": "integer"
  8588. },
  8589. "max_tps": {
  8590. "type": "integer"
  8591. },
  8592. "model": {
  8593. "type": "string"
  8594. },
  8595. "output_tokens": {
  8596. "type": "integer"
  8597. },
  8598. "request_count": {
  8599. "type": "integer"
  8600. },
  8601. "total_tokens": {
  8602. "type": "integer"
  8603. },
  8604. "used_amount": {
  8605. "type": "number"
  8606. },
  8607. "web_search_count": {
  8608. "type": "integer"
  8609. }
  8610. }
  8611. },
  8612. "model.DashboardResponse": {
  8613. "type": "object",
  8614. "properties": {
  8615. "cache_creation_tokens": {
  8616. "type": "integer"
  8617. },
  8618. "cached_tokens": {
  8619. "type": "integer"
  8620. },
  8621. "channels": {
  8622. "type": "array",
  8623. "items": {
  8624. "type": "integer"
  8625. }
  8626. },
  8627. "chart_data": {
  8628. "type": "array",
  8629. "items": {
  8630. "$ref": "#/definitions/model.ChartData"
  8631. }
  8632. },
  8633. "exception_count": {
  8634. "type": "integer"
  8635. },
  8636. "input_tokens": {
  8637. "type": "integer"
  8638. },
  8639. "max_rpm": {
  8640. "type": "integer"
  8641. },
  8642. "max_rps": {
  8643. "type": "integer"
  8644. },
  8645. "max_tpm": {
  8646. "type": "integer"
  8647. },
  8648. "max_tps": {
  8649. "type": "integer"
  8650. },
  8651. "output_tokens": {
  8652. "type": "integer"
  8653. },
  8654. "rpm": {
  8655. "type": "integer"
  8656. },
  8657. "total_count": {
  8658. "type": "integer"
  8659. },
  8660. "total_tokens": {
  8661. "type": "integer"
  8662. },
  8663. "tpm": {
  8664. "type": "integer"
  8665. },
  8666. "used_amount": {
  8667. "type": "number"
  8668. },
  8669. "web_search_count": {
  8670. "type": "integer"
  8671. }
  8672. }
  8673. },
  8674. "model.Document": {
  8675. "type": "object",
  8676. "properties": {
  8677. "text": {
  8678. "type": "string"
  8679. }
  8680. }
  8681. },
  8682. "model.EmbeddingRequest": {
  8683. "type": "object",
  8684. "properties": {
  8685. "dimensions": {
  8686. "type": "integer"
  8687. },
  8688. "encoding_format": {
  8689. "type": "string"
  8690. },
  8691. "input": {
  8692. "type": "string"
  8693. },
  8694. "model": {
  8695. "type": "string"
  8696. }
  8697. }
  8698. },
  8699. "model.EmbeddingResponse": {
  8700. "type": "object",
  8701. "properties": {
  8702. "data": {
  8703. "type": "array",
  8704. "items": {
  8705. "$ref": "#/definitions/model.EmbeddingResponseItem"
  8706. }
  8707. },
  8708. "model": {
  8709. "type": "string"
  8710. },
  8711. "object": {
  8712. "type": "string"
  8713. },
  8714. "usage": {
  8715. "$ref": "#/definitions/github_com_labring_aiproxy_core_relay_model.Usage"
  8716. }
  8717. }
  8718. },
  8719. "model.EmbeddingResponseItem": {
  8720. "type": "object",
  8721. "properties": {
  8722. "embedding": {
  8723. "type": "array",
  8724. "items": {
  8725. "type": "number"
  8726. }
  8727. },
  8728. "index": {
  8729. "type": "integer"
  8730. },
  8731. "object": {
  8732. "type": "string"
  8733. }
  8734. }
  8735. },
  8736. "model.FinishReason": {
  8737. "type": "string",
  8738. "enum": [
  8739. "stop",
  8740. "length",
  8741. "content_filter",
  8742. "tool_calls",
  8743. "function_call"
  8744. ],
  8745. "x-enum-varnames": [
  8746. "FinishReasonStop",
  8747. "FinishReasonLength",
  8748. "FinishReasonContentFilter",
  8749. "FinishReasonToolCalls",
  8750. "FinishReasonFunctionCall"
  8751. ]
  8752. },
  8753. "model.Function": {
  8754. "type": "object",
  8755. "properties": {
  8756. "arguments": {
  8757. "type": "string"
  8758. },
  8759. "description": {
  8760. "type": "string"
  8761. },
  8762. "name": {
  8763. "type": "string"
  8764. },
  8765. "parameters": {}
  8766. }
  8767. },
  8768. "model.GeneralOpenAIRequest": {
  8769. "type": "object",
  8770. "properties": {
  8771. "audio": {
  8772. "$ref": "#/definitions/model.Audio"
  8773. },
  8774. "dimensions": {
  8775. "type": "integer"
  8776. },
  8777. "encoding_format": {
  8778. "type": "string"
  8779. },
  8780. "frequency_penalty": {
  8781. "type": "number"
  8782. },
  8783. "function_call": {},
  8784. "functions": {},
  8785. "input": {},
  8786. "instruction": {
  8787. "type": "string"
  8788. },
  8789. "logit_bias": {},
  8790. "logprobs": {
  8791. "type": "boolean"
  8792. },
  8793. "max_completion_tokens": {
  8794. "type": "integer"
  8795. },
  8796. "max_tokens": {
  8797. "type": "integer"
  8798. },
  8799. "messages": {
  8800. "type": "array",
  8801. "items": {
  8802. "$ref": "#/definitions/model.Message"
  8803. }
  8804. },
  8805. "metadata": {},
  8806. "modalities": {
  8807. "type": "array",
  8808. "items": {
  8809. "type": "string"
  8810. }
  8811. },
  8812. "model": {
  8813. "type": "string"
  8814. },
  8815. "n": {
  8816. "type": "integer"
  8817. },
  8818. "num_ctx": {
  8819. "type": "integer"
  8820. },
  8821. "parallel_tool_calls": {
  8822. "type": "boolean"
  8823. },
  8824. "prediction": {},
  8825. "presence_penalty": {
  8826. "type": "number"
  8827. },
  8828. "prompt": {},
  8829. "quality": {
  8830. "type": "string"
  8831. },
  8832. "response_format": {
  8833. "$ref": "#/definitions/model.ResponseFormat"
  8834. },
  8835. "seed": {
  8836. "type": "number"
  8837. },
  8838. "service_tier": {
  8839. "type": "string"
  8840. },
  8841. "size": {
  8842. "type": "string"
  8843. },
  8844. "stop": {},
  8845. "store": {
  8846. "type": "boolean"
  8847. },
  8848. "stream": {
  8849. "type": "boolean"
  8850. },
  8851. "stream_options": {
  8852. "$ref": "#/definitions/model.StreamOptions"
  8853. },
  8854. "style": {
  8855. "type": "string"
  8856. },
  8857. "temperature": {
  8858. "type": "number"
  8859. },
  8860. "tool_choice": {},
  8861. "tools": {
  8862. "type": "array",
  8863. "items": {
  8864. "$ref": "#/definitions/model.Tool"
  8865. }
  8866. },
  8867. "top_k": {
  8868. "type": "integer"
  8869. },
  8870. "top_logprobs": {
  8871. "type": "integer"
  8872. },
  8873. "top_p": {
  8874. "type": "number"
  8875. },
  8876. "user": {
  8877. "type": "string"
  8878. }
  8879. }
  8880. },
  8881. "model.GetGroupLogsResult": {
  8882. "type": "object",
  8883. "properties": {
  8884. "channels": {
  8885. "type": "array",
  8886. "items": {
  8887. "type": "integer"
  8888. }
  8889. },
  8890. "logs": {
  8891. "type": "array",
  8892. "items": {
  8893. "$ref": "#/definitions/model.Log"
  8894. }
  8895. },
  8896. "models": {
  8897. "type": "array",
  8898. "items": {
  8899. "type": "string"
  8900. }
  8901. },
  8902. "token_names": {
  8903. "type": "array",
  8904. "items": {
  8905. "type": "string"
  8906. }
  8907. },
  8908. "total": {
  8909. "type": "integer"
  8910. }
  8911. }
  8912. },
  8913. "model.GetLogsResult": {
  8914. "type": "object",
  8915. "properties": {
  8916. "channels": {
  8917. "type": "array",
  8918. "items": {
  8919. "type": "integer"
  8920. }
  8921. },
  8922. "logs": {
  8923. "type": "array",
  8924. "items": {
  8925. "$ref": "#/definitions/model.Log"
  8926. }
  8927. },
  8928. "total": {
  8929. "type": "integer"
  8930. }
  8931. }
  8932. },
  8933. "model.Group": {
  8934. "type": "object",
  8935. "properties": {
  8936. "available_sets": {
  8937. "type": "array",
  8938. "items": {
  8939. "type": "string"
  8940. }
  8941. },
  8942. "balance_alert_enabled": {
  8943. "type": "boolean"
  8944. },
  8945. "balance_alert_threshold": {
  8946. "type": "number"
  8947. },
  8948. "created_at": {
  8949. "type": "string"
  8950. },
  8951. "id": {
  8952. "type": "string"
  8953. },
  8954. "request_count": {
  8955. "type": "integer"
  8956. },
  8957. "rpm_ratio": {
  8958. "type": "number"
  8959. },
  8960. "status": {
  8961. "type": "integer"
  8962. },
  8963. "tpm_ratio": {
  8964. "type": "number"
  8965. },
  8966. "used_amount": {
  8967. "type": "number"
  8968. }
  8969. }
  8970. },
  8971. "model.GroupDashboardResponse": {
  8972. "type": "object",
  8973. "properties": {
  8974. "cache_creation_tokens": {
  8975. "type": "integer"
  8976. },
  8977. "cached_tokens": {
  8978. "type": "integer"
  8979. },
  8980. "channels": {
  8981. "type": "array",
  8982. "items": {
  8983. "type": "integer"
  8984. }
  8985. },
  8986. "chart_data": {
  8987. "type": "array",
  8988. "items": {
  8989. "$ref": "#/definitions/model.ChartData"
  8990. }
  8991. },
  8992. "exception_count": {
  8993. "type": "integer"
  8994. },
  8995. "input_tokens": {
  8996. "type": "integer"
  8997. },
  8998. "max_rpm": {
  8999. "type": "integer"
  9000. },
  9001. "max_rps": {
  9002. "type": "integer"
  9003. },
  9004. "max_tpm": {
  9005. "type": "integer"
  9006. },
  9007. "max_tps": {
  9008. "type": "integer"
  9009. },
  9010. "models": {
  9011. "type": "array",
  9012. "items": {
  9013. "type": "string"
  9014. }
  9015. },
  9016. "output_tokens": {
  9017. "type": "integer"
  9018. },
  9019. "rpm": {
  9020. "type": "integer"
  9021. },
  9022. "token_names": {
  9023. "type": "array",
  9024. "items": {
  9025. "type": "string"
  9026. }
  9027. },
  9028. "total_count": {
  9029. "type": "integer"
  9030. },
  9031. "total_tokens": {
  9032. "type": "integer"
  9033. },
  9034. "tpm": {
  9035. "type": "integer"
  9036. },
  9037. "used_amount": {
  9038. "type": "number"
  9039. },
  9040. "web_search_count": {
  9041. "type": "integer"
  9042. }
  9043. }
  9044. },
  9045. "model.GroupMCP": {
  9046. "type": "object",
  9047. "properties": {
  9048. "created_at": {
  9049. "type": "string"
  9050. },
  9051. "group_id": {
  9052. "type": "string"
  9053. },
  9054. "id": {
  9055. "type": "string"
  9056. },
  9057. "name": {
  9058. "type": "string"
  9059. },
  9060. "openapi_config": {
  9061. "$ref": "#/definitions/model.MCPOpenAPIConfig"
  9062. },
  9063. "proxy_config": {
  9064. "$ref": "#/definitions/model.GroupMCPProxyConfig"
  9065. },
  9066. "status": {
  9067. "$ref": "#/definitions/model.GroupMCPStatus"
  9068. },
  9069. "type": {
  9070. "$ref": "#/definitions/model.GroupMCPType"
  9071. },
  9072. "update_at": {
  9073. "type": "string"
  9074. }
  9075. }
  9076. },
  9077. "model.GroupMCPProxyConfig": {
  9078. "type": "object",
  9079. "properties": {
  9080. "headers": {
  9081. "type": "object",
  9082. "additionalProperties": {
  9083. "type": "string"
  9084. }
  9085. },
  9086. "querys": {
  9087. "type": "object",
  9088. "additionalProperties": {
  9089. "type": "string"
  9090. }
  9091. },
  9092. "url": {
  9093. "type": "string"
  9094. }
  9095. }
  9096. },
  9097. "model.GroupMCPStatus": {
  9098. "type": "integer",
  9099. "enum": [
  9100. 1,
  9101. 2
  9102. ],
  9103. "x-enum-varnames": [
  9104. "GroupMCPStatusEnabled",
  9105. "GroupMCPStatusDisabled"
  9106. ]
  9107. },
  9108. "model.GroupMCPType": {
  9109. "type": "string",
  9110. "enum": [
  9111. "mcp_proxy_sse",
  9112. "mcp_proxy_streamable",
  9113. "mcp_openapi"
  9114. ],
  9115. "x-enum-varnames": [
  9116. "GroupMCPTypeProxySSE",
  9117. "GroupMCPTypeProxyStreamable",
  9118. "GroupMCPTypeOpenAPI"
  9119. ]
  9120. },
  9121. "model.GroupModelConfig": {
  9122. "type": "object",
  9123. "properties": {
  9124. "group_id": {
  9125. "type": "string"
  9126. },
  9127. "image_prices": {
  9128. "type": "object",
  9129. "additionalProperties": {
  9130. "type": "number"
  9131. }
  9132. },
  9133. "model": {
  9134. "type": "string"
  9135. },
  9136. "override_limit": {
  9137. "type": "boolean"
  9138. },
  9139. "override_price": {
  9140. "type": "boolean"
  9141. },
  9142. "override_retry_times": {
  9143. "type": "boolean"
  9144. },
  9145. "price": {
  9146. "$ref": "#/definitions/model.Price"
  9147. },
  9148. "retry_times": {
  9149. "type": "integer"
  9150. },
  9151. "rpm": {
  9152. "type": "integer"
  9153. },
  9154. "tpm": {
  9155. "type": "integer"
  9156. }
  9157. }
  9158. },
  9159. "model.ImageData": {
  9160. "type": "object",
  9161. "properties": {
  9162. "b64_json": {
  9163. "type": "string"
  9164. },
  9165. "revised_prompt": {
  9166. "type": "string"
  9167. },
  9168. "url": {
  9169. "type": "string"
  9170. }
  9171. }
  9172. },
  9173. "model.ImageInputTokensDetails": {
  9174. "type": "object",
  9175. "properties": {
  9176. "image_tokens": {
  9177. "description": "The number of image tokens in the input prompt.",
  9178. "type": "integer"
  9179. },
  9180. "text_tokens": {
  9181. "description": "The number of text tokens in the input prompt.",
  9182. "type": "integer"
  9183. }
  9184. }
  9185. },
  9186. "model.ImageRequest": {
  9187. "type": "object",
  9188. "properties": {
  9189. "background": {
  9190. "type": "string"
  9191. },
  9192. "model": {
  9193. "type": "string"
  9194. },
  9195. "moderation": {
  9196. "type": "string"
  9197. },
  9198. "n": {
  9199. "type": "integer"
  9200. },
  9201. "output_compression": {
  9202. "type": "integer"
  9203. },
  9204. "output_format": {
  9205. "description": "png, jpeg, webp",
  9206. "type": "string"
  9207. },
  9208. "prompt": {
  9209. "type": "string"
  9210. },
  9211. "quality": {
  9212. "description": "auto, high, medium, low, hd, standard",
  9213. "type": "string"
  9214. },
  9215. "response_format": {
  9216. "description": "url, b64_json",
  9217. "type": "string"
  9218. },
  9219. "size": {
  9220. "description": "1024x1024, 1536x1024, 1024x1536, auto, 256x256, 512x512, 1792x1024, 1024x1792",
  9221. "type": "string"
  9222. },
  9223. "style": {
  9224. "description": "vivid, natural",
  9225. "type": "string"
  9226. },
  9227. "user": {
  9228. "type": "string"
  9229. }
  9230. }
  9231. },
  9232. "model.ImageResponse": {
  9233. "type": "object",
  9234. "properties": {
  9235. "created": {
  9236. "type": "integer"
  9237. },
  9238. "data": {
  9239. "type": "array",
  9240. "items": {
  9241. "$ref": "#/definitions/model.ImageData"
  9242. }
  9243. },
  9244. "usage": {
  9245. "description": "For gpt-image-1 only, the token usage information for the image generation.",
  9246. "allOf": [
  9247. {
  9248. "$ref": "#/definitions/model.ImageUsage"
  9249. }
  9250. ]
  9251. }
  9252. }
  9253. },
  9254. "model.ImageUsage": {
  9255. "type": "object",
  9256. "properties": {
  9257. "input_tokens": {
  9258. "description": "The number of tokens (images and text) in the input prompt.",
  9259. "type": "integer"
  9260. },
  9261. "input_tokens_details": {
  9262. "description": "The input tokens detailed information for the image generation.",
  9263. "allOf": [
  9264. {
  9265. "$ref": "#/definitions/model.ImageInputTokensDetails"
  9266. }
  9267. ]
  9268. },
  9269. "output_tokens": {
  9270. "description": "The number of image tokens in the output image.",
  9271. "type": "integer"
  9272. },
  9273. "total_tokens": {
  9274. "description": "The total number of tokens (images and text) used for the image generation.",
  9275. "type": "integer"
  9276. }
  9277. }
  9278. },
  9279. "model.JSONSchema": {
  9280. "type": "object",
  9281. "properties": {
  9282. "description": {
  9283. "type": "string"
  9284. },
  9285. "name": {
  9286. "type": "string"
  9287. },
  9288. "schema": {
  9289. "type": "object",
  9290. "additionalProperties": true
  9291. },
  9292. "strict": {
  9293. "type": "boolean"
  9294. }
  9295. }
  9296. },
  9297. "model.Log": {
  9298. "type": "object",
  9299. "properties": {
  9300. "channel": {
  9301. "type": "integer"
  9302. },
  9303. "code": {
  9304. "type": "integer"
  9305. },
  9306. "content": {
  9307. "type": "string"
  9308. },
  9309. "created_at": {
  9310. "type": "string"
  9311. },
  9312. "endpoint": {
  9313. "type": "string"
  9314. },
  9315. "group": {
  9316. "type": "string"
  9317. },
  9318. "id": {
  9319. "type": "integer"
  9320. },
  9321. "ip": {
  9322. "type": "string"
  9323. },
  9324. "metadata": {
  9325. "type": "object",
  9326. "additionalProperties": {
  9327. "type": "string"
  9328. }
  9329. },
  9330. "mode": {
  9331. "type": "integer"
  9332. },
  9333. "model": {
  9334. "type": "string"
  9335. },
  9336. "price": {
  9337. "$ref": "#/definitions/model.Price"
  9338. },
  9339. "request_at": {
  9340. "type": "string"
  9341. },
  9342. "request_detail": {
  9343. "$ref": "#/definitions/model.RequestDetail"
  9344. },
  9345. "request_id": {
  9346. "type": "string"
  9347. },
  9348. "retry_at": {
  9349. "type": "string"
  9350. },
  9351. "retry_times": {
  9352. "type": "integer"
  9353. },
  9354. "token_id": {
  9355. "type": "integer"
  9356. },
  9357. "token_name": {
  9358. "type": "string"
  9359. },
  9360. "ttfb_milliseconds": {
  9361. "type": "integer"
  9362. },
  9363. "usage": {
  9364. "$ref": "#/definitions/github_com_labring_aiproxy_core_model.Usage"
  9365. },
  9366. "used_amount": {
  9367. "type": "number"
  9368. },
  9369. "user": {
  9370. "description": "https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids",
  9371. "type": "string"
  9372. }
  9373. }
  9374. },
  9375. "model.MCPEmbeddingConfig": {
  9376. "type": "object",
  9377. "properties": {
  9378. "init": {
  9379. "type": "object",
  9380. "additionalProperties": {
  9381. "type": "string"
  9382. }
  9383. },
  9384. "reusing": {
  9385. "type": "object",
  9386. "additionalProperties": {
  9387. "$ref": "#/definitions/model.MCPEmbeddingReusingConfig"
  9388. }
  9389. }
  9390. }
  9391. },
  9392. "model.MCPEmbeddingReusingConfig": {
  9393. "type": "object",
  9394. "properties": {
  9395. "description": {
  9396. "type": "string"
  9397. },
  9398. "name": {
  9399. "type": "string"
  9400. },
  9401. "required": {
  9402. "type": "boolean"
  9403. }
  9404. }
  9405. },
  9406. "model.MCPOpenAPIConfig": {
  9407. "type": "object",
  9408. "properties": {
  9409. "authorization": {
  9410. "type": "string"
  9411. },
  9412. "openapi_content": {
  9413. "type": "string"
  9414. },
  9415. "openapi_spec": {
  9416. "type": "string"
  9417. },
  9418. "server_addr": {
  9419. "type": "string"
  9420. },
  9421. "v2": {
  9422. "type": "boolean"
  9423. }
  9424. }
  9425. },
  9426. "model.MCPPrice": {
  9427. "type": "object",
  9428. "properties": {
  9429. "default_tools_call_price": {
  9430. "type": "number"
  9431. },
  9432. "tools_call_prices": {
  9433. "type": "object",
  9434. "additionalProperties": {
  9435. "type": "number"
  9436. }
  9437. }
  9438. }
  9439. },
  9440. "model.Message": {
  9441. "type": "object",
  9442. "properties": {
  9443. "content": {},
  9444. "name": {
  9445. "type": "string"
  9446. },
  9447. "reasoning_content": {
  9448. "type": "string"
  9449. },
  9450. "role": {
  9451. "type": "string"
  9452. },
  9453. "tool_call_id": {
  9454. "type": "string"
  9455. },
  9456. "tool_calls": {
  9457. "type": "array",
  9458. "items": {
  9459. "$ref": "#/definitions/model.Tool"
  9460. }
  9461. }
  9462. }
  9463. },
  9464. "model.ModelConfig": {
  9465. "type": "object",
  9466. "properties": {
  9467. "config": {
  9468. "type": "object",
  9469. "additionalProperties": {}
  9470. },
  9471. "created_at": {
  9472. "type": "string"
  9473. },
  9474. "exclude_from_tests": {
  9475. "type": "boolean"
  9476. },
  9477. "image_prices": {
  9478. "description": "map[size]price_per_image",
  9479. "type": "object",
  9480. "additionalProperties": {
  9481. "type": "number"
  9482. }
  9483. },
  9484. "image_quality_prices": {
  9485. "description": "map[size]map[quality]price_per_image",
  9486. "type": "object",
  9487. "additionalProperties": {
  9488. "type": "object",
  9489. "additionalProperties": {
  9490. "type": "number"
  9491. }
  9492. }
  9493. },
  9494. "model": {
  9495. "type": "string"
  9496. },
  9497. "owner": {
  9498. "$ref": "#/definitions/model.ModelOwner"
  9499. },
  9500. "price": {
  9501. "$ref": "#/definitions/model.Price"
  9502. },
  9503. "retry_times": {
  9504. "type": "integer"
  9505. },
  9506. "rpm": {
  9507. "type": "integer"
  9508. },
  9509. "tpm": {
  9510. "type": "integer"
  9511. },
  9512. "type": {
  9513. "$ref": "#/definitions/mode.Mode"
  9514. },
  9515. "updated_at": {
  9516. "type": "string"
  9517. }
  9518. }
  9519. },
  9520. "model.ModelOwner": {
  9521. "type": "string",
  9522. "enum": [
  9523. "openai",
  9524. "alibaba",
  9525. "tencent",
  9526. "xunfei",
  9527. "deepseek",
  9528. "moonshot",
  9529. "minimax",
  9530. "baidu",
  9531. "google",
  9532. "baai",
  9533. "funaudiollm",
  9534. "doubao",
  9535. "fishaudio",
  9536. "chatglm",
  9537. "stabilityai",
  9538. "netease",
  9539. "ai360",
  9540. "anthropic",
  9541. "meta",
  9542. "baichuan",
  9543. "mistral",
  9544. "openchat",
  9545. "microsoft",
  9546. "defog",
  9547. "nexusflow",
  9548. "cohere",
  9549. "huggingface",
  9550. "lingyiwanwu",
  9551. "stepfun",
  9552. "xai",
  9553. "doc2x",
  9554. "jina"
  9555. ],
  9556. "x-enum-varnames": [
  9557. "ModelOwnerOpenAI",
  9558. "ModelOwnerAlibaba",
  9559. "ModelOwnerTencent",
  9560. "ModelOwnerXunfei",
  9561. "ModelOwnerDeepSeek",
  9562. "ModelOwnerMoonshot",
  9563. "ModelOwnerMiniMax",
  9564. "ModelOwnerBaidu",
  9565. "ModelOwnerGoogle",
  9566. "ModelOwnerBAAI",
  9567. "ModelOwnerFunAudioLLM",
  9568. "ModelOwnerDoubao",
  9569. "ModelOwnerFishAudio",
  9570. "ModelOwnerChatGLM",
  9571. "ModelOwnerStabilityAI",
  9572. "ModelOwnerNetease",
  9573. "ModelOwnerAI360",
  9574. "ModelOwnerAnthropic",
  9575. "ModelOwnerMeta",
  9576. "ModelOwnerBaichuan",
  9577. "ModelOwnerMistral",
  9578. "ModelOwnerOpenChat",
  9579. "ModelOwnerMicrosoft",
  9580. "ModelOwnerDefog",
  9581. "ModelOwnerNexusFlow",
  9582. "ModelOwnerCohere",
  9583. "ModelOwnerHuggingFace",
  9584. "ModelOwnerLingyiWanwu",
  9585. "ModelOwnerStepFun",
  9586. "ModelOwnerXAI",
  9587. "ModelOwnerDoc2x",
  9588. "ModelOwnerJina"
  9589. ]
  9590. },
  9591. "model.Option": {
  9592. "type": "object",
  9593. "properties": {
  9594. "key": {
  9595. "type": "string"
  9596. },
  9597. "value": {
  9598. "type": "string"
  9599. }
  9600. }
  9601. },
  9602. "model.ParamType": {
  9603. "type": "string",
  9604. "enum": [
  9605. "header",
  9606. "query"
  9607. ],
  9608. "x-enum-varnames": [
  9609. "ParamTypeHeader",
  9610. "ParamTypeQuery"
  9611. ]
  9612. },
  9613. "model.ParsePdfResponse": {
  9614. "type": "object",
  9615. "properties": {
  9616. "markdown": {
  9617. "type": "string"
  9618. },
  9619. "pages": {
  9620. "type": "integer"
  9621. }
  9622. }
  9623. },
  9624. "model.Price": {
  9625. "type": "object",
  9626. "properties": {
  9627. "cache_creation_price": {
  9628. "type": "number"
  9629. },
  9630. "cache_creation_price_unit": {
  9631. "type": "integer"
  9632. },
  9633. "cached_price": {
  9634. "type": "number"
  9635. },
  9636. "cached_price_unit": {
  9637. "type": "integer"
  9638. },
  9639. "image_input_price": {
  9640. "type": "number"
  9641. },
  9642. "image_input_price_unit": {
  9643. "type": "integer"
  9644. },
  9645. "input_price": {
  9646. "type": "number"
  9647. },
  9648. "input_price_unit": {
  9649. "type": "integer"
  9650. },
  9651. "output_price": {
  9652. "type": "number"
  9653. },
  9654. "output_price_unit": {
  9655. "type": "integer"
  9656. },
  9657. "per_request_price": {
  9658. "type": "number"
  9659. },
  9660. "thinking_mode_output_price": {
  9661. "description": "when ThinkingModeOutputPrice and ReasoningTokens are not 0, OutputPrice and OutputPriceUnit will be overwritten",
  9662. "type": "number"
  9663. },
  9664. "thinking_mode_output_price_unit": {
  9665. "type": "integer"
  9666. },
  9667. "web_search_price": {
  9668. "type": "number"
  9669. },
  9670. "web_search_price_unit": {
  9671. "type": "integer"
  9672. }
  9673. }
  9674. },
  9675. "model.PromptTokensDetails": {
  9676. "type": "object",
  9677. "properties": {
  9678. "audio_tokens": {
  9679. "type": "integer"
  9680. },
  9681. "cache_creation_tokens": {
  9682. "type": "integer"
  9683. },
  9684. "cached_tokens": {
  9685. "type": "integer"
  9686. }
  9687. }
  9688. },
  9689. "model.PublicMCP": {
  9690. "type": "object",
  9691. "properties": {
  9692. "created_at": {
  9693. "type": "string"
  9694. },
  9695. "embed_config": {
  9696. "$ref": "#/definitions/model.MCPEmbeddingConfig"
  9697. },
  9698. "id": {
  9699. "type": "string"
  9700. },
  9701. "logo_url": {
  9702. "type": "string"
  9703. },
  9704. "name": {
  9705. "type": "string"
  9706. },
  9707. "openapi_config": {
  9708. "$ref": "#/definitions/model.MCPOpenAPIConfig"
  9709. },
  9710. "price": {
  9711. "$ref": "#/definitions/model.MCPPrice"
  9712. },
  9713. "proxy_config": {
  9714. "$ref": "#/definitions/model.PublicMCPProxyConfig"
  9715. },
  9716. "readme": {
  9717. "type": "string"
  9718. },
  9719. "readme_url": {
  9720. "type": "string"
  9721. },
  9722. "repo_url": {
  9723. "type": "string"
  9724. },
  9725. "status": {
  9726. "$ref": "#/definitions/model.PublicMCPStatus"
  9727. },
  9728. "tags": {
  9729. "type": "array",
  9730. "items": {
  9731. "type": "string"
  9732. }
  9733. },
  9734. "type": {
  9735. "$ref": "#/definitions/model.PublicMCPType"
  9736. },
  9737. "update_at": {
  9738. "type": "string"
  9739. }
  9740. }
  9741. },
  9742. "model.PublicMCPProxyConfig": {
  9743. "type": "object",
  9744. "properties": {
  9745. "headers": {
  9746. "type": "object",
  9747. "additionalProperties": {
  9748. "type": "string"
  9749. }
  9750. },
  9751. "querys": {
  9752. "type": "object",
  9753. "additionalProperties": {
  9754. "type": "string"
  9755. }
  9756. },
  9757. "reusing_params": {
  9758. "type": "object",
  9759. "additionalProperties": {
  9760. "$ref": "#/definitions/model.ReusingParam"
  9761. }
  9762. },
  9763. "url": {
  9764. "type": "string"
  9765. }
  9766. }
  9767. },
  9768. "model.PublicMCPReusingParam": {
  9769. "type": "object",
  9770. "properties": {
  9771. "created_at": {
  9772. "type": "string"
  9773. },
  9774. "group_id": {
  9775. "type": "string"
  9776. },
  9777. "mcp_id": {
  9778. "type": "string"
  9779. },
  9780. "reusing_params": {
  9781. "type": "object",
  9782. "additionalProperties": {
  9783. "type": "string"
  9784. }
  9785. },
  9786. "update_at": {
  9787. "type": "string"
  9788. }
  9789. }
  9790. },
  9791. "model.PublicMCPStatus": {
  9792. "type": "integer",
  9793. "enum": [
  9794. 1,
  9795. 2
  9796. ],
  9797. "x-enum-varnames": [
  9798. "PublicMCPStatusEnabled",
  9799. "PublicMCPStatusDisabled"
  9800. ]
  9801. },
  9802. "model.PublicMCPType": {
  9803. "type": "string",
  9804. "enum": [
  9805. "mcp_proxy_sse",
  9806. "mcp_proxy_streamable",
  9807. "mcp_git_repo",
  9808. "mcp_openapi",
  9809. "mcp_embed"
  9810. ],
  9811. "x-enum-comments": {
  9812. "PublicMCPTypeGitRepo": "read only"
  9813. },
  9814. "x-enum-varnames": [
  9815. "PublicMCPTypeProxySSE",
  9816. "PublicMCPTypeProxyStreamable",
  9817. "PublicMCPTypeGitRepo",
  9818. "PublicMCPTypeOpenAPI",
  9819. "PublicMCPTypeEmbed"
  9820. ]
  9821. },
  9822. "model.RequestDetail": {
  9823. "type": "object",
  9824. "properties": {
  9825. "id": {
  9826. "type": "integer"
  9827. },
  9828. "log_id": {
  9829. "type": "integer"
  9830. },
  9831. "request_body": {
  9832. "type": "string"
  9833. },
  9834. "request_body_truncated": {
  9835. "type": "boolean"
  9836. },
  9837. "response_body": {
  9838. "type": "string"
  9839. },
  9840. "response_body_truncated": {
  9841. "type": "boolean"
  9842. }
  9843. }
  9844. },
  9845. "model.RerankMeta": {
  9846. "type": "object",
  9847. "properties": {
  9848. "model": {
  9849. "type": "string"
  9850. },
  9851. "tokens": {
  9852. "$ref": "#/definitions/model.RerankMetaTokens"
  9853. }
  9854. }
  9855. },
  9856. "model.RerankMetaTokens": {
  9857. "type": "object",
  9858. "properties": {
  9859. "input_tokens": {
  9860. "type": "integer"
  9861. },
  9862. "output_tokens": {
  9863. "type": "integer"
  9864. }
  9865. }
  9866. },
  9867. "model.RerankRequest": {
  9868. "type": "object",
  9869. "properties": {
  9870. "documents": {
  9871. "type": "array",
  9872. "items": {
  9873. "type": "string"
  9874. }
  9875. },
  9876. "max_chunks_per_doc": {
  9877. "type": "integer"
  9878. },
  9879. "model": {
  9880. "type": "string"
  9881. },
  9882. "overlap_tokens": {
  9883. "type": "integer"
  9884. },
  9885. "query": {
  9886. "type": "string"
  9887. },
  9888. "return_documents": {
  9889. "type": "boolean"
  9890. },
  9891. "top_n": {
  9892. "type": "integer"
  9893. }
  9894. }
  9895. },
  9896. "model.RerankResponse": {
  9897. "type": "object",
  9898. "properties": {
  9899. "id": {
  9900. "type": "string"
  9901. },
  9902. "meta": {
  9903. "$ref": "#/definitions/model.RerankMeta"
  9904. },
  9905. "results": {
  9906. "type": "array",
  9907. "items": {
  9908. "$ref": "#/definitions/model.RerankResult"
  9909. }
  9910. }
  9911. }
  9912. },
  9913. "model.RerankResult": {
  9914. "type": "object",
  9915. "properties": {
  9916. "document": {
  9917. "$ref": "#/definitions/model.Document"
  9918. },
  9919. "index": {
  9920. "type": "integer"
  9921. },
  9922. "relevance_score": {
  9923. "type": "number"
  9924. }
  9925. }
  9926. },
  9927. "model.ResponseFormat": {
  9928. "type": "object",
  9929. "properties": {
  9930. "json_schema": {
  9931. "$ref": "#/definitions/model.JSONSchema"
  9932. },
  9933. "type": {
  9934. "type": "string"
  9935. }
  9936. }
  9937. },
  9938. "model.ReusingParam": {
  9939. "type": "object",
  9940. "properties": {
  9941. "description": {
  9942. "type": "string"
  9943. },
  9944. "name": {
  9945. "type": "string"
  9946. },
  9947. "required": {
  9948. "type": "boolean"
  9949. },
  9950. "type": {
  9951. "$ref": "#/definitions/model.ParamType"
  9952. }
  9953. }
  9954. },
  9955. "model.StreamOptions": {
  9956. "type": "object",
  9957. "properties": {
  9958. "include_usage": {
  9959. "type": "boolean"
  9960. }
  9961. }
  9962. },
  9963. "model.SttJSONResponse": {
  9964. "type": "object",
  9965. "properties": {
  9966. "text": {
  9967. "type": "string"
  9968. }
  9969. }
  9970. },
  9971. "model.TextResponse": {
  9972. "type": "object",
  9973. "properties": {
  9974. "choices": {
  9975. "type": "array",
  9976. "items": {
  9977. "$ref": "#/definitions/model.TextResponseChoice"
  9978. }
  9979. },
  9980. "created": {
  9981. "type": "integer"
  9982. },
  9983. "id": {
  9984. "type": "string"
  9985. },
  9986. "model": {
  9987. "type": "string"
  9988. },
  9989. "object": {
  9990. "type": "string"
  9991. },
  9992. "usage": {
  9993. "$ref": "#/definitions/github_com_labring_aiproxy_core_relay_model.Usage"
  9994. }
  9995. }
  9996. },
  9997. "model.TextResponseChoice": {
  9998. "type": "object",
  9999. "properties": {
  10000. "finish_reason": {
  10001. "$ref": "#/definitions/model.FinishReason"
  10002. },
  10003. "index": {
  10004. "type": "integer"
  10005. },
  10006. "message": {
  10007. "$ref": "#/definitions/model.Message"
  10008. },
  10009. "text": {
  10010. "type": "string"
  10011. }
  10012. }
  10013. },
  10014. "model.TextToSpeechRequest": {
  10015. "type": "object",
  10016. "required": [
  10017. "input",
  10018. "model",
  10019. "voice"
  10020. ],
  10021. "properties": {
  10022. "input": {
  10023. "type": "string"
  10024. },
  10025. "model": {
  10026. "type": "string"
  10027. },
  10028. "response_format": {
  10029. "type": "string"
  10030. },
  10031. "speed": {
  10032. "type": "number"
  10033. },
  10034. "voice": {
  10035. "type": "string"
  10036. }
  10037. }
  10038. },
  10039. "model.Tool": {
  10040. "type": "object",
  10041. "properties": {
  10042. "function": {
  10043. "$ref": "#/definitions/model.Function"
  10044. },
  10045. "id": {
  10046. "type": "string"
  10047. },
  10048. "type": {
  10049. "type": "string"
  10050. }
  10051. }
  10052. },
  10053. "openai.SubscriptionResponse": {
  10054. "type": "object",
  10055. "properties": {
  10056. "access_until": {
  10057. "type": "integer"
  10058. },
  10059. "hard_limit_usd": {
  10060. "type": "number"
  10061. },
  10062. "has_payment_method": {
  10063. "type": "boolean"
  10064. },
  10065. "object": {
  10066. "type": "string"
  10067. },
  10068. "soft_limit_usd": {
  10069. "type": "number"
  10070. },
  10071. "system_hard_limit_usd": {
  10072. "type": "number"
  10073. }
  10074. }
  10075. },
  10076. "openai.UsageResponse": {
  10077. "type": "object",
  10078. "properties": {
  10079. "object": {
  10080. "type": "string"
  10081. },
  10082. "total_usage": {
  10083. "description": "DailyCosts []OpenAIUsageDailyCost ` + "`" + `json:\"daily_costs\"` + "`" + `",
  10084. "type": "number"
  10085. }
  10086. }
  10087. }
  10088. },
  10089. "securityDefinitions": {
  10090. "ApiKeyAuth": {
  10091. "type": "apiKey",
  10092. "name": "Authorization",
  10093. "in": "header"
  10094. }
  10095. }
  10096. }`
  10097. // SwaggerInfo holds exported Swagger Info so clients can modify it
  10098. var SwaggerInfo = &swag.Spec{
  10099. Version: "1.0",
  10100. Host: "",
  10101. BasePath: "",
  10102. Schemes: []string{},
  10103. Title: "AI Proxy Swagger API",
  10104. Description: "",
  10105. InfoInstanceName: "swagger",
  10106. SwaggerTemplate: docTemplate,
  10107. LeftDelim: "{{",
  10108. RightDelim: "}}",
  10109. }
  10110. func init() {
  10111. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  10112. }