docs.go 426 KB

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