swagger.json 391 KB

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