docs.go 392 KB

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