swagger.json 347 KB

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