swagger.yaml 163 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768
  1. definitions:
  2. adaptor.ConfigTemplate:
  3. properties:
  4. description:
  5. type: string
  6. example: {}
  7. name:
  8. type: string
  9. required:
  10. type: boolean
  11. type:
  12. $ref: '#/definitions/adaptor.ConfigType'
  13. type: object
  14. adaptor.ConfigTemplates:
  15. additionalProperties:
  16. $ref: '#/definitions/adaptor.ConfigTemplate'
  17. type: object
  18. adaptor.ConfigType:
  19. enum:
  20. - string
  21. - number
  22. - bool
  23. - object
  24. type: string
  25. x-enum-varnames:
  26. - ConfigTypeString
  27. - ConfigTypeNumber
  28. - ConfigTypeBool
  29. - ConfigTypeObject
  30. adaptors.AdaptorMeta:
  31. properties:
  32. config:
  33. $ref: '#/definitions/adaptor.ConfigTemplates'
  34. defaultBaseUrl:
  35. type: string
  36. fetures:
  37. items:
  38. type: string
  39. type: array
  40. keyHelp:
  41. type: string
  42. name:
  43. type: string
  44. type: object
  45. controller.AddChannelRequest:
  46. properties:
  47. base_url:
  48. type: string
  49. config:
  50. $ref: '#/definitions/model.ChannelConfig'
  51. key:
  52. type: string
  53. model_mapping:
  54. additionalProperties:
  55. type: string
  56. type: object
  57. models:
  58. items:
  59. type: string
  60. type: array
  61. name:
  62. type: string
  63. priority:
  64. type: integer
  65. sets:
  66. items:
  67. type: string
  68. type: array
  69. status:
  70. type: integer
  71. type:
  72. $ref: '#/definitions/model.ChannelType'
  73. type: object
  74. controller.AddTokenRequest:
  75. properties:
  76. expiredAt:
  77. type: integer
  78. models:
  79. items:
  80. type: string
  81. type: array
  82. name:
  83. type: string
  84. quota:
  85. type: number
  86. subnets:
  87. items:
  88. type: string
  89. type: array
  90. type: object
  91. controller.BuiltinModelConfig:
  92. properties:
  93. config:
  94. additionalProperties: {}
  95. type: object
  96. created_at:
  97. type: string
  98. exclude_from_tests:
  99. type: boolean
  100. force_save_detail:
  101. type: boolean
  102. image_prices:
  103. additionalProperties:
  104. type: number
  105. description: map[size]price_per_image
  106. type: object
  107. image_quality_prices:
  108. additionalProperties:
  109. additionalProperties:
  110. type: number
  111. type: object
  112. description: map[size]map[quality]price_per_image
  113. type: object
  114. max_error_rate:
  115. type: number
  116. model:
  117. type: string
  118. owner:
  119. $ref: '#/definitions/model.ModelOwner'
  120. plugin:
  121. additionalProperties:
  122. items:
  123. type: integer
  124. type: array
  125. type: object
  126. price:
  127. $ref: '#/definitions/model.Price'
  128. retry_times:
  129. type: integer
  130. rpm:
  131. type: integer
  132. timeout:
  133. type: integer
  134. tpm:
  135. type: integer
  136. type:
  137. $ref: '#/definitions/mode.Mode'
  138. updated_at:
  139. type: string
  140. type: object
  141. controller.CreateGroupRequest:
  142. properties:
  143. available_sets:
  144. items:
  145. type: string
  146. type: array
  147. balance_alert_enabled:
  148. type: boolean
  149. balance_alert_threshold:
  150. type: number
  151. rpm_ratio:
  152. type: number
  153. tpm_ratio:
  154. type: number
  155. type: object
  156. controller.EmbedMCP:
  157. properties:
  158. config_templates:
  159. $ref: '#/definitions/controller.EmbedMCPConfigTemplates'
  160. enabled:
  161. type: boolean
  162. github_url:
  163. type: string
  164. id:
  165. type: string
  166. name:
  167. type: string
  168. readme:
  169. type: string
  170. tags:
  171. items:
  172. type: string
  173. type: array
  174. type: object
  175. controller.EmbedMCPConfigTemplate:
  176. properties:
  177. description:
  178. type: string
  179. example:
  180. type: string
  181. name:
  182. type: string
  183. required:
  184. type: boolean
  185. type: object
  186. controller.EmbedMCPConfigTemplates:
  187. additionalProperties:
  188. $ref: '#/definitions/controller.EmbedMCPConfigTemplate'
  189. type: object
  190. controller.EnabledModelChannel:
  191. properties:
  192. id:
  193. type: integer
  194. name:
  195. type: string
  196. type:
  197. $ref: '#/definitions/model.ChannelType'
  198. type: object
  199. controller.GetModelConfigsByModelsContainsRequest:
  200. properties:
  201. models:
  202. items:
  203. type: string
  204. type: array
  205. type: object
  206. controller.GroupMCPResponse:
  207. properties:
  208. created_at:
  209. type: string
  210. endpoints:
  211. $ref: '#/definitions/controller.MCPEndpoint'
  212. group_id:
  213. type: string
  214. id:
  215. type: string
  216. name:
  217. type: string
  218. openapi_config:
  219. $ref: '#/definitions/model.MCPOpenAPIConfig'
  220. proxy_config:
  221. $ref: '#/definitions/model.GroupMCPProxyConfig'
  222. status:
  223. $ref: '#/definitions/model.GroupMCPStatus'
  224. type:
  225. $ref: '#/definitions/model.GroupMCPType'
  226. update_at:
  227. type: string
  228. type: object
  229. controller.GroupResponse:
  230. properties:
  231. accessed_at:
  232. type: string
  233. available_sets:
  234. items:
  235. type: string
  236. type: array
  237. balance_alert_enabled:
  238. type: boolean
  239. balance_alert_threshold:
  240. type: number
  241. created_at:
  242. type: string
  243. id:
  244. type: string
  245. request_count:
  246. type: integer
  247. rpm_ratio:
  248. type: number
  249. status:
  250. type: integer
  251. tpm_ratio:
  252. type: number
  253. used_amount:
  254. type: number
  255. type: object
  256. controller.ImportChannelFromOneAPIRequest:
  257. properties:
  258. dsn:
  259. type: string
  260. type: object
  261. controller.MCPEndpoint:
  262. properties:
  263. host:
  264. type: string
  265. sse:
  266. type: string
  267. streamable_http:
  268. type: string
  269. type: object
  270. controller.OpenAIModelPermission:
  271. properties:
  272. allow_create_engine:
  273. type: boolean
  274. allow_fine_tuning:
  275. type: boolean
  276. allow_logprobs:
  277. type: boolean
  278. allow_sampling:
  279. type: boolean
  280. allow_search_indices:
  281. type: boolean
  282. allow_view:
  283. type: boolean
  284. created:
  285. type: integer
  286. group:
  287. type: string
  288. id:
  289. type: string
  290. is_blocking:
  291. type: boolean
  292. object:
  293. type: string
  294. organization:
  295. type: string
  296. type: object
  297. controller.OpenAIModels:
  298. properties:
  299. created:
  300. type: integer
  301. id:
  302. type: string
  303. object:
  304. type: string
  305. owned_by:
  306. type: string
  307. parent:
  308. type: string
  309. permission:
  310. items:
  311. $ref: '#/definitions/controller.OpenAIModelPermission'
  312. type: array
  313. root:
  314. type: string
  315. type: object
  316. controller.PublicMCPResponse:
  317. properties:
  318. created_at:
  319. type: string
  320. embed_config:
  321. $ref: '#/definitions/model.MCPEmbeddingConfig'
  322. endpoints:
  323. $ref: '#/definitions/controller.MCPEndpoint'
  324. github_url:
  325. type: string
  326. id:
  327. type: string
  328. logo_url:
  329. type: string
  330. name:
  331. type: string
  332. openapi_config:
  333. $ref: '#/definitions/model.MCPOpenAPIConfig'
  334. price:
  335. $ref: '#/definitions/model.MCPPrice'
  336. proxy_config:
  337. $ref: '#/definitions/model.PublicMCPProxyConfig'
  338. readme:
  339. type: string
  340. readme_url:
  341. type: string
  342. status:
  343. $ref: '#/definitions/model.PublicMCPStatus'
  344. tags:
  345. items:
  346. type: string
  347. type: array
  348. type:
  349. $ref: '#/definitions/model.PublicMCPType'
  350. update_at:
  351. type: string
  352. type: object
  353. controller.SaveEmbedMCPRequest:
  354. properties:
  355. enabled:
  356. type: boolean
  357. id:
  358. type: string
  359. init_config:
  360. additionalProperties:
  361. type: string
  362. type: object
  363. type: object
  364. controller.SaveGroupModelConfigRequest:
  365. properties:
  366. force_save_detail:
  367. type: boolean
  368. image_prices:
  369. additionalProperties:
  370. type: number
  371. type: object
  372. model:
  373. type: string
  374. override_force_save_detail:
  375. type: boolean
  376. override_limit:
  377. type: boolean
  378. override_price:
  379. type: boolean
  380. override_retry_times:
  381. type: boolean
  382. price:
  383. $ref: '#/definitions/model.Price'
  384. retry_times:
  385. type: integer
  386. rpm:
  387. type: integer
  388. tpm:
  389. type: integer
  390. type: object
  391. controller.SaveModelConfigsRequest:
  392. properties:
  393. config:
  394. additionalProperties: {}
  395. type: object
  396. created_at:
  397. type: string
  398. exclude_from_tests:
  399. type: boolean
  400. force_save_detail:
  401. type: boolean
  402. image_prices:
  403. additionalProperties:
  404. type: number
  405. description: map[size]price_per_image
  406. type: object
  407. image_quality_prices:
  408. additionalProperties:
  409. additionalProperties:
  410. type: number
  411. type: object
  412. description: map[size]map[quality]price_per_image
  413. type: object
  414. max_error_rate:
  415. type: number
  416. model:
  417. type: string
  418. owner:
  419. $ref: '#/definitions/model.ModelOwner'
  420. plugin:
  421. additionalProperties:
  422. items:
  423. type: integer
  424. type: array
  425. type: object
  426. price:
  427. $ref: '#/definitions/model.Price'
  428. retry_times:
  429. type: integer
  430. rpm:
  431. type: integer
  432. timeout:
  433. type: integer
  434. tpm:
  435. type: integer
  436. type:
  437. $ref: '#/definitions/mode.Mode'
  438. updated_at:
  439. type: string
  440. type: object
  441. controller.StatusData:
  442. properties:
  443. startTime:
  444. type: integer
  445. type: object
  446. controller.TestResult:
  447. properties:
  448. data:
  449. $ref: '#/definitions/model.ChannelTest'
  450. message:
  451. type: string
  452. success:
  453. type: boolean
  454. type: object
  455. controller.TokenResponse:
  456. properties:
  457. accessed_at:
  458. type: string
  459. created_at:
  460. type: string
  461. expired_at:
  462. type: string
  463. group:
  464. type: string
  465. id:
  466. type: integer
  467. key:
  468. type: string
  469. models:
  470. items:
  471. type: string
  472. type: array
  473. name:
  474. type: string
  475. quota:
  476. type: number
  477. request_count:
  478. type: integer
  479. status:
  480. type: integer
  481. subnets:
  482. items:
  483. type: string
  484. type: array
  485. used_amount:
  486. type: number
  487. type: object
  488. controller.UpdateChannelStatusRequest:
  489. properties:
  490. status:
  491. type: integer
  492. type: object
  493. controller.UpdateGroupMCPStatusRequest:
  494. properties:
  495. status:
  496. $ref: '#/definitions/model.GroupMCPStatus'
  497. type: object
  498. controller.UpdateGroupRPMRatioRequest:
  499. properties:
  500. rpm_ratio:
  501. type: number
  502. type: object
  503. controller.UpdateGroupStatusRequest:
  504. properties:
  505. status:
  506. type: integer
  507. type: object
  508. controller.UpdateGroupTPMRatioRequest:
  509. properties:
  510. tpm_ratio:
  511. type: number
  512. type: object
  513. controller.UpdateGroupsStatusRequest:
  514. properties:
  515. groups:
  516. items:
  517. type: string
  518. type: array
  519. status:
  520. type: integer
  521. type: object
  522. controller.UpdatePublicMCPStatusRequest:
  523. properties:
  524. status:
  525. $ref: '#/definitions/model.PublicMCPStatus'
  526. type: object
  527. controller.UpdateTokenNameRequest:
  528. properties:
  529. name:
  530. type: string
  531. type: object
  532. controller.UpdateTokenStatusRequest:
  533. properties:
  534. status:
  535. type: integer
  536. type: object
  537. github_com_labring_aiproxy_core_model.Usage:
  538. properties:
  539. cache_creation_tokens:
  540. type: integer
  541. cached_tokens:
  542. type: integer
  543. image_input_tokens:
  544. type: integer
  545. input_tokens:
  546. type: integer
  547. output_tokens:
  548. type: integer
  549. reasoning_tokens:
  550. type: integer
  551. total_tokens:
  552. type: integer
  553. web_search_count:
  554. type: integer
  555. type: object
  556. github_com_labring_aiproxy_core_relay_model.Usage:
  557. properties:
  558. completion_tokens:
  559. type: integer
  560. completion_tokens_details:
  561. $ref: '#/definitions/model.CompletionTokensDetails'
  562. prompt_tokens:
  563. type: integer
  564. prompt_tokens_details:
  565. $ref: '#/definitions/model.PromptTokensDetails'
  566. total_tokens:
  567. type: integer
  568. web_search_count:
  569. type: integer
  570. type: object
  571. middleware.APIResponse:
  572. properties:
  573. data: {}
  574. message:
  575. type: string
  576. success:
  577. type: boolean
  578. type: object
  579. mode.Mode:
  580. enum:
  581. - 0
  582. - 1
  583. - 2
  584. - 3
  585. - 4
  586. - 5
  587. - 6
  588. - 7
  589. - 8
  590. - 9
  591. - 10
  592. - 11
  593. - 12
  594. - 13
  595. - 14
  596. - 15
  597. type: integer
  598. x-enum-varnames:
  599. - Unknown
  600. - ChatCompletions
  601. - Completions
  602. - Embeddings
  603. - Moderations
  604. - ImagesGenerations
  605. - ImagesEdits
  606. - AudioSpeech
  607. - AudioTranscription
  608. - AudioTranslation
  609. - Rerank
  610. - ParsePdf
  611. - Anthropic
  612. - VideoGenerationsJobs
  613. - VideoGenerationsGetJobs
  614. - VideoGenerationsContent
  615. model.AnthropicMessageRequest:
  616. properties:
  617. messages:
  618. items:
  619. $ref: '#/definitions/model.Message'
  620. type: array
  621. model:
  622. type: string
  623. type: object
  624. model.Channel:
  625. properties:
  626. balance:
  627. type: number
  628. balance_threshold:
  629. type: number
  630. balance_updated_at:
  631. type: string
  632. base_url:
  633. type: string
  634. channel_tests:
  635. items:
  636. $ref: '#/definitions/model.ChannelTest'
  637. type: array
  638. config:
  639. $ref: '#/definitions/model.ChannelConfig'
  640. created_at:
  641. type: string
  642. enabled_auto_balance_check:
  643. type: boolean
  644. id:
  645. type: integer
  646. key:
  647. type: string
  648. last_test_error_at:
  649. type: string
  650. model_mapping:
  651. additionalProperties:
  652. type: string
  653. type: object
  654. models:
  655. items:
  656. type: string
  657. type: array
  658. name:
  659. type: string
  660. priority:
  661. type: integer
  662. request_count:
  663. type: integer
  664. sets:
  665. items:
  666. type: string
  667. type: array
  668. status:
  669. type: integer
  670. type:
  671. $ref: '#/definitions/model.ChannelType'
  672. used_amount:
  673. type: number
  674. type: object
  675. model.ChannelConfig:
  676. properties:
  677. spec:
  678. items:
  679. type: integer
  680. type: array
  681. type: object
  682. model.ChannelTest:
  683. properties:
  684. actual_model:
  685. type: string
  686. channel_id:
  687. type: integer
  688. channel_name:
  689. type: string
  690. channel_type:
  691. $ref: '#/definitions/model.ChannelType'
  692. code:
  693. type: integer
  694. mode:
  695. $ref: '#/definitions/mode.Mode'
  696. model:
  697. type: string
  698. response:
  699. type: string
  700. success:
  701. type: boolean
  702. test_at:
  703. type: string
  704. took:
  705. type: number
  706. type: object
  707. model.ChannelType:
  708. enum:
  709. - 1
  710. - 3
  711. - 4
  712. - 12
  713. - 13
  714. - 14
  715. - 15
  716. - 16
  717. - 17
  718. - 18
  719. - 19
  720. - 20
  721. - 23
  722. - 24
  723. - 25
  724. - 26
  725. - 27
  726. - 28
  727. - 29
  728. - 30
  729. - 31
  730. - 32
  731. - 33
  732. - 34
  733. - 35
  734. - 36
  735. - 37
  736. - 40
  737. - 41
  738. - 42
  739. - 43
  740. - 44
  741. - 45
  742. - 46
  743. - 47
  744. - 48
  745. type: integer
  746. x-enum-varnames:
  747. - ChannelTypeOpenAI
  748. - ChannelTypeAzure
  749. - ChannelTypeAzure2
  750. - ChannelTypeGoogleGeminiOpenAI
  751. - ChannelTypeBaiduV2
  752. - ChannelTypeAnthropic
  753. - ChannelTypeBaidu
  754. - ChannelTypeZhipu
  755. - ChannelTypeAli
  756. - ChannelTypeXunfei
  757. - ChannelTypeAI360
  758. - ChannelTypeOpenRouter
  759. - ChannelTypeTencent
  760. - ChannelTypeGoogleGemini
  761. - ChannelTypeMoonshot
  762. - ChannelTypeBaichuan
  763. - ChannelTypeMinimax
  764. - ChannelTypeMistral
  765. - ChannelTypeGroq
  766. - ChannelTypeOllama
  767. - ChannelTypeLingyiwanwu
  768. - ChannelTypeStepfun
  769. - ChannelTypeAWS
  770. - ChannelTypeCoze
  771. - ChannelTypeCohere
  772. - ChannelTypeDeepseek
  773. - ChannelTypeCloudflare
  774. - ChannelTypeDoubao
  775. - ChannelTypeNovita
  776. - ChannelTypeVertexAI
  777. - ChannelTypeSiliconflow
  778. - ChannelTypeDoubaoAudio
  779. - ChannelTypeXAI
  780. - ChannelTypeDoc2x
  781. - ChannelTypeJina
  782. - ChannelTypeTextEmbeddingsInference
  783. model.ChartData:
  784. properties:
  785. cache_creation_tokens:
  786. type: integer
  787. cached_tokens:
  788. type: integer
  789. exception_count:
  790. type: integer
  791. input_tokens:
  792. type: integer
  793. max_rpm:
  794. type: integer
  795. max_rps:
  796. type: integer
  797. max_tpm:
  798. type: integer
  799. max_tps:
  800. type: integer
  801. output_tokens:
  802. type: integer
  803. request_count:
  804. type: integer
  805. timestamp:
  806. type: integer
  807. total_tokens:
  808. type: integer
  809. used_amount:
  810. type: number
  811. web_search_count:
  812. type: integer
  813. type: object
  814. model.CompletionTokensDetails:
  815. properties:
  816. accepted_prediction_tokens:
  817. type: integer
  818. audio_tokens:
  819. type: integer
  820. reasoning_tokens:
  821. type: integer
  822. rejected_prediction_tokens:
  823. type: integer
  824. type: object
  825. model.DashboardResponse:
  826. properties:
  827. cache_creation_tokens:
  828. type: integer
  829. cached_tokens:
  830. type: integer
  831. channels:
  832. items:
  833. type: integer
  834. type: array
  835. chart_data:
  836. items:
  837. $ref: '#/definitions/model.ChartData'
  838. type: array
  839. exception_count:
  840. type: integer
  841. input_tokens:
  842. type: integer
  843. max_rpm:
  844. type: integer
  845. max_rps:
  846. type: integer
  847. max_tpm:
  848. type: integer
  849. max_tps:
  850. type: integer
  851. models:
  852. items:
  853. type: string
  854. type: array
  855. output_tokens:
  856. type: integer
  857. rpm:
  858. type: integer
  859. total_count:
  860. type: integer
  861. total_tokens:
  862. type: integer
  863. tpm:
  864. type: integer
  865. used_amount:
  866. type: number
  867. web_search_count:
  868. type: integer
  869. type: object
  870. model.Document:
  871. properties:
  872. text:
  873. type: string
  874. type: object
  875. model.EmbeddingRequest:
  876. properties:
  877. dimensions:
  878. type: integer
  879. encoding_format:
  880. type: string
  881. input:
  882. type: string
  883. model:
  884. type: string
  885. type: object
  886. model.EmbeddingResponse:
  887. properties:
  888. data:
  889. items:
  890. $ref: '#/definitions/model.EmbeddingResponseItem'
  891. type: array
  892. model:
  893. type: string
  894. object:
  895. type: string
  896. usage:
  897. $ref: '#/definitions/github_com_labring_aiproxy_core_relay_model.Usage'
  898. type: object
  899. model.EmbeddingResponseItem:
  900. properties:
  901. embedding:
  902. items:
  903. type: number
  904. type: array
  905. index:
  906. type: integer
  907. object:
  908. type: string
  909. type: object
  910. model.FinishReason:
  911. enum:
  912. - stop
  913. - length
  914. - content_filter
  915. - tool_calls
  916. - function_call
  917. type: string
  918. x-enum-varnames:
  919. - FinishReasonStop
  920. - FinishReasonLength
  921. - FinishReasonContentFilter
  922. - FinishReasonToolCalls
  923. - FinishReasonFunctionCall
  924. model.Function:
  925. properties:
  926. arguments:
  927. type: string
  928. description:
  929. type: string
  930. name:
  931. type: string
  932. parameters: {}
  933. type: object
  934. model.GeneralOpenAIRequest:
  935. properties:
  936. frequency_penalty:
  937. type: number
  938. function_call: {}
  939. functions: {}
  940. input: {}
  941. logit_bias: {}
  942. logprobs:
  943. type: boolean
  944. max_completion_tokens:
  945. type: integer
  946. max_tokens:
  947. type: integer
  948. messages:
  949. items:
  950. $ref: '#/definitions/model.Message'
  951. type: array
  952. metadata: {}
  953. model:
  954. type: string
  955. num_ctx:
  956. type: integer
  957. presence_penalty:
  958. type: number
  959. prompt: {}
  960. response_format:
  961. $ref: '#/definitions/model.ResponseFormat'
  962. seed:
  963. type: number
  964. size:
  965. type: string
  966. stop: {}
  967. stream:
  968. type: boolean
  969. stream_options:
  970. $ref: '#/definitions/model.StreamOptions'
  971. temperature:
  972. type: number
  973. tool_choice: {}
  974. tools:
  975. items:
  976. $ref: '#/definitions/model.Tool'
  977. type: array
  978. top_k:
  979. type: integer
  980. top_logprobs:
  981. type: integer
  982. top_p:
  983. type: number
  984. user:
  985. type: string
  986. type: object
  987. model.GetGroupLogsResult:
  988. properties:
  989. channels:
  990. items:
  991. type: integer
  992. type: array
  993. logs:
  994. items:
  995. $ref: '#/definitions/model.Log'
  996. type: array
  997. models:
  998. items:
  999. type: string
  1000. type: array
  1001. token_names:
  1002. items:
  1003. type: string
  1004. type: array
  1005. total:
  1006. type: integer
  1007. type: object
  1008. model.GetLogsResult:
  1009. properties:
  1010. channels:
  1011. items:
  1012. type: integer
  1013. type: array
  1014. logs:
  1015. items:
  1016. $ref: '#/definitions/model.Log'
  1017. type: array
  1018. total:
  1019. type: integer
  1020. type: object
  1021. model.Group:
  1022. properties:
  1023. available_sets:
  1024. items:
  1025. type: string
  1026. type: array
  1027. balance_alert_enabled:
  1028. type: boolean
  1029. balance_alert_threshold:
  1030. type: number
  1031. created_at:
  1032. type: string
  1033. id:
  1034. type: string
  1035. request_count:
  1036. type: integer
  1037. rpm_ratio:
  1038. type: number
  1039. status:
  1040. type: integer
  1041. tpm_ratio:
  1042. type: number
  1043. used_amount:
  1044. type: number
  1045. type: object
  1046. model.GroupDashboardResponse:
  1047. properties:
  1048. cache_creation_tokens:
  1049. type: integer
  1050. cached_tokens:
  1051. type: integer
  1052. channels:
  1053. items:
  1054. type: integer
  1055. type: array
  1056. chart_data:
  1057. items:
  1058. $ref: '#/definitions/model.ChartData'
  1059. type: array
  1060. exception_count:
  1061. type: integer
  1062. input_tokens:
  1063. type: integer
  1064. max_rpm:
  1065. type: integer
  1066. max_rps:
  1067. type: integer
  1068. max_tpm:
  1069. type: integer
  1070. max_tps:
  1071. type: integer
  1072. models:
  1073. items:
  1074. type: string
  1075. type: array
  1076. output_tokens:
  1077. type: integer
  1078. rpm:
  1079. type: integer
  1080. token_names:
  1081. items:
  1082. type: string
  1083. type: array
  1084. total_count:
  1085. type: integer
  1086. total_tokens:
  1087. type: integer
  1088. tpm:
  1089. type: integer
  1090. used_amount:
  1091. type: number
  1092. web_search_count:
  1093. type: integer
  1094. type: object
  1095. model.GroupMCP:
  1096. properties:
  1097. created_at:
  1098. type: string
  1099. group_id:
  1100. type: string
  1101. id:
  1102. type: string
  1103. name:
  1104. type: string
  1105. openapi_config:
  1106. $ref: '#/definitions/model.MCPOpenAPIConfig'
  1107. proxy_config:
  1108. $ref: '#/definitions/model.GroupMCPProxyConfig'
  1109. status:
  1110. $ref: '#/definitions/model.GroupMCPStatus'
  1111. type:
  1112. $ref: '#/definitions/model.GroupMCPType'
  1113. update_at:
  1114. type: string
  1115. type: object
  1116. model.GroupMCPProxyConfig:
  1117. properties:
  1118. headers:
  1119. additionalProperties:
  1120. type: string
  1121. type: object
  1122. querys:
  1123. additionalProperties:
  1124. type: string
  1125. type: object
  1126. url:
  1127. type: string
  1128. type: object
  1129. model.GroupMCPStatus:
  1130. enum:
  1131. - 1
  1132. - 2
  1133. type: integer
  1134. x-enum-varnames:
  1135. - GroupMCPStatusEnabled
  1136. - GroupMCPStatusDisabled
  1137. model.GroupMCPType:
  1138. enum:
  1139. - mcp_proxy_sse
  1140. - mcp_proxy_streamable
  1141. - mcp_openapi
  1142. type: string
  1143. x-enum-varnames:
  1144. - GroupMCPTypeProxySSE
  1145. - GroupMCPTypeProxyStreamable
  1146. - GroupMCPTypeOpenAPI
  1147. model.GroupModelConfig:
  1148. properties:
  1149. force_save_detail:
  1150. type: boolean
  1151. group_id:
  1152. type: string
  1153. image_prices:
  1154. additionalProperties:
  1155. type: number
  1156. type: object
  1157. model:
  1158. type: string
  1159. override_force_save_detail:
  1160. type: boolean
  1161. override_limit:
  1162. type: boolean
  1163. override_price:
  1164. type: boolean
  1165. override_retry_times:
  1166. type: boolean
  1167. price:
  1168. $ref: '#/definitions/model.Price'
  1169. retry_times:
  1170. type: integer
  1171. rpm:
  1172. type: integer
  1173. tpm:
  1174. type: integer
  1175. type: object
  1176. model.ImageData:
  1177. properties:
  1178. b64_json:
  1179. type: string
  1180. revised_prompt:
  1181. type: string
  1182. url:
  1183. type: string
  1184. type: object
  1185. model.ImageInputTokensDetails:
  1186. properties:
  1187. image_tokens:
  1188. description: The number of image tokens in the input prompt.
  1189. type: integer
  1190. text_tokens:
  1191. description: The number of text tokens in the input prompt.
  1192. type: integer
  1193. type: object
  1194. model.ImageRequest:
  1195. properties:
  1196. background:
  1197. type: string
  1198. model:
  1199. type: string
  1200. moderation:
  1201. type: string
  1202. "n":
  1203. type: integer
  1204. output_compression:
  1205. type: integer
  1206. output_format:
  1207. description: png, jpeg, webp
  1208. type: string
  1209. prompt:
  1210. type: string
  1211. quality:
  1212. description: auto, high, medium, low, hd, standard
  1213. type: string
  1214. response_format:
  1215. description: url, b64_json
  1216. type: string
  1217. size:
  1218. description: 1024x1024, 1536x1024, 1024x1536, auto, 256x256, 512x512, 1792x1024,
  1219. 1024x1792
  1220. type: string
  1221. style:
  1222. description: vivid, natural
  1223. type: string
  1224. user:
  1225. type: string
  1226. type: object
  1227. model.ImageResponse:
  1228. properties:
  1229. created:
  1230. type: integer
  1231. data:
  1232. items:
  1233. $ref: '#/definitions/model.ImageData'
  1234. type: array
  1235. usage:
  1236. allOf:
  1237. - $ref: '#/definitions/model.ImageUsage'
  1238. description: For gpt-image-1 only, the token usage information for the image
  1239. generation.
  1240. type: object
  1241. model.ImageUsage:
  1242. properties:
  1243. input_tokens:
  1244. description: The number of tokens (images and text) in the input prompt.
  1245. type: integer
  1246. input_tokens_details:
  1247. allOf:
  1248. - $ref: '#/definitions/model.ImageInputTokensDetails'
  1249. description: The input tokens detailed information for the image generation.
  1250. output_tokens:
  1251. description: The number of image tokens in the output image.
  1252. type: integer
  1253. total_tokens:
  1254. description: The total number of tokens (images and text) used for the image
  1255. generation.
  1256. type: integer
  1257. type: object
  1258. model.JSONSchema:
  1259. properties:
  1260. description:
  1261. type: string
  1262. name:
  1263. type: string
  1264. schema:
  1265. additionalProperties: {}
  1266. type: object
  1267. strict:
  1268. type: boolean
  1269. type: object
  1270. model.Log:
  1271. properties:
  1272. channel:
  1273. type: integer
  1274. code:
  1275. type: integer
  1276. content:
  1277. type: string
  1278. created_at:
  1279. type: string
  1280. endpoint:
  1281. type: string
  1282. group:
  1283. type: string
  1284. id:
  1285. type: integer
  1286. ip:
  1287. type: string
  1288. metadata:
  1289. additionalProperties:
  1290. type: string
  1291. type: object
  1292. mode:
  1293. type: integer
  1294. model:
  1295. type: string
  1296. price:
  1297. $ref: '#/definitions/model.Price'
  1298. request_at:
  1299. type: string
  1300. request_detail:
  1301. $ref: '#/definitions/model.RequestDetail'
  1302. request_id:
  1303. type: string
  1304. retry_at:
  1305. type: string
  1306. retry_times:
  1307. type: integer
  1308. token_id:
  1309. type: integer
  1310. token_name:
  1311. type: string
  1312. ttfb_milliseconds:
  1313. type: integer
  1314. usage:
  1315. $ref: '#/definitions/github_com_labring_aiproxy_core_model.Usage'
  1316. used_amount:
  1317. type: number
  1318. user:
  1319. description: https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids
  1320. type: string
  1321. type: object
  1322. model.MCPEmbeddingConfig:
  1323. properties:
  1324. init:
  1325. additionalProperties:
  1326. type: string
  1327. type: object
  1328. reusing:
  1329. additionalProperties:
  1330. $ref: '#/definitions/model.MCPEmbeddingReusingConfig'
  1331. type: object
  1332. type: object
  1333. model.MCPEmbeddingReusingConfig:
  1334. properties:
  1335. description:
  1336. type: string
  1337. name:
  1338. type: string
  1339. required:
  1340. type: boolean
  1341. type: object
  1342. model.MCPOpenAPIConfig:
  1343. properties:
  1344. authorization:
  1345. type: string
  1346. openapi_content:
  1347. type: string
  1348. openapi_spec:
  1349. type: string
  1350. server_addr:
  1351. type: string
  1352. v2:
  1353. type: boolean
  1354. type: object
  1355. model.MCPPrice:
  1356. properties:
  1357. default_tools_call_price:
  1358. type: number
  1359. tools_call_prices:
  1360. additionalProperties:
  1361. type: number
  1362. type: object
  1363. type: object
  1364. model.Message:
  1365. properties:
  1366. content: {}
  1367. name:
  1368. type: string
  1369. reasoning_content:
  1370. type: string
  1371. role:
  1372. type: string
  1373. tool_call_id:
  1374. type: string
  1375. tool_calls:
  1376. items:
  1377. $ref: '#/definitions/model.Tool'
  1378. type: array
  1379. type: object
  1380. model.ModelConfig:
  1381. properties:
  1382. config:
  1383. additionalProperties: {}
  1384. type: object
  1385. created_at:
  1386. type: string
  1387. exclude_from_tests:
  1388. type: boolean
  1389. force_save_detail:
  1390. type: boolean
  1391. image_prices:
  1392. additionalProperties:
  1393. type: number
  1394. description: map[size]price_per_image
  1395. type: object
  1396. image_quality_prices:
  1397. additionalProperties:
  1398. additionalProperties:
  1399. type: number
  1400. type: object
  1401. description: map[size]map[quality]price_per_image
  1402. type: object
  1403. max_error_rate:
  1404. type: number
  1405. model:
  1406. type: string
  1407. owner:
  1408. $ref: '#/definitions/model.ModelOwner'
  1409. plugin:
  1410. additionalProperties:
  1411. items:
  1412. type: integer
  1413. type: array
  1414. type: object
  1415. price:
  1416. $ref: '#/definitions/model.Price'
  1417. retry_times:
  1418. type: integer
  1419. rpm:
  1420. type: integer
  1421. timeout:
  1422. type: integer
  1423. tpm:
  1424. type: integer
  1425. type:
  1426. $ref: '#/definitions/mode.Mode'
  1427. updated_at:
  1428. type: string
  1429. type: object
  1430. model.ModelData:
  1431. properties:
  1432. cache_creation_tokens:
  1433. type: integer
  1434. cached_tokens:
  1435. type: integer
  1436. exception_count:
  1437. type: integer
  1438. input_tokens:
  1439. type: integer
  1440. max_rpm:
  1441. type: integer
  1442. max_rps:
  1443. type: integer
  1444. max_tpm:
  1445. type: integer
  1446. max_tps:
  1447. type: integer
  1448. model:
  1449. type: string
  1450. output_tokens:
  1451. type: integer
  1452. request_count:
  1453. type: integer
  1454. timestamp:
  1455. type: integer
  1456. total_tokens:
  1457. type: integer
  1458. used_amount:
  1459. type: number
  1460. web_search_count:
  1461. type: integer
  1462. type: object
  1463. model.ModelOwner:
  1464. enum:
  1465. - openai
  1466. - alibaba
  1467. - tencent
  1468. - xunfei
  1469. - deepseek
  1470. - moonshot
  1471. - minimax
  1472. - baidu
  1473. - google
  1474. - baai
  1475. - funaudiollm
  1476. - doubao
  1477. - fishaudio
  1478. - chatglm
  1479. - stabilityai
  1480. - netease
  1481. - ai360
  1482. - anthropic
  1483. - meta
  1484. - baichuan
  1485. - mistral
  1486. - openchat
  1487. - microsoft
  1488. - defog
  1489. - nexusflow
  1490. - cohere
  1491. - huggingface
  1492. - lingyiwanwu
  1493. - stepfun
  1494. - xai
  1495. - doc2x
  1496. - jina
  1497. type: string
  1498. x-enum-varnames:
  1499. - ModelOwnerOpenAI
  1500. - ModelOwnerAlibaba
  1501. - ModelOwnerTencent
  1502. - ModelOwnerXunfei
  1503. - ModelOwnerDeepSeek
  1504. - ModelOwnerMoonshot
  1505. - ModelOwnerMiniMax
  1506. - ModelOwnerBaidu
  1507. - ModelOwnerGoogle
  1508. - ModelOwnerBAAI
  1509. - ModelOwnerFunAudioLLM
  1510. - ModelOwnerDoubao
  1511. - ModelOwnerFishAudio
  1512. - ModelOwnerChatGLM
  1513. - ModelOwnerStabilityAI
  1514. - ModelOwnerNetease
  1515. - ModelOwnerAI360
  1516. - ModelOwnerAnthropic
  1517. - ModelOwnerMeta
  1518. - ModelOwnerBaichuan
  1519. - ModelOwnerMistral
  1520. - ModelOwnerOpenChat
  1521. - ModelOwnerMicrosoft
  1522. - ModelOwnerDefog
  1523. - ModelOwnerNexusFlow
  1524. - ModelOwnerCohere
  1525. - ModelOwnerHuggingFace
  1526. - ModelOwnerLingyiWanwu
  1527. - ModelOwnerStepFun
  1528. - ModelOwnerXAI
  1529. - ModelOwnerDoc2x
  1530. - ModelOwnerJina
  1531. model.Option:
  1532. properties:
  1533. key:
  1534. type: string
  1535. value:
  1536. type: string
  1537. type: object
  1538. model.ParamType:
  1539. enum:
  1540. - header
  1541. - query
  1542. type: string
  1543. x-enum-varnames:
  1544. - ParamTypeHeader
  1545. - ParamTypeQuery
  1546. model.ParsePdfResponse:
  1547. properties:
  1548. markdown:
  1549. type: string
  1550. pages:
  1551. type: integer
  1552. type: object
  1553. model.Price:
  1554. properties:
  1555. cache_creation_price:
  1556. type: number
  1557. cache_creation_price_unit:
  1558. type: integer
  1559. cached_price:
  1560. type: number
  1561. cached_price_unit:
  1562. type: integer
  1563. image_input_price:
  1564. type: number
  1565. image_input_price_unit:
  1566. type: integer
  1567. input_price:
  1568. type: number
  1569. input_price_unit:
  1570. type: integer
  1571. output_price:
  1572. type: number
  1573. output_price_unit:
  1574. type: integer
  1575. per_request_price:
  1576. type: number
  1577. thinking_mode_output_price:
  1578. description: |-
  1579. when ThinkingModeOutputPrice and ReasoningTokens are not 0, OutputPrice and OutputPriceUnit
  1580. will be overwritten
  1581. type: number
  1582. thinking_mode_output_price_unit:
  1583. type: integer
  1584. web_search_price:
  1585. type: number
  1586. web_search_price_unit:
  1587. type: integer
  1588. type: object
  1589. model.PromptTokensDetails:
  1590. properties:
  1591. audio_tokens:
  1592. type: integer
  1593. cache_creation_tokens:
  1594. type: integer
  1595. cached_tokens:
  1596. type: integer
  1597. type: object
  1598. model.PublicMCP:
  1599. properties:
  1600. created_at:
  1601. type: string
  1602. embed_config:
  1603. $ref: '#/definitions/model.MCPEmbeddingConfig'
  1604. github_url:
  1605. type: string
  1606. id:
  1607. type: string
  1608. logo_url:
  1609. type: string
  1610. name:
  1611. type: string
  1612. openapi_config:
  1613. $ref: '#/definitions/model.MCPOpenAPIConfig'
  1614. price:
  1615. $ref: '#/definitions/model.MCPPrice'
  1616. proxy_config:
  1617. $ref: '#/definitions/model.PublicMCPProxyConfig'
  1618. readme:
  1619. type: string
  1620. readme_url:
  1621. type: string
  1622. status:
  1623. $ref: '#/definitions/model.PublicMCPStatus'
  1624. tags:
  1625. items:
  1626. type: string
  1627. type: array
  1628. type:
  1629. $ref: '#/definitions/model.PublicMCPType'
  1630. update_at:
  1631. type: string
  1632. type: object
  1633. model.PublicMCPProxyConfig:
  1634. properties:
  1635. headers:
  1636. additionalProperties:
  1637. type: string
  1638. type: object
  1639. querys:
  1640. additionalProperties:
  1641. type: string
  1642. type: object
  1643. reusing_params:
  1644. additionalProperties:
  1645. $ref: '#/definitions/model.ReusingParam'
  1646. type: object
  1647. url:
  1648. type: string
  1649. type: object
  1650. model.PublicMCPReusingParam:
  1651. properties:
  1652. created_at:
  1653. type: string
  1654. group_id:
  1655. type: string
  1656. mcp_id:
  1657. type: string
  1658. reusing_params:
  1659. additionalProperties:
  1660. type: string
  1661. type: object
  1662. update_at:
  1663. type: string
  1664. type: object
  1665. model.PublicMCPStatus:
  1666. enum:
  1667. - 1
  1668. - 2
  1669. type: integer
  1670. x-enum-varnames:
  1671. - PublicMCPStatusEnabled
  1672. - PublicMCPStatusDisabled
  1673. model.PublicMCPType:
  1674. enum:
  1675. - mcp_proxy_sse
  1676. - mcp_proxy_streamable
  1677. - mcp_docs
  1678. - mcp_openapi
  1679. - mcp_embed
  1680. type: string
  1681. x-enum-comments:
  1682. PublicMCPTypeDocs: read only
  1683. x-enum-varnames:
  1684. - PublicMCPTypeProxySSE
  1685. - PublicMCPTypeProxyStreamable
  1686. - PublicMCPTypeDocs
  1687. - PublicMCPTypeOpenAPI
  1688. - PublicMCPTypeEmbed
  1689. model.RequestDetail:
  1690. properties:
  1691. id:
  1692. type: integer
  1693. log_id:
  1694. type: integer
  1695. request_body:
  1696. type: string
  1697. request_body_truncated:
  1698. type: boolean
  1699. response_body:
  1700. type: string
  1701. response_body_truncated:
  1702. type: boolean
  1703. type: object
  1704. model.RerankMeta:
  1705. properties:
  1706. model:
  1707. type: string
  1708. tokens:
  1709. $ref: '#/definitions/model.RerankMetaTokens'
  1710. type: object
  1711. model.RerankMetaTokens:
  1712. properties:
  1713. input_tokens:
  1714. type: integer
  1715. output_tokens:
  1716. type: integer
  1717. type: object
  1718. model.RerankRequest:
  1719. properties:
  1720. documents:
  1721. items:
  1722. type: string
  1723. type: array
  1724. max_chunks_per_doc:
  1725. type: integer
  1726. model:
  1727. type: string
  1728. overlap_tokens:
  1729. type: integer
  1730. query:
  1731. type: string
  1732. return_documents:
  1733. type: boolean
  1734. top_n:
  1735. type: integer
  1736. type: object
  1737. model.RerankResponse:
  1738. properties:
  1739. id:
  1740. type: string
  1741. meta:
  1742. $ref: '#/definitions/model.RerankMeta'
  1743. results:
  1744. items:
  1745. $ref: '#/definitions/model.RerankResult'
  1746. type: array
  1747. type: object
  1748. model.RerankResult:
  1749. properties:
  1750. document:
  1751. $ref: '#/definitions/model.Document'
  1752. index:
  1753. type: integer
  1754. relevance_score:
  1755. type: number
  1756. type: object
  1757. model.ResponseFormat:
  1758. properties:
  1759. json_schema:
  1760. $ref: '#/definitions/model.JSONSchema'
  1761. type:
  1762. type: string
  1763. type: object
  1764. model.ReusingParam:
  1765. properties:
  1766. description:
  1767. type: string
  1768. name:
  1769. type: string
  1770. required:
  1771. type: boolean
  1772. type:
  1773. $ref: '#/definitions/model.ParamType'
  1774. type: object
  1775. model.StreamOptions:
  1776. properties:
  1777. include_usage:
  1778. type: boolean
  1779. type: object
  1780. model.SttJSONResponse:
  1781. properties:
  1782. text:
  1783. type: string
  1784. type: object
  1785. model.TextResponse:
  1786. properties:
  1787. choices:
  1788. items:
  1789. $ref: '#/definitions/model.TextResponseChoice'
  1790. type: array
  1791. created:
  1792. type: integer
  1793. id:
  1794. type: string
  1795. model:
  1796. type: string
  1797. object:
  1798. type: string
  1799. usage:
  1800. $ref: '#/definitions/github_com_labring_aiproxy_core_relay_model.Usage'
  1801. type: object
  1802. model.TextResponseChoice:
  1803. properties:
  1804. finish_reason:
  1805. $ref: '#/definitions/model.FinishReason'
  1806. index:
  1807. type: integer
  1808. message:
  1809. $ref: '#/definitions/model.Message'
  1810. text:
  1811. type: string
  1812. type: object
  1813. model.TextToSpeechRequest:
  1814. properties:
  1815. input:
  1816. type: string
  1817. model:
  1818. type: string
  1819. response_format:
  1820. type: string
  1821. speed:
  1822. type: number
  1823. voice:
  1824. type: string
  1825. required:
  1826. - input
  1827. - model
  1828. - voice
  1829. type: object
  1830. model.TimeModelData:
  1831. properties:
  1832. models:
  1833. items:
  1834. $ref: '#/definitions/model.ModelData'
  1835. type: array
  1836. timestamp:
  1837. type: integer
  1838. type: object
  1839. model.Tool:
  1840. properties:
  1841. function:
  1842. $ref: '#/definitions/model.Function'
  1843. id:
  1844. type: string
  1845. type:
  1846. type: string
  1847. type: object
  1848. model.VideoGenerationJob:
  1849. properties:
  1850. created_at:
  1851. type: integer
  1852. expires_at:
  1853. type: integer
  1854. finish_reason:
  1855. type: string
  1856. finished_at:
  1857. type: integer
  1858. generations:
  1859. items:
  1860. $ref: '#/definitions/model.VideoGenerations'
  1861. type: array
  1862. height:
  1863. type: integer
  1864. id:
  1865. type: string
  1866. model:
  1867. type: string
  1868. n_seconds:
  1869. type: integer
  1870. n_variants:
  1871. type: integer
  1872. object:
  1873. type: string
  1874. prompt:
  1875. type: string
  1876. status:
  1877. $ref: '#/definitions/model.VideoGenerationJobStatus'
  1878. width:
  1879. type: integer
  1880. type: object
  1881. model.VideoGenerationJobRequest:
  1882. properties:
  1883. height:
  1884. type: integer
  1885. model:
  1886. type: string
  1887. n_seconds:
  1888. type: integer
  1889. n_variants:
  1890. type: integer
  1891. prompt:
  1892. type: string
  1893. width:
  1894. type: integer
  1895. type: object
  1896. model.VideoGenerationJobStatus:
  1897. enum:
  1898. - queued
  1899. - processing
  1900. - running
  1901. - succeeded
  1902. type: string
  1903. x-enum-varnames:
  1904. - VideoGenerationJobStatusQueued
  1905. - VideoGenerationJobStatusProcessing
  1906. - VideoGenerationJobStatusRunning
  1907. - VideoGenerationJobStatusSucceeded
  1908. model.VideoGenerations:
  1909. properties:
  1910. created_at:
  1911. type: integer
  1912. height:
  1913. type: integer
  1914. id:
  1915. type: string
  1916. job_id:
  1917. type: string
  1918. n_seconds:
  1919. type: integer
  1920. object:
  1921. type: string
  1922. prompt:
  1923. type: string
  1924. width:
  1925. type: integer
  1926. type: object
  1927. openai.SubscriptionResponse:
  1928. properties:
  1929. access_until:
  1930. type: integer
  1931. hard_limit_usd:
  1932. type: number
  1933. has_payment_method:
  1934. type: boolean
  1935. object:
  1936. type: string
  1937. soft_limit_usd:
  1938. type: number
  1939. system_hard_limit_usd:
  1940. type: number
  1941. type: object
  1942. openai.UsageResponse:
  1943. properties:
  1944. object:
  1945. type: string
  1946. total_usage:
  1947. description: DailyCosts []OpenAIUsageDailyCost `json:"daily_costs"`
  1948. type: number
  1949. type: object
  1950. info:
  1951. contact: {}
  1952. title: AI Proxy Swagger API
  1953. version: "1.0"
  1954. paths:
  1955. /api/channel/:
  1956. post:
  1957. consumes:
  1958. - application/json
  1959. description: Adds a new channel to the system
  1960. parameters:
  1961. - description: Channel information
  1962. in: body
  1963. name: channel
  1964. required: true
  1965. schema:
  1966. $ref: '#/definitions/controller.AddChannelRequest'
  1967. produces:
  1968. - application/json
  1969. responses:
  1970. "200":
  1971. description: OK
  1972. schema:
  1973. $ref: '#/definitions/middleware.APIResponse'
  1974. security:
  1975. - ApiKeyAuth: []
  1976. summary: Add a single channel
  1977. tags:
  1978. - channel
  1979. /api/channel/{id}:
  1980. delete:
  1981. description: Deletes a channel by its ID
  1982. parameters:
  1983. - description: Channel ID
  1984. in: path
  1985. name: id
  1986. required: true
  1987. type: integer
  1988. produces:
  1989. - application/json
  1990. responses:
  1991. "200":
  1992. description: OK
  1993. schema:
  1994. $ref: '#/definitions/middleware.APIResponse'
  1995. security:
  1996. - ApiKeyAuth: []
  1997. summary: Delete a channel
  1998. tags:
  1999. - channel
  2000. get:
  2001. description: Returns detailed information about a specific channel
  2002. parameters:
  2003. - description: Channel ID
  2004. in: path
  2005. name: id
  2006. required: true
  2007. type: integer
  2008. produces:
  2009. - application/json
  2010. responses:
  2011. "200":
  2012. description: OK
  2013. schema:
  2014. allOf:
  2015. - $ref: '#/definitions/middleware.APIResponse'
  2016. - properties:
  2017. data:
  2018. $ref: '#/definitions/model.Channel'
  2019. type: object
  2020. security:
  2021. - ApiKeyAuth: []
  2022. summary: Get a channel by ID
  2023. tags:
  2024. - channel
  2025. put:
  2026. consumes:
  2027. - application/json
  2028. description: Updates an existing channel by its ID
  2029. parameters:
  2030. - description: Channel ID
  2031. in: path
  2032. name: id
  2033. required: true
  2034. type: integer
  2035. - description: Updated channel information
  2036. in: body
  2037. name: channel
  2038. required: true
  2039. schema:
  2040. $ref: '#/definitions/controller.AddChannelRequest'
  2041. produces:
  2042. - application/json
  2043. responses:
  2044. "200":
  2045. description: OK
  2046. schema:
  2047. allOf:
  2048. - $ref: '#/definitions/middleware.APIResponse'
  2049. - properties:
  2050. data:
  2051. $ref: '#/definitions/model.Channel'
  2052. type: object
  2053. security:
  2054. - ApiKeyAuth: []
  2055. summary: Update a channel
  2056. tags:
  2057. - channel
  2058. /api/channel/{id}/{model}:
  2059. get:
  2060. description: Tests a single model in the channel
  2061. parameters:
  2062. - description: Channel ID
  2063. in: path
  2064. name: id
  2065. required: true
  2066. type: integer
  2067. - description: Model name
  2068. in: path
  2069. name: model
  2070. required: true
  2071. type: string
  2072. produces:
  2073. - application/json
  2074. responses:
  2075. "200":
  2076. description: OK
  2077. schema:
  2078. allOf:
  2079. - $ref: '#/definitions/middleware.APIResponse'
  2080. - properties:
  2081. data:
  2082. $ref: '#/definitions/model.ChannelTest'
  2083. type: object
  2084. security:
  2085. - ApiKeyAuth: []
  2086. summary: Test channel model
  2087. tags:
  2088. - channel
  2089. /api/channel/{id}/balance:
  2090. get:
  2091. description: Updates the balance for a single channel
  2092. parameters:
  2093. - description: Channel ID
  2094. in: path
  2095. name: id
  2096. required: true
  2097. type: integer
  2098. produces:
  2099. - application/json
  2100. responses:
  2101. "200":
  2102. description: OK
  2103. schema:
  2104. allOf:
  2105. - $ref: '#/definitions/middleware.APIResponse'
  2106. - properties:
  2107. data:
  2108. type: number
  2109. type: object
  2110. security:
  2111. - ApiKeyAuth: []
  2112. summary: Update channel balance
  2113. tags:
  2114. - channel
  2115. /api/channel/{id}/status:
  2116. post:
  2117. consumes:
  2118. - application/json
  2119. description: Updates the status of a channel by its ID
  2120. parameters:
  2121. - description: Channel ID
  2122. in: path
  2123. name: id
  2124. required: true
  2125. type: integer
  2126. - description: Status information
  2127. in: body
  2128. name: status
  2129. required: true
  2130. schema:
  2131. $ref: '#/definitions/controller.UpdateChannelStatusRequest'
  2132. produces:
  2133. - application/json
  2134. responses:
  2135. "200":
  2136. description: OK
  2137. schema:
  2138. $ref: '#/definitions/middleware.APIResponse'
  2139. security:
  2140. - ApiKeyAuth: []
  2141. summary: Update channel status
  2142. tags:
  2143. - channel
  2144. /api/channel/{id}/test:
  2145. get:
  2146. description: Tests all models in the channel
  2147. parameters:
  2148. - description: Channel ID
  2149. in: path
  2150. name: id
  2151. required: true
  2152. type: integer
  2153. - description: Return success
  2154. in: query
  2155. name: return_success
  2156. type: boolean
  2157. - description: Success body
  2158. in: query
  2159. name: success_body
  2160. type: boolean
  2161. - description: Stream
  2162. in: query
  2163. name: stream
  2164. type: boolean
  2165. produces:
  2166. - application/json
  2167. responses:
  2168. "200":
  2169. description: OK
  2170. schema:
  2171. allOf:
  2172. - $ref: '#/definitions/middleware.APIResponse'
  2173. - properties:
  2174. data:
  2175. items:
  2176. $ref: '#/definitions/controller.TestResult'
  2177. type: array
  2178. type: object
  2179. security:
  2180. - ApiKeyAuth: []
  2181. summary: Test channel models
  2182. tags:
  2183. - channel
  2184. /api/channels/:
  2185. get:
  2186. description: Returns a paginated list of channels with optional filters
  2187. parameters:
  2188. - description: Page number
  2189. in: query
  2190. name: page
  2191. type: integer
  2192. - description: Items per page
  2193. in: query
  2194. name: per_page
  2195. type: integer
  2196. - description: Filter by id
  2197. in: query
  2198. name: id
  2199. type: integer
  2200. - description: Filter by name
  2201. in: query
  2202. name: name
  2203. type: string
  2204. - description: Filter by key
  2205. in: query
  2206. name: key
  2207. type: string
  2208. - description: Filter by channel type
  2209. in: query
  2210. name: channel_type
  2211. type: integer
  2212. - description: Filter by base URL
  2213. in: query
  2214. name: base_url
  2215. type: string
  2216. - description: Order by field
  2217. in: query
  2218. name: order
  2219. type: string
  2220. produces:
  2221. - application/json
  2222. responses:
  2223. "200":
  2224. description: OK
  2225. schema:
  2226. allOf:
  2227. - $ref: '#/definitions/middleware.APIResponse'
  2228. - properties:
  2229. data:
  2230. additionalProperties:
  2231. allOf:
  2232. - {}
  2233. - properties:
  2234. channels:
  2235. items:
  2236. $ref: '#/definitions/model.Channel'
  2237. type: array
  2238. total:
  2239. type: integer
  2240. type: object
  2241. type: object
  2242. type: object
  2243. security:
  2244. - ApiKeyAuth: []
  2245. summary: Get channels with pagination
  2246. tags:
  2247. - channels
  2248. post:
  2249. consumes:
  2250. - application/json
  2251. description: Adds multiple channels in a batch operation
  2252. parameters:
  2253. - description: Channel information
  2254. in: body
  2255. name: channels
  2256. required: true
  2257. schema:
  2258. items:
  2259. $ref: '#/definitions/controller.AddChannelRequest'
  2260. type: array
  2261. produces:
  2262. - application/json
  2263. responses:
  2264. "200":
  2265. description: OK
  2266. schema:
  2267. $ref: '#/definitions/middleware.APIResponse'
  2268. security:
  2269. - ApiKeyAuth: []
  2270. summary: Add multiple channels
  2271. tags:
  2272. - channels
  2273. /api/channels/all:
  2274. get:
  2275. description: Returns a list of all channels without pagination
  2276. produces:
  2277. - application/json
  2278. responses:
  2279. "200":
  2280. description: OK
  2281. schema:
  2282. allOf:
  2283. - $ref: '#/definitions/middleware.APIResponse'
  2284. - properties:
  2285. data:
  2286. items:
  2287. $ref: '#/definitions/model.Channel'
  2288. type: array
  2289. type: object
  2290. security:
  2291. - ApiKeyAuth: []
  2292. summary: Get all channels
  2293. tags:
  2294. - channels
  2295. /api/channels/balance:
  2296. get:
  2297. description: Updates the balance for all channels
  2298. produces:
  2299. - application/json
  2300. responses:
  2301. "200":
  2302. description: OK
  2303. schema:
  2304. $ref: '#/definitions/middleware.APIResponse'
  2305. security:
  2306. - ApiKeyAuth: []
  2307. summary: Update all channels balance
  2308. tags:
  2309. - channel
  2310. /api/channels/batch_delete:
  2311. post:
  2312. consumes:
  2313. - application/json
  2314. description: Deletes multiple channels by their IDs
  2315. parameters:
  2316. - description: Channel IDs
  2317. in: body
  2318. name: ids
  2319. required: true
  2320. schema:
  2321. items:
  2322. type: integer
  2323. type: array
  2324. produces:
  2325. - application/json
  2326. responses:
  2327. "200":
  2328. description: OK
  2329. schema:
  2330. $ref: '#/definitions/middleware.APIResponse'
  2331. security:
  2332. - ApiKeyAuth: []
  2333. summary: Delete multiple channels
  2334. tags:
  2335. - channels
  2336. /api/channels/import/oneapi:
  2337. post:
  2338. description: Imports channels from OneAPI
  2339. parameters:
  2340. - description: Import channel from OneAPI request
  2341. in: body
  2342. name: request
  2343. required: true
  2344. schema:
  2345. $ref: '#/definitions/controller.ImportChannelFromOneAPIRequest'
  2346. produces:
  2347. - application/json
  2348. responses:
  2349. "200":
  2350. description: OK
  2351. schema:
  2352. allOf:
  2353. - $ref: '#/definitions/middleware.APIResponse'
  2354. - properties:
  2355. data:
  2356. items: {}
  2357. type: array
  2358. type: object
  2359. security:
  2360. - ApiKeyAuth: []
  2361. summary: Import channel from OneAPI
  2362. tags:
  2363. - channels
  2364. /api/channels/search:
  2365. get:
  2366. description: Search channels with keyword and optional filters
  2367. parameters:
  2368. - description: Search keyword
  2369. in: query
  2370. name: keyword
  2371. required: true
  2372. type: string
  2373. - description: Page number
  2374. in: query
  2375. name: page
  2376. type: integer
  2377. - description: Items per page
  2378. in: query
  2379. name: per_page
  2380. type: integer
  2381. - description: Filter by id
  2382. in: query
  2383. name: id
  2384. type: integer
  2385. - description: Filter by name
  2386. in: query
  2387. name: name
  2388. type: string
  2389. - description: Filter by key
  2390. in: query
  2391. name: key
  2392. type: string
  2393. - description: Filter by channel type
  2394. in: query
  2395. name: channel_type
  2396. type: integer
  2397. - description: Filter by base URL
  2398. in: query
  2399. name: base_url
  2400. type: string
  2401. - description: Order by field
  2402. in: query
  2403. name: order
  2404. type: string
  2405. produces:
  2406. - application/json
  2407. responses:
  2408. "200":
  2409. description: OK
  2410. schema:
  2411. allOf:
  2412. - $ref: '#/definitions/middleware.APIResponse'
  2413. - properties:
  2414. data:
  2415. additionalProperties:
  2416. allOf:
  2417. - {}
  2418. - properties:
  2419. channels:
  2420. items:
  2421. $ref: '#/definitions/model.Channel'
  2422. type: array
  2423. total:
  2424. type: integer
  2425. type: object
  2426. type: object
  2427. type: object
  2428. security:
  2429. - ApiKeyAuth: []
  2430. summary: Search channels
  2431. tags:
  2432. - channels
  2433. /api/channels/test:
  2434. get:
  2435. description: Tests all channels
  2436. parameters:
  2437. - description: Test disabled
  2438. in: query
  2439. name: test_disabled
  2440. type: boolean
  2441. - description: Return success
  2442. in: query
  2443. name: return_success
  2444. type: boolean
  2445. - description: Success body
  2446. in: query
  2447. name: success_body
  2448. type: boolean
  2449. - description: Stream
  2450. in: query
  2451. name: stream
  2452. type: boolean
  2453. produces:
  2454. - application/json
  2455. responses:
  2456. "200":
  2457. description: OK
  2458. schema:
  2459. allOf:
  2460. - $ref: '#/definitions/middleware.APIResponse'
  2461. - properties:
  2462. data:
  2463. items:
  2464. $ref: '#/definitions/controller.TestResult'
  2465. type: array
  2466. type: object
  2467. security:
  2468. - ApiKeyAuth: []
  2469. summary: Test all channels
  2470. tags:
  2471. - channel
  2472. /api/channels/type_metas:
  2473. get:
  2474. description: Returns metadata for all channel types
  2475. produces:
  2476. - application/json
  2477. responses:
  2478. "200":
  2479. description: OK
  2480. schema:
  2481. allOf:
  2482. - $ref: '#/definitions/middleware.APIResponse'
  2483. - properties:
  2484. data:
  2485. additionalProperties:
  2486. $ref: '#/definitions/adaptors.AdaptorMeta'
  2487. type: object
  2488. type: object
  2489. security:
  2490. - ApiKeyAuth: []
  2491. summary: Get channel type metadata
  2492. tags:
  2493. - channels
  2494. /api/dashboard/:
  2495. get:
  2496. description: Returns the general dashboard data including usage statistics and
  2497. metrics
  2498. parameters:
  2499. - description: Channel ID
  2500. in: query
  2501. name: channel
  2502. type: integer
  2503. - description: Model name
  2504. in: query
  2505. name: model
  2506. type: string
  2507. - description: Start second timestamp
  2508. in: query
  2509. name: start_timestamp
  2510. type: integer
  2511. - description: End second timestamp
  2512. in: query
  2513. name: end_timestamp
  2514. type: integer
  2515. - description: Timezone, default is Local
  2516. in: query
  2517. name: timezone
  2518. type: string
  2519. - description: Time span type (day, hour)
  2520. in: query
  2521. name: timespan
  2522. type: string
  2523. produces:
  2524. - application/json
  2525. responses:
  2526. "200":
  2527. description: OK
  2528. schema:
  2529. allOf:
  2530. - $ref: '#/definitions/middleware.APIResponse'
  2531. - properties:
  2532. data:
  2533. $ref: '#/definitions/model.DashboardResponse'
  2534. type: object
  2535. security:
  2536. - ApiKeyAuth: []
  2537. summary: Get dashboard data
  2538. tags:
  2539. - dashboard
  2540. /api/dashboard/{group}:
  2541. get:
  2542. description: Returns dashboard data and metrics specific to the given group
  2543. parameters:
  2544. - description: Group
  2545. in: path
  2546. name: group
  2547. required: true
  2548. type: string
  2549. - description: Token name
  2550. in: query
  2551. name: token_name
  2552. type: string
  2553. - description: Model or *
  2554. in: query
  2555. name: model
  2556. type: string
  2557. - description: Start second timestamp
  2558. in: query
  2559. name: start_timestamp
  2560. type: integer
  2561. - description: End second timestamp
  2562. in: query
  2563. name: end_timestamp
  2564. type: integer
  2565. - description: Timezone, default is Local
  2566. in: query
  2567. name: timezone
  2568. type: string
  2569. - description: Time span type (day, hour)
  2570. in: query
  2571. name: timespan
  2572. type: string
  2573. produces:
  2574. - application/json
  2575. responses:
  2576. "200":
  2577. description: OK
  2578. schema:
  2579. allOf:
  2580. - $ref: '#/definitions/middleware.APIResponse'
  2581. - properties:
  2582. data:
  2583. $ref: '#/definitions/model.GroupDashboardResponse'
  2584. type: object
  2585. security:
  2586. - ApiKeyAuth: []
  2587. summary: Get dashboard data for a specific group
  2588. tags:
  2589. - dashboard
  2590. /api/dashboard/{group}/models:
  2591. get:
  2592. description: Returns model-specific metrics and usage data for the given group
  2593. parameters:
  2594. - description: Group
  2595. in: path
  2596. name: group
  2597. required: true
  2598. type: string
  2599. produces:
  2600. - application/json
  2601. responses:
  2602. "200":
  2603. description: OK
  2604. schema:
  2605. allOf:
  2606. - $ref: '#/definitions/middleware.APIResponse'
  2607. - properties:
  2608. data:
  2609. items:
  2610. $ref: '#/definitions/model.ModelConfig'
  2611. type: array
  2612. type: object
  2613. security:
  2614. - ApiKeyAuth: []
  2615. summary: Get model usage data for a specific group
  2616. tags:
  2617. - dashboard
  2618. /api/dashboardv2/:
  2619. get:
  2620. description: Returns model-specific metrics and usage data for the given channel
  2621. parameters:
  2622. - description: Channel ID
  2623. in: query
  2624. name: channel
  2625. type: integer
  2626. - description: Start timestamp
  2627. in: query
  2628. name: start_timestamp
  2629. type: integer
  2630. - description: End timestamp
  2631. in: query
  2632. name: end_timestamp
  2633. type: integer
  2634. - description: Timezone, default is Local
  2635. in: query
  2636. name: timezone
  2637. type: string
  2638. - description: Time span type (day, hour)
  2639. in: query
  2640. name: timespan
  2641. type: string
  2642. produces:
  2643. - application/json
  2644. responses:
  2645. "200":
  2646. description: OK
  2647. schema:
  2648. allOf:
  2649. - $ref: '#/definitions/middleware.APIResponse'
  2650. - properties:
  2651. data:
  2652. items:
  2653. $ref: '#/definitions/model.TimeModelData'
  2654. type: array
  2655. type: object
  2656. security:
  2657. - ApiKeyAuth: []
  2658. summary: Get model usage data for a specific channel
  2659. tags:
  2660. - dashboard
  2661. /api/dashboardv2/{group}:
  2662. get:
  2663. description: Returns model-specific metrics and usage data for the given group
  2664. parameters:
  2665. - description: Group
  2666. in: path
  2667. name: group
  2668. required: true
  2669. type: string
  2670. - description: Token name
  2671. in: query
  2672. name: token_name
  2673. type: string
  2674. - description: Start timestamp
  2675. in: query
  2676. name: start_timestamp
  2677. type: integer
  2678. - description: End timestamp
  2679. in: query
  2680. name: end_timestamp
  2681. type: integer
  2682. - description: Timezone, default is Local
  2683. in: query
  2684. name: timezone
  2685. type: string
  2686. - description: Time span type (day, hour)
  2687. in: query
  2688. name: timespan
  2689. type: string
  2690. produces:
  2691. - application/json
  2692. responses:
  2693. "200":
  2694. description: OK
  2695. schema:
  2696. allOf:
  2697. - $ref: '#/definitions/middleware.APIResponse'
  2698. - properties:
  2699. data:
  2700. items:
  2701. $ref: '#/definitions/model.TimeModelData'
  2702. type: array
  2703. type: object
  2704. security:
  2705. - ApiKeyAuth: []
  2706. summary: Get model usage data for a specific group
  2707. tags:
  2708. - dashboard
  2709. /api/embedmcp/:
  2710. get:
  2711. consumes:
  2712. - application/json
  2713. description: Get embed mcp
  2714. produces:
  2715. - application/json
  2716. responses:
  2717. "200":
  2718. description: OK
  2719. schema:
  2720. items:
  2721. $ref: '#/definitions/controller.EmbedMCP'
  2722. type: array
  2723. security:
  2724. - ApiKeyAuth: []
  2725. summary: Get embed mcp
  2726. tags:
  2727. - embedmcp
  2728. post:
  2729. consumes:
  2730. - application/json
  2731. description: Save embed mcp
  2732. parameters:
  2733. - description: Save embed mcp request
  2734. in: body
  2735. name: body
  2736. required: true
  2737. schema:
  2738. $ref: '#/definitions/controller.SaveEmbedMCPRequest'
  2739. produces:
  2740. - application/json
  2741. responses:
  2742. "200":
  2743. description: OK
  2744. security:
  2745. - ApiKeyAuth: []
  2746. summary: Save embed mcp
  2747. tags:
  2748. - embedmcp
  2749. /api/group/{group}:
  2750. delete:
  2751. description: Deletes a group by its name
  2752. parameters:
  2753. - description: Group name
  2754. in: path
  2755. name: group
  2756. required: true
  2757. type: string
  2758. produces:
  2759. - application/json
  2760. responses:
  2761. "200":
  2762. description: OK
  2763. schema:
  2764. $ref: '#/definitions/middleware.APIResponse'
  2765. security:
  2766. - ApiKeyAuth: []
  2767. summary: Delete a group
  2768. tags:
  2769. - group
  2770. get:
  2771. description: Returns detailed information about a specific group
  2772. parameters:
  2773. - description: Group name
  2774. in: path
  2775. name: group
  2776. required: true
  2777. type: string
  2778. produces:
  2779. - application/json
  2780. responses:
  2781. "200":
  2782. description: OK
  2783. schema:
  2784. allOf:
  2785. - $ref: '#/definitions/middleware.APIResponse'
  2786. - properties:
  2787. data:
  2788. $ref: '#/definitions/controller.GroupResponse'
  2789. type: object
  2790. security:
  2791. - ApiKeyAuth: []
  2792. summary: Get a group
  2793. tags:
  2794. - group
  2795. post:
  2796. consumes:
  2797. - application/json
  2798. description: Creates a new group with the given information
  2799. parameters:
  2800. - description: Group name
  2801. in: path
  2802. name: group
  2803. required: true
  2804. type: string
  2805. - description: Group information
  2806. in: body
  2807. name: data
  2808. required: true
  2809. schema:
  2810. $ref: '#/definitions/controller.CreateGroupRequest'
  2811. produces:
  2812. - application/json
  2813. responses:
  2814. "200":
  2815. description: OK
  2816. schema:
  2817. allOf:
  2818. - $ref: '#/definitions/middleware.APIResponse'
  2819. - properties:
  2820. data:
  2821. $ref: '#/definitions/model.Group'
  2822. type: object
  2823. security:
  2824. - ApiKeyAuth: []
  2825. summary: Create a new group
  2826. tags:
  2827. - group
  2828. put:
  2829. consumes:
  2830. - application/json
  2831. description: Updates an existing group with the given information
  2832. parameters:
  2833. - description: Group name
  2834. in: path
  2835. name: group
  2836. required: true
  2837. type: string
  2838. - description: Updated group information
  2839. in: body
  2840. name: data
  2841. required: true
  2842. schema:
  2843. $ref: '#/definitions/controller.CreateGroupRequest'
  2844. produces:
  2845. - application/json
  2846. responses:
  2847. "200":
  2848. description: OK
  2849. schema:
  2850. allOf:
  2851. - $ref: '#/definitions/middleware.APIResponse'
  2852. - properties:
  2853. data:
  2854. $ref: '#/definitions/model.Group'
  2855. type: object
  2856. security:
  2857. - ApiKeyAuth: []
  2858. summary: Update a group
  2859. tags:
  2860. - group
  2861. /api/group/{group}/model_config/{model}:
  2862. delete:
  2863. description: Delete group model config
  2864. parameters:
  2865. - description: Group name
  2866. in: path
  2867. name: group
  2868. required: true
  2869. type: string
  2870. - description: Model name
  2871. in: path
  2872. name: model
  2873. required: true
  2874. type: string
  2875. produces:
  2876. - application/json
  2877. responses:
  2878. "200":
  2879. description: OK
  2880. schema:
  2881. $ref: '#/definitions/middleware.APIResponse'
  2882. security:
  2883. - ApiKeyAuth: []
  2884. summary: Delete group model config
  2885. tags:
  2886. - group
  2887. get:
  2888. description: Get group model config
  2889. parameters:
  2890. - description: Group name
  2891. in: path
  2892. name: group
  2893. required: true
  2894. type: string
  2895. - description: Model name
  2896. in: path
  2897. name: model
  2898. required: true
  2899. type: string
  2900. produces:
  2901. - application/json
  2902. responses:
  2903. "200":
  2904. description: OK
  2905. schema:
  2906. allOf:
  2907. - $ref: '#/definitions/middleware.APIResponse'
  2908. - properties:
  2909. data:
  2910. $ref: '#/definitions/model.GroupModelConfig'
  2911. type: object
  2912. security:
  2913. - ApiKeyAuth: []
  2914. summary: Get group model config
  2915. tags:
  2916. - group
  2917. post:
  2918. consumes:
  2919. - application/json
  2920. description: Save group model config
  2921. parameters:
  2922. - description: Group name
  2923. in: path
  2924. name: group
  2925. required: true
  2926. type: string
  2927. - description: Group model config information
  2928. in: body
  2929. name: data
  2930. required: true
  2931. schema:
  2932. $ref: '#/definitions/controller.SaveGroupModelConfigRequest'
  2933. produces:
  2934. - application/json
  2935. responses:
  2936. "200":
  2937. description: OK
  2938. schema:
  2939. $ref: '#/definitions/middleware.APIResponse'
  2940. security:
  2941. - ApiKeyAuth: []
  2942. summary: Save group model config
  2943. tags:
  2944. - group
  2945. put:
  2946. consumes:
  2947. - application/json
  2948. description: Update group model config
  2949. parameters:
  2950. - description: Group name
  2951. in: path
  2952. name: group
  2953. required: true
  2954. type: string
  2955. - description: Model name
  2956. in: path
  2957. name: model
  2958. required: true
  2959. type: string
  2960. - description: Group model config information
  2961. in: body
  2962. name: data
  2963. required: true
  2964. schema:
  2965. $ref: '#/definitions/controller.SaveGroupModelConfigRequest'
  2966. produces:
  2967. - application/json
  2968. responses:
  2969. "200":
  2970. description: OK
  2971. schema:
  2972. $ref: '#/definitions/middleware.APIResponse'
  2973. security:
  2974. - ApiKeyAuth: []
  2975. summary: Update group model config
  2976. tags:
  2977. - group
  2978. /api/group/{group}/model_configs/:
  2979. delete:
  2980. description: Delete group model configs
  2981. parameters:
  2982. - description: Group name
  2983. in: path
  2984. name: group
  2985. required: true
  2986. type: string
  2987. - description: Model names
  2988. in: body
  2989. name: models
  2990. required: true
  2991. schema:
  2992. items:
  2993. type: string
  2994. type: array
  2995. produces:
  2996. - application/json
  2997. responses:
  2998. "200":
  2999. description: OK
  3000. schema:
  3001. $ref: '#/definitions/middleware.APIResponse'
  3002. security:
  3003. - ApiKeyAuth: []
  3004. summary: Delete group model configs
  3005. tags:
  3006. - group
  3007. get:
  3008. description: Get group model configs
  3009. parameters:
  3010. - description: Group name
  3011. in: path
  3012. name: group
  3013. required: true
  3014. type: string
  3015. produces:
  3016. - application/json
  3017. responses:
  3018. "200":
  3019. description: OK
  3020. schema:
  3021. allOf:
  3022. - $ref: '#/definitions/middleware.APIResponse'
  3023. - properties:
  3024. data:
  3025. items:
  3026. $ref: '#/definitions/model.GroupModelConfig'
  3027. type: array
  3028. type: object
  3029. security:
  3030. - ApiKeyAuth: []
  3031. summary: Get group model configs
  3032. tags:
  3033. - group
  3034. post:
  3035. consumes:
  3036. - application/json
  3037. description: Save group model configs
  3038. parameters:
  3039. - description: Group name
  3040. in: path
  3041. name: group
  3042. required: true
  3043. type: string
  3044. - description: Group model config information
  3045. in: body
  3046. name: data
  3047. required: true
  3048. schema:
  3049. items:
  3050. $ref: '#/definitions/controller.SaveGroupModelConfigRequest'
  3051. type: array
  3052. produces:
  3053. - application/json
  3054. responses:
  3055. "200":
  3056. description: OK
  3057. schema:
  3058. $ref: '#/definitions/middleware.APIResponse'
  3059. security:
  3060. - ApiKeyAuth: []
  3061. summary: Save group model configs
  3062. tags:
  3063. - group
  3064. put:
  3065. consumes:
  3066. - application/json
  3067. description: Update group model configs
  3068. parameters:
  3069. - description: Group name
  3070. in: path
  3071. name: group
  3072. required: true
  3073. type: string
  3074. - description: Group model config information
  3075. in: body
  3076. name: data
  3077. required: true
  3078. schema:
  3079. items:
  3080. $ref: '#/definitions/controller.SaveGroupModelConfigRequest'
  3081. type: array
  3082. produces:
  3083. - application/json
  3084. responses:
  3085. "200":
  3086. description: OK
  3087. schema:
  3088. $ref: '#/definitions/middleware.APIResponse'
  3089. security:
  3090. - ApiKeyAuth: []
  3091. summary: Update group model configs
  3092. tags:
  3093. - group
  3094. /api/group/{group}/rpm_ratio:
  3095. post:
  3096. consumes:
  3097. - application/json
  3098. description: Updates the RPM (Requests Per Minute) ratio for a group
  3099. parameters:
  3100. - description: Group name
  3101. in: path
  3102. name: group
  3103. required: true
  3104. type: string
  3105. - description: RPM ratio information
  3106. in: body
  3107. name: data
  3108. required: true
  3109. schema:
  3110. $ref: '#/definitions/controller.UpdateGroupRPMRatioRequest'
  3111. produces:
  3112. - application/json
  3113. responses:
  3114. "200":
  3115. description: OK
  3116. schema:
  3117. $ref: '#/definitions/middleware.APIResponse'
  3118. security:
  3119. - ApiKeyAuth: []
  3120. summary: Update group RPM ratio
  3121. tags:
  3122. - group
  3123. /api/group/{group}/status:
  3124. post:
  3125. consumes:
  3126. - application/json
  3127. description: Updates the status of a group
  3128. parameters:
  3129. - description: Group name
  3130. in: path
  3131. name: group
  3132. required: true
  3133. type: string
  3134. - description: Status information
  3135. in: body
  3136. name: status
  3137. required: true
  3138. schema:
  3139. $ref: '#/definitions/controller.UpdateGroupStatusRequest'
  3140. produces:
  3141. - application/json
  3142. responses:
  3143. "200":
  3144. description: OK
  3145. schema:
  3146. $ref: '#/definitions/middleware.APIResponse'
  3147. security:
  3148. - ApiKeyAuth: []
  3149. summary: Update group status
  3150. tags:
  3151. - group
  3152. /api/group/{group}/tpm_ratio:
  3153. post:
  3154. consumes:
  3155. - application/json
  3156. description: Updates the TPM (Tokens Per Minute) ratio for a group
  3157. parameters:
  3158. - description: Group name
  3159. in: path
  3160. name: group
  3161. required: true
  3162. type: string
  3163. - description: TPM ratio information
  3164. in: body
  3165. name: data
  3166. required: true
  3167. schema:
  3168. $ref: '#/definitions/controller.UpdateGroupTPMRatioRequest'
  3169. produces:
  3170. - application/json
  3171. responses:
  3172. "200":
  3173. description: OK
  3174. schema:
  3175. $ref: '#/definitions/middleware.APIResponse'
  3176. security:
  3177. - ApiKeyAuth: []
  3178. summary: Update group TPM ratio
  3179. tags:
  3180. - group
  3181. /api/groups/:
  3182. get:
  3183. description: Returns a list of all groups with pagination
  3184. parameters:
  3185. - description: Page number
  3186. in: query
  3187. name: page
  3188. type: integer
  3189. - description: Items per page
  3190. in: query
  3191. name: per_page
  3192. type: integer
  3193. produces:
  3194. - application/json
  3195. responses:
  3196. "200":
  3197. description: OK
  3198. schema:
  3199. allOf:
  3200. - $ref: '#/definitions/middleware.APIResponse'
  3201. - properties:
  3202. data:
  3203. additionalProperties:
  3204. allOf:
  3205. - {}
  3206. - properties:
  3207. groups:
  3208. items:
  3209. $ref: '#/definitions/controller.GroupResponse'
  3210. type: array
  3211. total:
  3212. type: integer
  3213. type: object
  3214. type: object
  3215. type: object
  3216. security:
  3217. - ApiKeyAuth: []
  3218. summary: Get all groups
  3219. tags:
  3220. - groups
  3221. /api/groups/batch_delete:
  3222. post:
  3223. consumes:
  3224. - application/json
  3225. description: Deletes multiple groups by their IDs
  3226. parameters:
  3227. - description: Group IDs
  3228. in: body
  3229. name: ids
  3230. required: true
  3231. schema:
  3232. items:
  3233. type: string
  3234. type: array
  3235. produces:
  3236. - application/json
  3237. responses:
  3238. "200":
  3239. description: OK
  3240. schema:
  3241. $ref: '#/definitions/middleware.APIResponse'
  3242. security:
  3243. - ApiKeyAuth: []
  3244. summary: Delete multiple groups
  3245. tags:
  3246. - groups
  3247. /api/groups/batch_status:
  3248. post:
  3249. consumes:
  3250. - application/json
  3251. description: Updates the status of multiple groups
  3252. parameters:
  3253. - description: Group IDs and status
  3254. in: body
  3255. name: data
  3256. required: true
  3257. schema:
  3258. $ref: '#/definitions/controller.UpdateGroupsStatusRequest'
  3259. produces:
  3260. - application/json
  3261. responses:
  3262. "200":
  3263. description: OK
  3264. schema:
  3265. $ref: '#/definitions/middleware.APIResponse'
  3266. security:
  3267. - ApiKeyAuth: []
  3268. summary: Update multiple groups status
  3269. tags:
  3270. - groups
  3271. /api/groups/ip_groups:
  3272. get:
  3273. description: Get IP group list
  3274. parameters:
  3275. - description: Threshold
  3276. in: query
  3277. name: threshold
  3278. type: integer
  3279. - description: Start timestamp
  3280. in: query
  3281. name: start_timestamp
  3282. type: integer
  3283. - description: End timestamp
  3284. in: query
  3285. name: end_timestamp
  3286. type: integer
  3287. produces:
  3288. - application/json
  3289. responses:
  3290. "200":
  3291. description: OK
  3292. schema:
  3293. allOf:
  3294. - $ref: '#/definitions/middleware.APIResponse'
  3295. - properties:
  3296. data:
  3297. additionalProperties:
  3298. items:
  3299. type: string
  3300. type: array
  3301. type: object
  3302. type: object
  3303. security:
  3304. - ApiKeyAuth: []
  3305. summary: Get IP group list
  3306. tags:
  3307. - groups
  3308. /api/groups/search:
  3309. get:
  3310. description: Search groups with keyword and pagination
  3311. parameters:
  3312. - description: Search keyword
  3313. in: query
  3314. name: keyword
  3315. required: true
  3316. type: string
  3317. - description: Page number
  3318. in: query
  3319. name: page
  3320. type: integer
  3321. - description: Items per page
  3322. in: query
  3323. name: per_page
  3324. type: integer
  3325. - description: Status
  3326. in: query
  3327. name: status
  3328. type: integer
  3329. - description: Order
  3330. in: query
  3331. name: order
  3332. type: string
  3333. produces:
  3334. - application/json
  3335. responses:
  3336. "200":
  3337. description: OK
  3338. schema:
  3339. allOf:
  3340. - $ref: '#/definitions/middleware.APIResponse'
  3341. - properties:
  3342. data:
  3343. additionalProperties:
  3344. allOf:
  3345. - {}
  3346. - properties:
  3347. groups:
  3348. items:
  3349. $ref: '#/definitions/controller.GroupResponse'
  3350. type: array
  3351. total:
  3352. type: integer
  3353. type: object
  3354. type: object
  3355. type: object
  3356. security:
  3357. - ApiKeyAuth: []
  3358. summary: Search groups
  3359. tags:
  3360. - groups
  3361. /api/log/{group}:
  3362. get:
  3363. description: Get logs for a specific group
  3364. parameters:
  3365. - description: Group name
  3366. in: path
  3367. name: group
  3368. required: true
  3369. type: string
  3370. - description: Page number
  3371. in: query
  3372. name: page
  3373. type: integer
  3374. - description: Items per page
  3375. in: query
  3376. name: per_page
  3377. type: integer
  3378. - description: Start timestamp (milliseconds)
  3379. in: query
  3380. name: start_timestamp
  3381. type: integer
  3382. - description: End timestamp (milliseconds)
  3383. in: query
  3384. name: end_timestamp
  3385. type: integer
  3386. - description: Token name
  3387. in: query
  3388. name: token_name
  3389. type: string
  3390. - description: Model name
  3391. in: query
  3392. name: model_name
  3393. type: string
  3394. - description: Channel ID
  3395. in: query
  3396. name: channel
  3397. type: integer
  3398. - description: Token ID
  3399. in: query
  3400. name: token_id
  3401. type: integer
  3402. - description: Order
  3403. in: query
  3404. name: order
  3405. type: string
  3406. - description: Request ID
  3407. in: query
  3408. name: request_id
  3409. type: string
  3410. - description: Status code type
  3411. in: query
  3412. name: code_type
  3413. type: string
  3414. - description: Status code
  3415. in: query
  3416. name: code
  3417. type: integer
  3418. - description: With body
  3419. in: query
  3420. name: with_body
  3421. type: boolean
  3422. - description: IP
  3423. in: query
  3424. name: ip
  3425. type: string
  3426. - description: User
  3427. in: query
  3428. name: user
  3429. type: string
  3430. produces:
  3431. - application/json
  3432. responses:
  3433. "200":
  3434. description: OK
  3435. schema:
  3436. allOf:
  3437. - $ref: '#/definitions/middleware.APIResponse'
  3438. - properties:
  3439. data:
  3440. $ref: '#/definitions/model.GetGroupLogsResult'
  3441. type: object
  3442. security:
  3443. - ApiKeyAuth: []
  3444. summary: Get group logs
  3445. tags:
  3446. - log
  3447. /api/log/{group}/detail/{log_id}:
  3448. get:
  3449. description: Get detailed information about a specific log entry in a group
  3450. parameters:
  3451. - description: Group name
  3452. in: path
  3453. name: group
  3454. required: true
  3455. type: string
  3456. - description: Log ID
  3457. in: path
  3458. name: log_id
  3459. required: true
  3460. type: string
  3461. produces:
  3462. - application/json
  3463. responses:
  3464. "200":
  3465. description: OK
  3466. schema:
  3467. allOf:
  3468. - $ref: '#/definitions/middleware.APIResponse'
  3469. - properties:
  3470. data:
  3471. $ref: '#/definitions/model.RequestDetail'
  3472. type: object
  3473. security:
  3474. - ApiKeyAuth: []
  3475. summary: Get group log detail
  3476. tags:
  3477. - log
  3478. /api/log/{group}/search:
  3479. get:
  3480. description: Search logs for a specific group with filters
  3481. parameters:
  3482. - description: Group name
  3483. in: path
  3484. name: group
  3485. required: true
  3486. type: string
  3487. - description: Keyword
  3488. in: query
  3489. name: keyword
  3490. type: string
  3491. - description: Page number
  3492. in: query
  3493. name: page
  3494. type: integer
  3495. - description: Items per page
  3496. in: query
  3497. name: per_page
  3498. type: integer
  3499. - description: Start timestamp (milliseconds)
  3500. in: query
  3501. name: start_timestamp
  3502. type: integer
  3503. - description: End timestamp (milliseconds)
  3504. in: query
  3505. name: end_timestamp
  3506. type: integer
  3507. - description: Filter by token name
  3508. in: query
  3509. name: token_name
  3510. type: string
  3511. - description: Filter by model name
  3512. in: query
  3513. name: model_name
  3514. type: string
  3515. - description: Filter by token id
  3516. in: query
  3517. name: token_id
  3518. type: integer
  3519. - description: Order
  3520. in: query
  3521. name: order
  3522. type: string
  3523. - description: Request ID
  3524. in: query
  3525. name: request_id
  3526. type: string
  3527. - description: Status code type
  3528. in: query
  3529. name: code_type
  3530. type: string
  3531. - description: Status code
  3532. in: query
  3533. name: code
  3534. type: integer
  3535. - description: With body
  3536. in: query
  3537. name: with_body
  3538. type: boolean
  3539. - description: IP
  3540. in: query
  3541. name: ip
  3542. type: string
  3543. - description: User
  3544. in: query
  3545. name: user
  3546. type: string
  3547. produces:
  3548. - application/json
  3549. responses:
  3550. "200":
  3551. description: OK
  3552. schema:
  3553. allOf:
  3554. - $ref: '#/definitions/middleware.APIResponse'
  3555. - properties:
  3556. data:
  3557. $ref: '#/definitions/model.GetGroupLogsResult'
  3558. type: object
  3559. security:
  3560. - ApiKeyAuth: []
  3561. summary: Search group logs
  3562. tags:
  3563. - log
  3564. /api/logs/:
  3565. delete:
  3566. description: Deletes logs older than the specified retention period
  3567. parameters:
  3568. - description: Timestamp (milliseconds)
  3569. in: query
  3570. name: timestamp
  3571. required: true
  3572. type: integer
  3573. produces:
  3574. - application/json
  3575. responses:
  3576. "200":
  3577. description: OK
  3578. schema:
  3579. allOf:
  3580. - $ref: '#/definitions/middleware.APIResponse'
  3581. - properties:
  3582. data:
  3583. type: integer
  3584. type: object
  3585. security:
  3586. - ApiKeyAuth: []
  3587. summary: Delete historical logs
  3588. tags:
  3589. - logs
  3590. get:
  3591. description: Returns a paginated list of all logs with optional filters
  3592. parameters:
  3593. - description: Page number
  3594. in: query
  3595. name: page
  3596. type: integer
  3597. - description: Items per page
  3598. in: query
  3599. name: per_page
  3600. type: integer
  3601. - description: Start timestamp (milliseconds)
  3602. in: query
  3603. name: start_timestamp
  3604. type: integer
  3605. - description: End timestamp (milliseconds)
  3606. in: query
  3607. name: end_timestamp
  3608. type: integer
  3609. - description: Model name
  3610. in: query
  3611. name: model_name
  3612. type: string
  3613. - description: Channel ID
  3614. in: query
  3615. name: channel
  3616. type: integer
  3617. - description: Order
  3618. in: query
  3619. name: order
  3620. type: string
  3621. - description: Request ID
  3622. in: query
  3623. name: request_id
  3624. type: string
  3625. - description: Status code type
  3626. in: query
  3627. name: code_type
  3628. type: string
  3629. - description: Status code
  3630. in: query
  3631. name: code
  3632. type: integer
  3633. - description: With body
  3634. in: query
  3635. name: with_body
  3636. type: boolean
  3637. - description: IP
  3638. in: query
  3639. name: ip
  3640. type: string
  3641. - description: User
  3642. in: query
  3643. name: user
  3644. type: string
  3645. produces:
  3646. - application/json
  3647. responses:
  3648. "200":
  3649. description: OK
  3650. schema:
  3651. allOf:
  3652. - $ref: '#/definitions/middleware.APIResponse'
  3653. - properties:
  3654. data:
  3655. $ref: '#/definitions/model.GetLogsResult'
  3656. type: object
  3657. security:
  3658. - ApiKeyAuth: []
  3659. summary: Get all logs
  3660. tags:
  3661. - logs
  3662. /api/logs/consume_error:
  3663. get:
  3664. description: Search for logs with consumption errors
  3665. parameters:
  3666. - description: Page number
  3667. in: query
  3668. name: page
  3669. type: integer
  3670. - description: Items per page
  3671. in: query
  3672. name: per_page
  3673. type: integer
  3674. - description: Start timestamp (milliseconds)
  3675. in: query
  3676. name: start_timestamp
  3677. type: integer
  3678. - description: End timestamp (milliseconds)
  3679. in: query
  3680. name: end_timestamp
  3681. type: integer
  3682. - description: Keyword
  3683. in: query
  3684. name: keyword
  3685. type: string
  3686. - description: Group
  3687. in: query
  3688. name: group
  3689. type: string
  3690. - description: Token name
  3691. in: query
  3692. name: token_name
  3693. type: string
  3694. - description: Model name
  3695. in: query
  3696. name: model_name
  3697. type: string
  3698. - description: Content
  3699. in: query
  3700. name: content
  3701. type: string
  3702. - description: Token ID
  3703. in: query
  3704. name: token_id
  3705. type: integer
  3706. - description: Order
  3707. in: query
  3708. name: order
  3709. type: string
  3710. - description: Request ID
  3711. in: query
  3712. name: request_id
  3713. type: string
  3714. produces:
  3715. - application/json
  3716. responses:
  3717. "200":
  3718. description: OK
  3719. schema:
  3720. allOf:
  3721. - $ref: '#/definitions/middleware.APIResponse'
  3722. - properties:
  3723. data:
  3724. additionalProperties:
  3725. allOf:
  3726. - {}
  3727. - properties:
  3728. logs:
  3729. items:
  3730. $ref: '#/definitions/model.RequestDetail'
  3731. type: array
  3732. total:
  3733. type: integer
  3734. type: object
  3735. type: object
  3736. type: object
  3737. security:
  3738. - ApiKeyAuth: []
  3739. summary: Search consumption errors
  3740. tags:
  3741. - logs
  3742. /api/logs/detail/{log_id}:
  3743. get:
  3744. description: Get detailed information about a specific log entry
  3745. parameters:
  3746. - description: Log ID
  3747. in: path
  3748. name: log_id
  3749. required: true
  3750. type: string
  3751. produces:
  3752. - application/json
  3753. responses:
  3754. "200":
  3755. description: OK
  3756. schema:
  3757. allOf:
  3758. - $ref: '#/definitions/middleware.APIResponse'
  3759. - properties:
  3760. data:
  3761. $ref: '#/definitions/model.RequestDetail'
  3762. type: object
  3763. security:
  3764. - ApiKeyAuth: []
  3765. summary: Get log detail
  3766. tags:
  3767. - logs
  3768. /api/logs/search:
  3769. get:
  3770. description: Search logs with various filters
  3771. parameters:
  3772. - description: Keyword
  3773. in: query
  3774. name: keyword
  3775. type: string
  3776. - description: Page number
  3777. in: query
  3778. name: page
  3779. type: integer
  3780. - description: Items per page
  3781. in: query
  3782. name: per_page
  3783. type: integer
  3784. - description: Start timestamp (milliseconds)
  3785. in: query
  3786. name: start_timestamp
  3787. type: integer
  3788. - description: End timestamp (milliseconds)
  3789. in: query
  3790. name: end_timestamp
  3791. type: integer
  3792. - description: Filter by model name
  3793. in: query
  3794. name: model_name
  3795. type: string
  3796. - description: Filter by channel
  3797. in: query
  3798. name: channel
  3799. type: integer
  3800. - description: Filter by token id
  3801. in: query
  3802. name: token_id
  3803. type: integer
  3804. - description: Order
  3805. in: query
  3806. name: order
  3807. type: string
  3808. - description: Request ID
  3809. in: query
  3810. name: request_id
  3811. type: string
  3812. - description: Status code type
  3813. in: query
  3814. name: code_type
  3815. type: string
  3816. - description: Status code
  3817. in: query
  3818. name: code
  3819. type: integer
  3820. - description: With body
  3821. in: query
  3822. name: with_body
  3823. type: boolean
  3824. - description: IP
  3825. in: query
  3826. name: ip
  3827. type: string
  3828. - description: User
  3829. in: query
  3830. name: user
  3831. type: string
  3832. produces:
  3833. - application/json
  3834. responses:
  3835. "200":
  3836. description: OK
  3837. schema:
  3838. allOf:
  3839. - $ref: '#/definitions/middleware.APIResponse'
  3840. - properties:
  3841. data:
  3842. $ref: '#/definitions/model.GetLogsResult'
  3843. type: object
  3844. security:
  3845. - ApiKeyAuth: []
  3846. summary: Search logs
  3847. tags:
  3848. - logs
  3849. /api/mcp/group/{group}:
  3850. get:
  3851. description: Get a list of Group MCPs with pagination and filtering
  3852. parameters:
  3853. - description: Group ID
  3854. in: path
  3855. name: group
  3856. required: true
  3857. type: string
  3858. - description: Page number
  3859. in: query
  3860. name: page
  3861. type: integer
  3862. - description: Items per page
  3863. in: query
  3864. name: per_page
  3865. type: integer
  3866. - description: MCP type
  3867. in: query
  3868. name: type
  3869. type: string
  3870. - description: Search keyword
  3871. in: query
  3872. name: keyword
  3873. type: string
  3874. - description: MCP status
  3875. in: query
  3876. name: status
  3877. type: integer
  3878. produces:
  3879. - application/json
  3880. responses:
  3881. "200":
  3882. description: OK
  3883. schema:
  3884. allOf:
  3885. - $ref: '#/definitions/middleware.APIResponse'
  3886. - properties:
  3887. data:
  3888. items:
  3889. $ref: '#/definitions/controller.GroupMCPResponse'
  3890. type: array
  3891. type: object
  3892. security:
  3893. - ApiKeyAuth: []
  3894. summary: Get Group MCPs
  3895. tags:
  3896. - mcp
  3897. post:
  3898. consumes:
  3899. - application/json
  3900. description: Create a new Group MCP
  3901. parameters:
  3902. - description: Group ID
  3903. in: path
  3904. name: group
  3905. required: true
  3906. type: string
  3907. - description: Group MCP object
  3908. in: body
  3909. name: mcp
  3910. required: true
  3911. schema:
  3912. $ref: '#/definitions/model.GroupMCP'
  3913. produces:
  3914. - application/json
  3915. responses:
  3916. "200":
  3917. description: OK
  3918. schema:
  3919. allOf:
  3920. - $ref: '#/definitions/middleware.APIResponse'
  3921. - properties:
  3922. data:
  3923. $ref: '#/definitions/controller.GroupMCPResponse'
  3924. type: object
  3925. security:
  3926. - ApiKeyAuth: []
  3927. summary: Create Group MCP
  3928. tags:
  3929. - mcp
  3930. /api/mcp/group/{group}/{id}:
  3931. delete:
  3932. description: Delete a Group MCP by ID and Group ID
  3933. parameters:
  3934. - description: MCP ID
  3935. in: path
  3936. name: id
  3937. required: true
  3938. type: string
  3939. - description: Group ID
  3940. in: path
  3941. name: group
  3942. required: true
  3943. type: string
  3944. produces:
  3945. - application/json
  3946. responses:
  3947. "200":
  3948. description: OK
  3949. schema:
  3950. $ref: '#/definitions/middleware.APIResponse'
  3951. security:
  3952. - ApiKeyAuth: []
  3953. summary: Delete Group MCP
  3954. tags:
  3955. - mcp
  3956. get:
  3957. description: Get a specific Group MCP by its ID and Group ID
  3958. parameters:
  3959. - description: MCP ID
  3960. in: path
  3961. name: id
  3962. required: true
  3963. type: string
  3964. - description: Group ID
  3965. in: path
  3966. name: group
  3967. required: true
  3968. type: string
  3969. produces:
  3970. - application/json
  3971. responses:
  3972. "200":
  3973. description: OK
  3974. schema:
  3975. allOf:
  3976. - $ref: '#/definitions/middleware.APIResponse'
  3977. - properties:
  3978. data:
  3979. $ref: '#/definitions/controller.GroupMCPResponse'
  3980. type: object
  3981. security:
  3982. - ApiKeyAuth: []
  3983. summary: Get Group MCP by ID
  3984. tags:
  3985. - mcp
  3986. put:
  3987. consumes:
  3988. - application/json
  3989. description: Update an existing Group MCP
  3990. parameters:
  3991. - description: MCP ID
  3992. in: path
  3993. name: id
  3994. required: true
  3995. type: string
  3996. - description: Group ID
  3997. in: path
  3998. name: group
  3999. required: true
  4000. type: string
  4001. - description: Group MCP object
  4002. in: body
  4003. name: mcp
  4004. required: true
  4005. schema:
  4006. $ref: '#/definitions/model.GroupMCP'
  4007. produces:
  4008. - application/json
  4009. responses:
  4010. "200":
  4011. description: OK
  4012. schema:
  4013. allOf:
  4014. - $ref: '#/definitions/middleware.APIResponse'
  4015. - properties:
  4016. data:
  4017. $ref: '#/definitions/controller.GroupMCPResponse'
  4018. type: object
  4019. security:
  4020. - ApiKeyAuth: []
  4021. summary: Update Group MCP
  4022. tags:
  4023. - mcp
  4024. /api/mcp/group/{group}/{id}/status:
  4025. post:
  4026. consumes:
  4027. - application/json
  4028. description: Update the status of a Group MCP
  4029. parameters:
  4030. - description: MCP ID
  4031. in: path
  4032. name: id
  4033. required: true
  4034. type: string
  4035. - description: Group ID
  4036. in: path
  4037. name: group
  4038. required: true
  4039. type: string
  4040. - description: MCP status
  4041. in: body
  4042. name: status
  4043. required: true
  4044. schema:
  4045. $ref: '#/definitions/controller.UpdateGroupMCPStatusRequest'
  4046. produces:
  4047. - application/json
  4048. responses:
  4049. "200":
  4050. description: OK
  4051. schema:
  4052. $ref: '#/definitions/middleware.APIResponse'
  4053. security:
  4054. - ApiKeyAuth: []
  4055. summary: Update Group MCP status
  4056. tags:
  4057. - mcp
  4058. /api/mcp/group/all:
  4059. get:
  4060. description: Get all Group MCPs with filtering
  4061. parameters:
  4062. - description: MCP status
  4063. in: query
  4064. name: status
  4065. type: integer
  4066. produces:
  4067. - application/json
  4068. responses:
  4069. "200":
  4070. description: OK
  4071. schema:
  4072. allOf:
  4073. - $ref: '#/definitions/middleware.APIResponse'
  4074. - properties:
  4075. data:
  4076. items:
  4077. $ref: '#/definitions/controller.GroupMCPResponse'
  4078. type: array
  4079. type: object
  4080. security:
  4081. - ApiKeyAuth: []
  4082. summary: Get all Group MCPs
  4083. tags:
  4084. - mcp
  4085. /api/mcp/public/:
  4086. get:
  4087. description: Get a list of MCPs with pagination and filtering
  4088. parameters:
  4089. - description: Page number
  4090. in: query
  4091. name: page
  4092. type: integer
  4093. - description: Items per page
  4094. in: query
  4095. name: per_page
  4096. type: integer
  4097. - description: MCP type
  4098. in: query
  4099. name: type
  4100. type: string
  4101. - description: Search keyword
  4102. in: query
  4103. name: keyword
  4104. type: string
  4105. - description: MCP status
  4106. in: query
  4107. name: status
  4108. type: integer
  4109. produces:
  4110. - application/json
  4111. responses:
  4112. "200":
  4113. description: OK
  4114. schema:
  4115. allOf:
  4116. - $ref: '#/definitions/middleware.APIResponse'
  4117. - properties:
  4118. data:
  4119. items:
  4120. $ref: '#/definitions/controller.PublicMCPResponse'
  4121. type: array
  4122. type: object
  4123. security:
  4124. - ApiKeyAuth: []
  4125. summary: Get MCPs
  4126. tags:
  4127. - mcp
  4128. post:
  4129. consumes:
  4130. - application/json
  4131. description: Create a new MCP
  4132. parameters:
  4133. - description: MCP object
  4134. in: body
  4135. name: mcp
  4136. required: true
  4137. schema:
  4138. $ref: '#/definitions/model.PublicMCP'
  4139. produces:
  4140. - application/json
  4141. responses:
  4142. "200":
  4143. description: OK
  4144. schema:
  4145. allOf:
  4146. - $ref: '#/definitions/middleware.APIResponse'
  4147. - properties:
  4148. data:
  4149. $ref: '#/definitions/controller.PublicMCPResponse'
  4150. type: object
  4151. security:
  4152. - ApiKeyAuth: []
  4153. summary: Create MCP
  4154. tags:
  4155. - mcp
  4156. /api/mcp/public/{id}:
  4157. delete:
  4158. description: Delete an MCP by ID
  4159. parameters:
  4160. - description: MCP ID
  4161. in: path
  4162. name: id
  4163. required: true
  4164. type: string
  4165. produces:
  4166. - application/json
  4167. responses:
  4168. "200":
  4169. description: OK
  4170. schema:
  4171. $ref: '#/definitions/middleware.APIResponse'
  4172. security:
  4173. - ApiKeyAuth: []
  4174. summary: Delete MCP
  4175. tags:
  4176. - mcp
  4177. get:
  4178. description: Get a specific MCP by its ID
  4179. parameters:
  4180. - description: MCP ID
  4181. in: path
  4182. name: id
  4183. required: true
  4184. type: string
  4185. produces:
  4186. - application/json
  4187. responses:
  4188. "200":
  4189. description: OK
  4190. schema:
  4191. allOf:
  4192. - $ref: '#/definitions/middleware.APIResponse'
  4193. - properties:
  4194. data:
  4195. $ref: '#/definitions/controller.PublicMCPResponse'
  4196. type: object
  4197. security:
  4198. - ApiKeyAuth: []
  4199. summary: Get MCP by ID
  4200. tags:
  4201. - mcp
  4202. put:
  4203. consumes:
  4204. - application/json
  4205. description: Update an existing MCP
  4206. parameters:
  4207. - description: MCP ID
  4208. in: path
  4209. name: id
  4210. required: true
  4211. type: string
  4212. - description: MCP object
  4213. in: body
  4214. name: mcp
  4215. required: true
  4216. schema:
  4217. $ref: '#/definitions/model.PublicMCP'
  4218. produces:
  4219. - application/json
  4220. responses:
  4221. "200":
  4222. description: OK
  4223. schema:
  4224. allOf:
  4225. - $ref: '#/definitions/middleware.APIResponse'
  4226. - properties:
  4227. data:
  4228. $ref: '#/definitions/controller.PublicMCPResponse'
  4229. type: object
  4230. security:
  4231. - ApiKeyAuth: []
  4232. summary: Update MCP
  4233. tags:
  4234. - mcp
  4235. /api/mcp/public/{id}/group/{group}/params:
  4236. get:
  4237. description: Get reusing parameters for a specific group and MCP
  4238. parameters:
  4239. - description: MCP ID
  4240. in: path
  4241. name: id
  4242. required: true
  4243. type: string
  4244. - description: Group ID
  4245. in: path
  4246. name: group
  4247. required: true
  4248. type: string
  4249. produces:
  4250. - application/json
  4251. responses:
  4252. "200":
  4253. description: OK
  4254. schema:
  4255. allOf:
  4256. - $ref: '#/definitions/middleware.APIResponse'
  4257. - properties:
  4258. data:
  4259. $ref: '#/definitions/model.PublicMCPReusingParam'
  4260. type: object
  4261. security:
  4262. - ApiKeyAuth: []
  4263. summary: Get group MCP reusing parameters
  4264. tags:
  4265. - mcp
  4266. post:
  4267. consumes:
  4268. - application/json
  4269. description: Create or update reusing parameters for a specific group and MCP
  4270. parameters:
  4271. - description: MCP ID
  4272. in: path
  4273. name: id
  4274. required: true
  4275. type: string
  4276. - description: Group ID
  4277. in: path
  4278. name: group
  4279. required: true
  4280. type: string
  4281. - description: Reusing parameters
  4282. in: body
  4283. name: params
  4284. required: true
  4285. schema:
  4286. $ref: '#/definitions/model.PublicMCPReusingParam'
  4287. produces:
  4288. - application/json
  4289. responses:
  4290. "200":
  4291. description: OK
  4292. schema:
  4293. $ref: '#/definitions/middleware.APIResponse'
  4294. security:
  4295. - ApiKeyAuth: []
  4296. summary: Create or update group MCP reusing parameters
  4297. tags:
  4298. - mcp
  4299. /api/mcp/public/{id}/status:
  4300. post:
  4301. consumes:
  4302. - application/json
  4303. description: Update the status of an MCP
  4304. parameters:
  4305. - description: MCP ID
  4306. in: path
  4307. name: id
  4308. required: true
  4309. type: string
  4310. - description: MCP status
  4311. in: body
  4312. name: status
  4313. required: true
  4314. schema:
  4315. $ref: '#/definitions/controller.UpdatePublicMCPStatusRequest'
  4316. produces:
  4317. - application/json
  4318. responses:
  4319. "200":
  4320. description: OK
  4321. schema:
  4322. $ref: '#/definitions/middleware.APIResponse'
  4323. security:
  4324. - ApiKeyAuth: []
  4325. summary: Update MCP status
  4326. tags:
  4327. - mcp
  4328. /api/mcp/public/all:
  4329. get:
  4330. description: Get all MCPs with filtering
  4331. parameters:
  4332. - description: MCP status
  4333. in: query
  4334. name: status
  4335. type: integer
  4336. produces:
  4337. - application/json
  4338. responses:
  4339. "200":
  4340. description: OK
  4341. schema:
  4342. allOf:
  4343. - $ref: '#/definitions/middleware.APIResponse'
  4344. - properties:
  4345. data:
  4346. items:
  4347. $ref: '#/definitions/controller.PublicMCPResponse'
  4348. type: array
  4349. type: object
  4350. security:
  4351. - ApiKeyAuth: []
  4352. summary: Get all MCPs
  4353. tags:
  4354. - mcp
  4355. /api/model_config/:
  4356. post:
  4357. description: Saves a model config
  4358. parameters:
  4359. - description: Model config
  4360. in: body
  4361. name: config
  4362. required: true
  4363. schema:
  4364. $ref: '#/definitions/controller.SaveModelConfigsRequest'
  4365. produces:
  4366. - application/json
  4367. responses:
  4368. "200":
  4369. description: OK
  4370. schema:
  4371. $ref: '#/definitions/middleware.APIResponse'
  4372. security:
  4373. - ApiKeyAuth: []
  4374. summary: Save model config
  4375. tags:
  4376. - modelconfig
  4377. /api/model_config/{model}:
  4378. delete:
  4379. description: Deletes a model config
  4380. parameters:
  4381. - description: Model name
  4382. in: path
  4383. name: model
  4384. required: true
  4385. type: string
  4386. produces:
  4387. - application/json
  4388. responses:
  4389. "200":
  4390. description: OK
  4391. schema:
  4392. $ref: '#/definitions/middleware.APIResponse'
  4393. security:
  4394. - ApiKeyAuth: []
  4395. summary: Delete model config
  4396. tags:
  4397. - modelconfig
  4398. get:
  4399. description: Returns a model config
  4400. parameters:
  4401. - description: Model name
  4402. in: path
  4403. name: model
  4404. required: true
  4405. type: string
  4406. produces:
  4407. - application/json
  4408. responses:
  4409. "200":
  4410. description: OK
  4411. schema:
  4412. allOf:
  4413. - $ref: '#/definitions/middleware.APIResponse'
  4414. - properties:
  4415. data:
  4416. $ref: '#/definitions/model.ModelConfig'
  4417. type: object
  4418. security:
  4419. - ApiKeyAuth: []
  4420. summary: Get model config
  4421. tags:
  4422. - modelconfig
  4423. /api/model_configs/:
  4424. get:
  4425. description: Returns a list of model configs with pagination
  4426. parameters:
  4427. - description: Model name
  4428. in: query
  4429. name: model
  4430. type: string
  4431. produces:
  4432. - application/json
  4433. responses:
  4434. "200":
  4435. description: OK
  4436. schema:
  4437. allOf:
  4438. - $ref: '#/definitions/middleware.APIResponse'
  4439. - properties:
  4440. data:
  4441. additionalProperties:
  4442. allOf:
  4443. - {}
  4444. - properties:
  4445. configs:
  4446. items:
  4447. $ref: '#/definitions/model.ModelConfig'
  4448. type: array
  4449. total:
  4450. type: integer
  4451. type: object
  4452. type: object
  4453. type: object
  4454. security:
  4455. - ApiKeyAuth: []
  4456. summary: Get model configs
  4457. tags:
  4458. - modelconfig
  4459. post:
  4460. description: Saves a list of model configs
  4461. parameters:
  4462. - description: Model configs
  4463. in: body
  4464. name: configs
  4465. required: true
  4466. schema:
  4467. items:
  4468. $ref: '#/definitions/controller.SaveModelConfigsRequest'
  4469. type: array
  4470. produces:
  4471. - application/json
  4472. responses:
  4473. "200":
  4474. description: OK
  4475. schema:
  4476. $ref: '#/definitions/middleware.APIResponse'
  4477. security:
  4478. - ApiKeyAuth: []
  4479. summary: Save model configs
  4480. tags:
  4481. - modelconfig
  4482. /api/model_configs/all:
  4483. get:
  4484. description: Returns a list of all model configs
  4485. produces:
  4486. - application/json
  4487. responses:
  4488. "200":
  4489. description: OK
  4490. schema:
  4491. allOf:
  4492. - $ref: '#/definitions/middleware.APIResponse'
  4493. - properties:
  4494. data:
  4495. items:
  4496. $ref: '#/definitions/model.ModelConfig'
  4497. type: array
  4498. type: object
  4499. security:
  4500. - ApiKeyAuth: []
  4501. summary: Get all model configs
  4502. tags:
  4503. - modelconfig
  4504. /api/model_configs/batch_delete:
  4505. post:
  4506. description: Deletes a list of model configs
  4507. parameters:
  4508. - description: Model names
  4509. in: body
  4510. name: models
  4511. required: true
  4512. schema:
  4513. items:
  4514. type: string
  4515. type: array
  4516. produces:
  4517. - application/json
  4518. responses:
  4519. "200":
  4520. description: OK
  4521. schema:
  4522. $ref: '#/definitions/middleware.APIResponse'
  4523. security:
  4524. - ApiKeyAuth: []
  4525. summary: Delete model configs
  4526. tags:
  4527. - modelconfig
  4528. /api/model_configs/contains:
  4529. post:
  4530. description: Returns a list of model configs by models contains
  4531. parameters:
  4532. - description: Models
  4533. in: body
  4534. name: models
  4535. required: true
  4536. schema:
  4537. $ref: '#/definitions/controller.GetModelConfigsByModelsContainsRequest'
  4538. produces:
  4539. - application/json
  4540. responses:
  4541. "200":
  4542. description: OK
  4543. schema:
  4544. allOf:
  4545. - $ref: '#/definitions/middleware.APIResponse'
  4546. - properties:
  4547. data:
  4548. items:
  4549. $ref: '#/definitions/model.ModelConfig'
  4550. type: array
  4551. type: object
  4552. security:
  4553. - ApiKeyAuth: []
  4554. summary: Get model configs by models contains
  4555. tags:
  4556. - modelconfig
  4557. /api/model_configs/search:
  4558. get:
  4559. description: Returns a list of model configs by keyword
  4560. parameters:
  4561. - description: Keyword
  4562. in: query
  4563. name: keyword
  4564. type: string
  4565. - description: Model name
  4566. in: query
  4567. name: model
  4568. type: string
  4569. - description: Owner
  4570. in: query
  4571. name: owner
  4572. type: string
  4573. - description: Page
  4574. in: query
  4575. name: page
  4576. type: integer
  4577. - description: Per page
  4578. in: query
  4579. name: per_page
  4580. type: integer
  4581. produces:
  4582. - application/json
  4583. responses:
  4584. "200":
  4585. description: OK
  4586. schema:
  4587. allOf:
  4588. - $ref: '#/definitions/middleware.APIResponse'
  4589. - properties:
  4590. data:
  4591. additionalProperties:
  4592. allOf:
  4593. - {}
  4594. - properties:
  4595. configs:
  4596. items:
  4597. $ref: '#/definitions/model.ModelConfig'
  4598. type: array
  4599. total:
  4600. type: integer
  4601. type: object
  4602. type: object
  4603. type: object
  4604. security:
  4605. - ApiKeyAuth: []
  4606. summary: Search model configs
  4607. tags:
  4608. - modelconfig
  4609. /api/models/builtin:
  4610. get:
  4611. description: Returns a list of builtin models
  4612. produces:
  4613. - application/json
  4614. responses:
  4615. "200":
  4616. description: OK
  4617. schema:
  4618. allOf:
  4619. - $ref: '#/definitions/middleware.APIResponse'
  4620. - properties:
  4621. data:
  4622. items:
  4623. $ref: '#/definitions/controller.BuiltinModelConfig'
  4624. type: array
  4625. type: object
  4626. security:
  4627. - ApiKeyAuth: []
  4628. summary: Get builtin models
  4629. tags:
  4630. - model
  4631. /api/models/builtin/channel:
  4632. get:
  4633. description: Returns a list of channel builtin models
  4634. produces:
  4635. - application/json
  4636. responses:
  4637. "200":
  4638. description: OK
  4639. schema:
  4640. allOf:
  4641. - $ref: '#/definitions/middleware.APIResponse'
  4642. - properties:
  4643. data:
  4644. additionalProperties:
  4645. items:
  4646. $ref: '#/definitions/controller.BuiltinModelConfig'
  4647. type: array
  4648. type: object
  4649. type: object
  4650. security:
  4651. - ApiKeyAuth: []
  4652. summary: Get channel builtin models
  4653. tags:
  4654. - model
  4655. /api/models/builtin/channel/{type}:
  4656. get:
  4657. description: Returns a list of channel builtin models by type
  4658. parameters:
  4659. - description: Channel type
  4660. enum:
  4661. - 1
  4662. - 3
  4663. - 4
  4664. - 12
  4665. - 13
  4666. - 14
  4667. - 15
  4668. - 16
  4669. - 17
  4670. - 18
  4671. - 19
  4672. - 20
  4673. - 23
  4674. - 24
  4675. - 25
  4676. - 26
  4677. - 27
  4678. - 28
  4679. - 29
  4680. - 30
  4681. - 31
  4682. - 32
  4683. - 33
  4684. - 34
  4685. - 35
  4686. - 36
  4687. - 37
  4688. - 40
  4689. - 41
  4690. - 42
  4691. - 43
  4692. - 44
  4693. - 45
  4694. - 46
  4695. - 47
  4696. - 48
  4697. in: path
  4698. name: type
  4699. required: true
  4700. type: integer
  4701. produces:
  4702. - application/json
  4703. responses:
  4704. "200":
  4705. description: OK
  4706. schema:
  4707. allOf:
  4708. - $ref: '#/definitions/middleware.APIResponse'
  4709. - properties:
  4710. data:
  4711. items:
  4712. $ref: '#/definitions/controller.BuiltinModelConfig'
  4713. type: array
  4714. type: object
  4715. security:
  4716. - ApiKeyAuth: []
  4717. summary: Get channel builtin models by type
  4718. tags:
  4719. - model
  4720. /api/models/default:
  4721. get:
  4722. description: Returns a list of channel default models and mapping
  4723. produces:
  4724. - application/json
  4725. responses:
  4726. "200":
  4727. description: OK
  4728. schema:
  4729. allOf:
  4730. - $ref: '#/definitions/middleware.APIResponse'
  4731. - properties:
  4732. data:
  4733. additionalProperties:
  4734. allOf:
  4735. - {}
  4736. - properties:
  4737. mapping:
  4738. additionalProperties:
  4739. type: string
  4740. type: object
  4741. models:
  4742. items:
  4743. type: string
  4744. type: array
  4745. type: object
  4746. type: object
  4747. type: object
  4748. security:
  4749. - ApiKeyAuth: []
  4750. summary: Get channel default models and mapping
  4751. tags:
  4752. - model
  4753. /api/models/default/{type}:
  4754. get:
  4755. description: Returns a list of channel default models and mapping by type
  4756. parameters:
  4757. - description: Channel type
  4758. in: path
  4759. name: type
  4760. required: true
  4761. type: string
  4762. produces:
  4763. - application/json
  4764. responses:
  4765. "200":
  4766. description: OK
  4767. schema:
  4768. allOf:
  4769. - $ref: '#/definitions/middleware.APIResponse'
  4770. - properties:
  4771. data:
  4772. additionalProperties:
  4773. allOf:
  4774. - {}
  4775. - properties:
  4776. mapping:
  4777. additionalProperties:
  4778. type: string
  4779. type: object
  4780. models:
  4781. items:
  4782. type: string
  4783. type: array
  4784. type: object
  4785. type: object
  4786. type: object
  4787. security:
  4788. - ApiKeyAuth: []
  4789. summary: Get channel default models and mapping by type
  4790. tags:
  4791. - model
  4792. /api/models/enabled:
  4793. get:
  4794. description: Returns a list of enabled models
  4795. produces:
  4796. - application/json
  4797. responses:
  4798. "200":
  4799. description: OK
  4800. schema:
  4801. allOf:
  4802. - $ref: '#/definitions/middleware.APIResponse'
  4803. - properties:
  4804. data:
  4805. additionalProperties:
  4806. items:
  4807. $ref: '#/definitions/model.ModelConfig'
  4808. type: array
  4809. type: object
  4810. type: object
  4811. security:
  4812. - ApiKeyAuth: []
  4813. summary: Get enabled models
  4814. tags:
  4815. - model
  4816. /api/models/enabled/{set}:
  4817. get:
  4818. description: Returns a list of enabled models by set
  4819. parameters:
  4820. - description: Models set
  4821. in: path
  4822. name: set
  4823. required: true
  4824. type: string
  4825. produces:
  4826. - application/json
  4827. responses:
  4828. "200":
  4829. description: OK
  4830. schema:
  4831. allOf:
  4832. - $ref: '#/definitions/middleware.APIResponse'
  4833. - properties:
  4834. data:
  4835. items:
  4836. $ref: '#/definitions/model.ModelConfig'
  4837. type: array
  4838. type: object
  4839. security:
  4840. - ApiKeyAuth: []
  4841. summary: Get enabled models by set
  4842. tags:
  4843. - model
  4844. /api/models/sets:
  4845. get:
  4846. description: Returns a list of enabled models and channels sets
  4847. produces:
  4848. - application/json
  4849. responses:
  4850. "200":
  4851. description: OK
  4852. schema:
  4853. allOf:
  4854. - $ref: '#/definitions/middleware.APIResponse'
  4855. - properties:
  4856. data:
  4857. additionalProperties:
  4858. additionalProperties:
  4859. items:
  4860. $ref: '#/definitions/controller.EnabledModelChannel'
  4861. type: array
  4862. type: object
  4863. type: object
  4864. type: object
  4865. security:
  4866. - ApiKeyAuth: []
  4867. summary: Get enabled models and channels sets
  4868. tags:
  4869. - model
  4870. /api/monitor/:
  4871. delete:
  4872. description: Clears all model errors
  4873. produces:
  4874. - application/json
  4875. responses:
  4876. "200":
  4877. description: OK
  4878. schema:
  4879. $ref: '#/definitions/middleware.APIResponse'
  4880. security:
  4881. - ApiKeyAuth: []
  4882. summary: Clear all model errors
  4883. tags:
  4884. - monitor
  4885. get:
  4886. description: Returns a list of all channel model error rates
  4887. produces:
  4888. - application/json
  4889. responses:
  4890. "200":
  4891. description: OK
  4892. schema:
  4893. allOf:
  4894. - $ref: '#/definitions/middleware.APIResponse'
  4895. - properties:
  4896. data:
  4897. additionalProperties:
  4898. additionalProperties:
  4899. type: number
  4900. type: object
  4901. type: object
  4902. type: object
  4903. security:
  4904. - ApiKeyAuth: []
  4905. summary: Get all channel model error rates
  4906. tags:
  4907. - monitor
  4908. /api/monitor/{id}:
  4909. delete:
  4910. description: Clears all model errors for a specific channel
  4911. parameters:
  4912. - description: Channel ID
  4913. in: path
  4914. name: id
  4915. required: true
  4916. type: integer
  4917. produces:
  4918. - application/json
  4919. responses:
  4920. "200":
  4921. description: OK
  4922. schema:
  4923. $ref: '#/definitions/middleware.APIResponse'
  4924. security:
  4925. - ApiKeyAuth: []
  4926. summary: Clear channel all model errors
  4927. tags:
  4928. - monitor
  4929. get:
  4930. description: Returns a list of channel model error rates
  4931. parameters:
  4932. - description: Channel ID
  4933. in: path
  4934. name: id
  4935. required: true
  4936. type: integer
  4937. produces:
  4938. - application/json
  4939. responses:
  4940. "200":
  4941. description: OK
  4942. schema:
  4943. allOf:
  4944. - $ref: '#/definitions/middleware.APIResponse'
  4945. - properties:
  4946. data:
  4947. items:
  4948. additionalProperties:
  4949. type: number
  4950. type: object
  4951. type: array
  4952. type: object
  4953. security:
  4954. - ApiKeyAuth: []
  4955. summary: Get channel model error rates
  4956. tags:
  4957. - monitor
  4958. /api/monitor/{id}/{model}:
  4959. delete:
  4960. description: Clears model errors for a specific channel and model
  4961. parameters:
  4962. - description: Channel ID
  4963. in: path
  4964. name: id
  4965. required: true
  4966. type: integer
  4967. - description: Model name
  4968. in: path
  4969. name: model
  4970. required: true
  4971. type: string
  4972. produces:
  4973. - application/json
  4974. responses:
  4975. "200":
  4976. description: OK
  4977. schema:
  4978. $ref: '#/definitions/middleware.APIResponse'
  4979. security:
  4980. - ApiKeyAuth: []
  4981. summary: Clear channel model errors
  4982. tags:
  4983. - monitor
  4984. /api/monitor/banned_channels:
  4985. get:
  4986. description: Returns a list of all banned model channels
  4987. produces:
  4988. - application/json
  4989. responses:
  4990. "200":
  4991. description: OK
  4992. schema:
  4993. allOf:
  4994. - $ref: '#/definitions/middleware.APIResponse'
  4995. - properties:
  4996. data:
  4997. additionalProperties:
  4998. items:
  4999. type: integer
  5000. type: array
  5001. type: object
  5002. type: object
  5003. security:
  5004. - ApiKeyAuth: []
  5005. summary: Get all banned model channels
  5006. tags:
  5007. - monitor
  5008. /api/monitor/models:
  5009. get:
  5010. description: Returns a list of models error rate
  5011. produces:
  5012. - application/json
  5013. responses:
  5014. "200":
  5015. description: OK
  5016. schema:
  5017. allOf:
  5018. - $ref: '#/definitions/middleware.APIResponse'
  5019. - properties:
  5020. data:
  5021. additionalProperties:
  5022. type: number
  5023. type: object
  5024. type: object
  5025. security:
  5026. - ApiKeyAuth: []
  5027. summary: Get models error rate
  5028. tags:
  5029. - monitor
  5030. /api/option/:
  5031. get:
  5032. description: Returns a list of options
  5033. produces:
  5034. - application/json
  5035. responses:
  5036. "200":
  5037. description: OK
  5038. schema:
  5039. allOf:
  5040. - $ref: '#/definitions/middleware.APIResponse'
  5041. - properties:
  5042. data:
  5043. additionalProperties:
  5044. type: string
  5045. type: object
  5046. type: object
  5047. security:
  5048. - ApiKeyAuth: []
  5049. summary: Get options
  5050. tags:
  5051. - option
  5052. post:
  5053. description: Updates a single option
  5054. parameters:
  5055. - description: Option value
  5056. in: body
  5057. name: value
  5058. required: true
  5059. schema:
  5060. $ref: '#/definitions/model.Option'
  5061. produces:
  5062. - application/json
  5063. responses:
  5064. "200":
  5065. description: OK
  5066. schema:
  5067. $ref: '#/definitions/middleware.APIResponse'
  5068. security:
  5069. - ApiKeyAuth: []
  5070. summary: Update option
  5071. tags:
  5072. - option
  5073. put:
  5074. description: Updates a single option
  5075. parameters:
  5076. - description: Option value
  5077. in: body
  5078. name: value
  5079. required: true
  5080. schema:
  5081. $ref: '#/definitions/model.Option'
  5082. produces:
  5083. - application/json
  5084. responses:
  5085. "200":
  5086. description: OK
  5087. schema:
  5088. $ref: '#/definitions/middleware.APIResponse'
  5089. security:
  5090. - ApiKeyAuth: []
  5091. summary: Update option
  5092. tags:
  5093. - option
  5094. /api/option/{key}:
  5095. get:
  5096. description: Returns a single option
  5097. parameters:
  5098. - description: Option key
  5099. in: path
  5100. name: key
  5101. required: true
  5102. type: string
  5103. produces:
  5104. - application/json
  5105. responses:
  5106. "200":
  5107. description: OK
  5108. schema:
  5109. allOf:
  5110. - $ref: '#/definitions/middleware.APIResponse'
  5111. - properties:
  5112. data:
  5113. $ref: '#/definitions/model.Option'
  5114. type: object
  5115. security:
  5116. - ApiKeyAuth: []
  5117. summary: Get option
  5118. tags:
  5119. - option
  5120. put:
  5121. description: Updates a single option by key
  5122. parameters:
  5123. - description: Option key
  5124. in: path
  5125. name: key
  5126. required: true
  5127. type: string
  5128. - description: Option value
  5129. in: body
  5130. name: value
  5131. required: true
  5132. schema:
  5133. type: string
  5134. produces:
  5135. - application/json
  5136. responses:
  5137. "200":
  5138. description: OK
  5139. schema:
  5140. $ref: '#/definitions/middleware.APIResponse'
  5141. security:
  5142. - ApiKeyAuth: []
  5143. summary: Update option by key
  5144. tags:
  5145. - option
  5146. /api/option/batch:
  5147. post:
  5148. description: Updates multiple options
  5149. parameters:
  5150. - description: Options
  5151. in: body
  5152. name: options
  5153. required: true
  5154. schema:
  5155. additionalProperties:
  5156. type: string
  5157. type: object
  5158. produces:
  5159. - application/json
  5160. responses:
  5161. "200":
  5162. description: OK
  5163. schema:
  5164. $ref: '#/definitions/middleware.APIResponse'
  5165. security:
  5166. - ApiKeyAuth: []
  5167. summary: Update options
  5168. tags:
  5169. - option
  5170. /api/status:
  5171. get:
  5172. description: Returns the status of the server
  5173. produces:
  5174. - application/json
  5175. responses:
  5176. "200":
  5177. description: OK
  5178. schema:
  5179. allOf:
  5180. - $ref: '#/definitions/middleware.APIResponse'
  5181. - properties:
  5182. data:
  5183. $ref: '#/definitions/controller.StatusData'
  5184. type: object
  5185. summary: Get status
  5186. tags:
  5187. - misc
  5188. /api/test-embedmcp/{id}:
  5189. delete:
  5190. consumes:
  5191. - application/json
  5192. description: Test Embed MCP Streamable Server with various HTTP methods
  5193. parameters:
  5194. - description: MCP ID
  5195. in: path
  5196. name: id
  5197. required: true
  5198. type: string
  5199. - description: Initial configuration parameters (e.g. config[host]=http://localhost:3000)
  5200. in: query
  5201. name: config[key]
  5202. type: string
  5203. - description: Reusing configuration parameters (e.g., reusing[authorization]=apikey)
  5204. in: query
  5205. name: reusing[key]
  5206. type: string
  5207. produces:
  5208. - application/json
  5209. responses:
  5210. "200":
  5211. description: OK
  5212. "400":
  5213. description: Bad Request
  5214. security:
  5215. - ApiKeyAuth: []
  5216. summary: Test Embed MCP Streamable Server
  5217. tags:
  5218. - embedmcp
  5219. get:
  5220. consumes:
  5221. - application/json
  5222. description: Test Embed MCP Streamable Server with various HTTP methods
  5223. parameters:
  5224. - description: MCP ID
  5225. in: path
  5226. name: id
  5227. required: true
  5228. type: string
  5229. - description: Initial configuration parameters (e.g. config[host]=http://localhost:3000)
  5230. in: query
  5231. name: config[key]
  5232. type: string
  5233. - description: Reusing configuration parameters (e.g., reusing[authorization]=apikey)
  5234. in: query
  5235. name: reusing[key]
  5236. type: string
  5237. produces:
  5238. - application/json
  5239. responses:
  5240. "200":
  5241. description: OK
  5242. "400":
  5243. description: Bad Request
  5244. security:
  5245. - ApiKeyAuth: []
  5246. summary: Test Embed MCP Streamable Server
  5247. tags:
  5248. - embedmcp
  5249. post:
  5250. consumes:
  5251. - application/json
  5252. description: Test Embed MCP Streamable Server with various HTTP methods
  5253. parameters:
  5254. - description: MCP ID
  5255. in: path
  5256. name: id
  5257. required: true
  5258. type: string
  5259. - description: Initial configuration parameters (e.g. config[host]=http://localhost:3000)
  5260. in: query
  5261. name: config[key]
  5262. type: string
  5263. - description: Reusing configuration parameters (e.g., reusing[authorization]=apikey)
  5264. in: query
  5265. name: reusing[key]
  5266. type: string
  5267. produces:
  5268. - application/json
  5269. responses:
  5270. "200":
  5271. description: OK
  5272. "400":
  5273. description: Bad Request
  5274. security:
  5275. - ApiKeyAuth: []
  5276. summary: Test Embed MCP Streamable Server
  5277. tags:
  5278. - embedmcp
  5279. /api/test-embedmcp/{id}/sse:
  5280. get:
  5281. description: Test Embed MCP SSE Server
  5282. parameters:
  5283. - description: MCP ID
  5284. in: path
  5285. name: id
  5286. required: true
  5287. type: string
  5288. - description: Initial configuration parameters (e.g. config[host]=http://localhost:3000)
  5289. in: query
  5290. name: config[key]
  5291. type: string
  5292. - description: Reusing configuration parameters (e.g. reusing[authorization]=apikey)
  5293. in: query
  5294. name: reusing[key]
  5295. type: string
  5296. responses:
  5297. "200":
  5298. description: OK
  5299. "400":
  5300. description: Bad Request
  5301. security:
  5302. - ApiKeyAuth: []
  5303. summary: Test Embed MCP SSE Server
  5304. tags:
  5305. - embedmcp
  5306. /api/test-embedmcp/message:
  5307. post:
  5308. consumes:
  5309. - application/json
  5310. description: Send a message to the test embed MCP server
  5311. parameters:
  5312. - description: Session ID
  5313. in: query
  5314. name: sessionId
  5315. required: true
  5316. type: string
  5317. produces:
  5318. - application/json
  5319. responses:
  5320. "200":
  5321. description: OK
  5322. "400":
  5323. description: Bad Request
  5324. security:
  5325. - ApiKeyAuth: []
  5326. summary: Test Embed MCP Message
  5327. tags:
  5328. - embedmcp
  5329. /api/token/{group}:
  5330. post:
  5331. consumes:
  5332. - application/json
  5333. description: Adds a new token to a specific group
  5334. parameters:
  5335. - description: Group name
  5336. in: path
  5337. name: group
  5338. required: true
  5339. type: string
  5340. - description: Auto create group
  5341. in: query
  5342. name: auto_create_group
  5343. type: boolean
  5344. - description: Ignore exist
  5345. in: query
  5346. name: ignore_exist
  5347. type: boolean
  5348. - description: Token information
  5349. in: body
  5350. name: token
  5351. required: true
  5352. schema:
  5353. $ref: '#/definitions/controller.AddTokenRequest'
  5354. produces:
  5355. - application/json
  5356. responses:
  5357. "200":
  5358. description: OK
  5359. schema:
  5360. allOf:
  5361. - $ref: '#/definitions/middleware.APIResponse'
  5362. - properties:
  5363. data:
  5364. $ref: '#/definitions/controller.TokenResponse'
  5365. type: object
  5366. security:
  5367. - ApiKeyAuth: []
  5368. summary: Add group token
  5369. tags:
  5370. - token
  5371. /api/token/{group}/{id}:
  5372. delete:
  5373. description: Deletes a specific token from a group
  5374. parameters:
  5375. - description: Group name
  5376. in: path
  5377. name: group
  5378. required: true
  5379. type: string
  5380. - description: Token ID
  5381. in: path
  5382. name: id
  5383. required: true
  5384. type: integer
  5385. produces:
  5386. - application/json
  5387. responses:
  5388. "200":
  5389. description: OK
  5390. schema:
  5391. $ref: '#/definitions/middleware.APIResponse'
  5392. security:
  5393. - ApiKeyAuth: []
  5394. summary: Delete group token
  5395. tags:
  5396. - token
  5397. get:
  5398. description: Returns detailed information about a specific token for a specific
  5399. group
  5400. parameters:
  5401. - description: Group name
  5402. in: path
  5403. name: group
  5404. required: true
  5405. type: string
  5406. - description: Token ID
  5407. in: path
  5408. name: id
  5409. required: true
  5410. type: integer
  5411. produces:
  5412. - application/json
  5413. responses:
  5414. "200":
  5415. description: OK
  5416. schema:
  5417. allOf:
  5418. - $ref: '#/definitions/middleware.APIResponse'
  5419. - properties:
  5420. data:
  5421. $ref: '#/definitions/controller.TokenResponse'
  5422. type: object
  5423. security:
  5424. - ApiKeyAuth: []
  5425. summary: Get token by ID for a specific group
  5426. tags:
  5427. - token
  5428. put:
  5429. consumes:
  5430. - application/json
  5431. description: Updates an existing token in a specific group
  5432. parameters:
  5433. - description: Group name
  5434. in: path
  5435. name: group
  5436. required: true
  5437. type: string
  5438. - description: Token ID
  5439. in: path
  5440. name: id
  5441. required: true
  5442. type: integer
  5443. - description: Updated token information
  5444. in: body
  5445. name: token
  5446. required: true
  5447. schema:
  5448. $ref: '#/definitions/controller.AddTokenRequest'
  5449. produces:
  5450. - application/json
  5451. responses:
  5452. "200":
  5453. description: OK
  5454. schema:
  5455. allOf:
  5456. - $ref: '#/definitions/middleware.APIResponse'
  5457. - properties:
  5458. data:
  5459. $ref: '#/definitions/controller.TokenResponse'
  5460. type: object
  5461. security:
  5462. - ApiKeyAuth: []
  5463. summary: Update group token
  5464. tags:
  5465. - token
  5466. /api/token/{group}/{id}/name:
  5467. post:
  5468. consumes:
  5469. - application/json
  5470. description: Updates the name of a token in a specific group
  5471. parameters:
  5472. - description: Group name
  5473. in: path
  5474. name: group
  5475. required: true
  5476. type: string
  5477. - description: Token ID
  5478. in: path
  5479. name: id
  5480. required: true
  5481. type: integer
  5482. - description: Name information
  5483. in: body
  5484. name: name
  5485. required: true
  5486. schema:
  5487. $ref: '#/definitions/controller.UpdateTokenNameRequest'
  5488. produces:
  5489. - application/json
  5490. responses:
  5491. "200":
  5492. description: OK
  5493. schema:
  5494. $ref: '#/definitions/middleware.APIResponse'
  5495. security:
  5496. - ApiKeyAuth: []
  5497. summary: Update group token name
  5498. tags:
  5499. - token
  5500. /api/token/{group}/{id}/status:
  5501. post:
  5502. consumes:
  5503. - application/json
  5504. description: Updates the status of a token in a specific group
  5505. parameters:
  5506. - description: Group name
  5507. in: path
  5508. name: group
  5509. required: true
  5510. type: string
  5511. - description: Token ID
  5512. in: path
  5513. name: id
  5514. required: true
  5515. type: integer
  5516. - description: Status information
  5517. in: body
  5518. name: status
  5519. required: true
  5520. schema:
  5521. $ref: '#/definitions/controller.UpdateTokenStatusRequest'
  5522. produces:
  5523. - application/json
  5524. responses:
  5525. "200":
  5526. description: OK
  5527. schema:
  5528. $ref: '#/definitions/middleware.APIResponse'
  5529. security:
  5530. - ApiKeyAuth: []
  5531. summary: Update group token status
  5532. tags:
  5533. - token
  5534. /api/token/{group}/batch_delete:
  5535. post:
  5536. description: Deletes multiple tokens from a specific group
  5537. parameters:
  5538. - description: Group name
  5539. in: path
  5540. name: group
  5541. required: true
  5542. type: string
  5543. - description: Token IDs
  5544. in: body
  5545. name: ids
  5546. required: true
  5547. schema:
  5548. items:
  5549. type: integer
  5550. type: array
  5551. produces:
  5552. - application/json
  5553. responses:
  5554. "200":
  5555. description: OK
  5556. schema:
  5557. $ref: '#/definitions/middleware.APIResponse'
  5558. security:
  5559. - ApiKeyAuth: []
  5560. summary: Delete group tokens
  5561. tags:
  5562. - token
  5563. /api/token/{group}/search:
  5564. get:
  5565. description: Returns a paginated list of tokens for a specific group based on
  5566. search criteria
  5567. parameters:
  5568. - description: Group name
  5569. in: path
  5570. name: group
  5571. required: true
  5572. type: string
  5573. - description: Keyword
  5574. in: query
  5575. name: keyword
  5576. type: string
  5577. - description: Page number
  5578. in: query
  5579. name: page
  5580. type: integer
  5581. - description: Items per page
  5582. in: query
  5583. name: per_page
  5584. type: integer
  5585. - description: Order
  5586. in: query
  5587. name: order
  5588. type: string
  5589. - description: Name
  5590. in: query
  5591. name: name
  5592. type: string
  5593. - description: Key
  5594. in: query
  5595. name: key
  5596. type: string
  5597. - description: Status
  5598. in: query
  5599. name: status
  5600. type: integer
  5601. produces:
  5602. - application/json
  5603. responses:
  5604. "200":
  5605. description: OK
  5606. schema:
  5607. allOf:
  5608. - $ref: '#/definitions/middleware.APIResponse'
  5609. - properties:
  5610. data:
  5611. additionalProperties:
  5612. allOf:
  5613. - {}
  5614. - properties:
  5615. tokens:
  5616. items:
  5617. $ref: '#/definitions/controller.TokenResponse'
  5618. type: array
  5619. total:
  5620. type: integer
  5621. type: object
  5622. type: object
  5623. type: object
  5624. security:
  5625. - ApiKeyAuth: []
  5626. summary: Search tokens for a specific group
  5627. tags:
  5628. - token
  5629. /api/tokens/:
  5630. get:
  5631. description: Returns a paginated list of all tokens
  5632. parameters:
  5633. - description: Page number
  5634. in: query
  5635. name: page
  5636. type: integer
  5637. - description: Items per page
  5638. in: query
  5639. name: per_page
  5640. type: integer
  5641. - description: Group name
  5642. in: query
  5643. name: group
  5644. type: string
  5645. - description: Order
  5646. in: query
  5647. name: order
  5648. type: string
  5649. - description: Status
  5650. in: query
  5651. name: status
  5652. type: integer
  5653. produces:
  5654. - application/json
  5655. responses:
  5656. "200":
  5657. description: OK
  5658. schema:
  5659. allOf:
  5660. - $ref: '#/definitions/middleware.APIResponse'
  5661. - properties:
  5662. data:
  5663. additionalProperties:
  5664. allOf:
  5665. - {}
  5666. - properties:
  5667. tokens:
  5668. items:
  5669. $ref: '#/definitions/controller.TokenResponse'
  5670. type: array
  5671. total:
  5672. type: integer
  5673. type: object
  5674. type: object
  5675. type: object
  5676. security:
  5677. - ApiKeyAuth: []
  5678. summary: Get all tokens
  5679. tags:
  5680. - tokens
  5681. /api/tokens/{group}:
  5682. get:
  5683. description: Returns a paginated list of all tokens for a specific group
  5684. parameters:
  5685. - description: Group name
  5686. in: path
  5687. name: group
  5688. required: true
  5689. type: string
  5690. - description: Page number
  5691. in: query
  5692. name: page
  5693. type: integer
  5694. - description: Items per page
  5695. in: query
  5696. name: per_page
  5697. type: integer
  5698. - description: Order
  5699. in: query
  5700. name: order
  5701. type: string
  5702. - description: Status
  5703. in: query
  5704. name: status
  5705. type: integer
  5706. produces:
  5707. - application/json
  5708. responses:
  5709. "200":
  5710. description: OK
  5711. schema:
  5712. allOf:
  5713. - $ref: '#/definitions/middleware.APIResponse'
  5714. - properties:
  5715. data:
  5716. additionalProperties:
  5717. allOf:
  5718. - {}
  5719. - properties:
  5720. tokens:
  5721. items:
  5722. $ref: '#/definitions/controller.TokenResponse'
  5723. type: array
  5724. total:
  5725. type: integer
  5726. type: object
  5727. type: object
  5728. type: object
  5729. security:
  5730. - ApiKeyAuth: []
  5731. summary: Get all tokens for a specific group
  5732. tags:
  5733. - tokens
  5734. /api/tokens/{id}:
  5735. delete:
  5736. description: Deletes a specific token by ID
  5737. parameters:
  5738. - description: Token ID
  5739. in: path
  5740. name: id
  5741. required: true
  5742. type: integer
  5743. produces:
  5744. - application/json
  5745. responses:
  5746. "200":
  5747. description: OK
  5748. schema:
  5749. $ref: '#/definitions/middleware.APIResponse'
  5750. security:
  5751. - ApiKeyAuth: []
  5752. summary: Delete token
  5753. tags:
  5754. - tokens
  5755. get:
  5756. description: Returns detailed information about a specific token
  5757. parameters:
  5758. - description: Token ID
  5759. in: path
  5760. name: id
  5761. required: true
  5762. type: integer
  5763. produces:
  5764. - application/json
  5765. responses:
  5766. "200":
  5767. description: OK
  5768. schema:
  5769. allOf:
  5770. - $ref: '#/definitions/middleware.APIResponse'
  5771. - properties:
  5772. data:
  5773. $ref: '#/definitions/controller.TokenResponse'
  5774. type: object
  5775. security:
  5776. - ApiKeyAuth: []
  5777. summary: Get token by ID
  5778. tags:
  5779. - tokens
  5780. put:
  5781. consumes:
  5782. - application/json
  5783. description: Updates an existing token's information
  5784. parameters:
  5785. - description: Token ID
  5786. in: path
  5787. name: id
  5788. required: true
  5789. type: integer
  5790. - description: Updated token information
  5791. in: body
  5792. name: token
  5793. required: true
  5794. schema:
  5795. $ref: '#/definitions/controller.AddTokenRequest'
  5796. produces:
  5797. - application/json
  5798. responses:
  5799. "200":
  5800. description: OK
  5801. schema:
  5802. allOf:
  5803. - $ref: '#/definitions/middleware.APIResponse'
  5804. - properties:
  5805. data:
  5806. $ref: '#/definitions/controller.TokenResponse'
  5807. type: object
  5808. security:
  5809. - ApiKeyAuth: []
  5810. summary: Update token
  5811. tags:
  5812. - tokens
  5813. /api/tokens/{id}/name:
  5814. post:
  5815. consumes:
  5816. - application/json
  5817. description: Updates the name of a specific token
  5818. parameters:
  5819. - description: Token ID
  5820. in: path
  5821. name: id
  5822. required: true
  5823. type: integer
  5824. - description: Name information
  5825. in: body
  5826. name: name
  5827. required: true
  5828. schema:
  5829. $ref: '#/definitions/controller.UpdateTokenNameRequest'
  5830. produces:
  5831. - application/json
  5832. responses:
  5833. "200":
  5834. description: OK
  5835. schema:
  5836. $ref: '#/definitions/middleware.APIResponse'
  5837. security:
  5838. - ApiKeyAuth: []
  5839. summary: Update token name
  5840. tags:
  5841. - tokens
  5842. /api/tokens/{id}/status:
  5843. post:
  5844. consumes:
  5845. - application/json
  5846. description: Updates the status of a specific token
  5847. parameters:
  5848. - description: Token ID
  5849. in: path
  5850. name: id
  5851. required: true
  5852. type: integer
  5853. - description: Status information
  5854. in: body
  5855. name: status
  5856. required: true
  5857. schema:
  5858. $ref: '#/definitions/controller.UpdateTokenStatusRequest'
  5859. produces:
  5860. - application/json
  5861. responses:
  5862. "200":
  5863. description: OK
  5864. schema:
  5865. $ref: '#/definitions/middleware.APIResponse'
  5866. security:
  5867. - ApiKeyAuth: []
  5868. summary: Update token status
  5869. tags:
  5870. - tokens
  5871. /api/tokens/batch_delete:
  5872. post:
  5873. consumes:
  5874. - application/json
  5875. description: Deletes multiple tokens by their IDs
  5876. parameters:
  5877. - description: Token IDs
  5878. in: body
  5879. name: ids
  5880. required: true
  5881. schema:
  5882. items:
  5883. type: integer
  5884. type: array
  5885. produces:
  5886. - application/json
  5887. responses:
  5888. "200":
  5889. description: OK
  5890. schema:
  5891. $ref: '#/definitions/middleware.APIResponse'
  5892. security:
  5893. - ApiKeyAuth: []
  5894. summary: Delete multiple tokens
  5895. tags:
  5896. - tokens
  5897. /api/tokens/search:
  5898. get:
  5899. description: Returns a paginated list of tokens based on search criteria
  5900. parameters:
  5901. - description: Keyword
  5902. in: query
  5903. name: keyword
  5904. type: string
  5905. - description: Page number
  5906. in: query
  5907. name: page
  5908. type: integer
  5909. - description: Items per page
  5910. in: query
  5911. name: per_page
  5912. type: integer
  5913. - description: Order
  5914. in: query
  5915. name: order
  5916. type: string
  5917. - description: Name
  5918. in: query
  5919. name: name
  5920. type: string
  5921. - description: Key
  5922. in: query
  5923. name: key
  5924. type: string
  5925. - description: Status
  5926. in: query
  5927. name: status
  5928. type: integer
  5929. - description: Group
  5930. in: query
  5931. name: group
  5932. type: string
  5933. produces:
  5934. - application/json
  5935. responses:
  5936. "200":
  5937. description: OK
  5938. schema:
  5939. allOf:
  5940. - $ref: '#/definitions/middleware.APIResponse'
  5941. - properties:
  5942. data:
  5943. additionalProperties:
  5944. allOf:
  5945. - {}
  5946. - properties:
  5947. tokens:
  5948. items:
  5949. $ref: '#/definitions/controller.TokenResponse'
  5950. type: array
  5951. total:
  5952. type: integer
  5953. type: object
  5954. type: object
  5955. type: object
  5956. security:
  5957. - ApiKeyAuth: []
  5958. summary: Search tokens
  5959. tags:
  5960. - tokens
  5961. /mcp:
  5962. delete:
  5963. responses: {}
  5964. security:
  5965. - ApiKeyAuth: []
  5966. summary: Host MCP Streamable Server
  5967. get:
  5968. responses: {}
  5969. security:
  5970. - ApiKeyAuth: []
  5971. summary: Host MCP Streamable Server
  5972. post:
  5973. responses: {}
  5974. security:
  5975. - ApiKeyAuth: []
  5976. summary: Host MCP Streamable Server
  5977. /mcp/group/{id}:
  5978. delete:
  5979. responses: {}
  5980. security:
  5981. - ApiKeyAuth: []
  5982. summary: Group MCP Streamable Server
  5983. get:
  5984. responses: {}
  5985. security:
  5986. - ApiKeyAuth: []
  5987. summary: Group MCP Streamable Server
  5988. post:
  5989. responses: {}
  5990. security:
  5991. - ApiKeyAuth: []
  5992. summary: Group MCP Streamable Server
  5993. /mcp/group/{id}/sse:
  5994. get:
  5995. responses: {}
  5996. security:
  5997. - ApiKeyAuth: []
  5998. summary: Group MCP SSE Server
  5999. /mcp/group/message:
  6000. post:
  6001. responses: {}
  6002. security:
  6003. - ApiKeyAuth: []
  6004. summary: MCP SSE Proxy
  6005. /mcp/public/{id}:
  6006. delete:
  6007. responses: {}
  6008. security:
  6009. - ApiKeyAuth: []
  6010. summary: Public MCP Streamable Server
  6011. get:
  6012. responses: {}
  6013. security:
  6014. - ApiKeyAuth: []
  6015. summary: Public MCP Streamable Server
  6016. post:
  6017. responses: {}
  6018. security:
  6019. - ApiKeyAuth: []
  6020. summary: Public MCP Streamable Server
  6021. /mcp/public/{id}/sse:
  6022. get:
  6023. responses: {}
  6024. security:
  6025. - ApiKeyAuth: []
  6026. summary: Public MCP SSE Server
  6027. /mcp/public/message:
  6028. post:
  6029. responses: {}
  6030. security:
  6031. - ApiKeyAuth: []
  6032. summary: Public MCP SSE Server
  6033. /message:
  6034. post:
  6035. responses: {}
  6036. security:
  6037. - ApiKeyAuth: []
  6038. summary: Public MCP SSE Server
  6039. /sse:
  6040. get:
  6041. responses: {}
  6042. security:
  6043. - ApiKeyAuth: []
  6044. summary: Public MCP SSE Server
  6045. /v1/audio/speech:
  6046. post:
  6047. description: AudioSpeech
  6048. parameters:
  6049. - description: Request
  6050. in: body
  6051. name: request
  6052. required: true
  6053. schema:
  6054. $ref: '#/definitions/model.TextToSpeechRequest'
  6055. - description: Optional Aiproxy-Channel header
  6056. in: header
  6057. name: Aiproxy-Channel
  6058. type: string
  6059. produces:
  6060. - application/json
  6061. responses:
  6062. "200":
  6063. description: audio binary
  6064. headers:
  6065. X-RateLimit-Limit-Requests:
  6066. description: X-RateLimit-Limit-Requests
  6067. type: integer
  6068. X-RateLimit-Limit-Tokens:
  6069. description: X-RateLimit-Limit-Tokens
  6070. type: integer
  6071. X-RateLimit-Remaining-Requests:
  6072. description: X-RateLimit-Remaining-Requests
  6073. type: integer
  6074. X-RateLimit-Remaining-Tokens:
  6075. description: X-RateLimit-Remaining-Tokens
  6076. type: integer
  6077. X-RateLimit-Reset-Requests:
  6078. description: X-RateLimit-Reset-Requests
  6079. type: string
  6080. X-RateLimit-Reset-Tokens:
  6081. description: X-RateLimit-Reset-Tokens
  6082. type: string
  6083. schema:
  6084. type: file
  6085. security:
  6086. - ApiKeyAuth: []
  6087. summary: AudioSpeech
  6088. tags:
  6089. - relay
  6090. /v1/audio/transcriptions:
  6091. post:
  6092. description: AudioTranscription
  6093. parameters:
  6094. - description: Model
  6095. in: formData
  6096. name: model
  6097. required: true
  6098. type: string
  6099. - description: File
  6100. in: formData
  6101. name: file
  6102. required: true
  6103. type: file
  6104. - description: Optional Aiproxy-Channel header
  6105. in: header
  6106. name: Aiproxy-Channel
  6107. type: string
  6108. produces:
  6109. - application/json
  6110. responses:
  6111. "200":
  6112. description: OK
  6113. headers:
  6114. X-RateLimit-Limit-Requests:
  6115. description: X-RateLimit-Limit-Requests
  6116. type: integer
  6117. X-RateLimit-Limit-Tokens:
  6118. description: X-RateLimit-Limit-Tokens
  6119. type: integer
  6120. X-RateLimit-Remaining-Requests:
  6121. description: X-RateLimit-Remaining-Requests
  6122. type: integer
  6123. X-RateLimit-Remaining-Tokens:
  6124. description: X-RateLimit-Remaining-Tokens
  6125. type: integer
  6126. X-RateLimit-Reset-Requests:
  6127. description: X-RateLimit-Reset-Requests
  6128. type: string
  6129. X-RateLimit-Reset-Tokens:
  6130. description: X-RateLimit-Reset-Tokens
  6131. type: string
  6132. schema:
  6133. $ref: '#/definitions/model.SttJSONResponse'
  6134. security:
  6135. - ApiKeyAuth: []
  6136. summary: AudioTranscription
  6137. tags:
  6138. - relay
  6139. /v1/audio/translations:
  6140. post:
  6141. description: AudioTranslation
  6142. parameters:
  6143. - description: Model
  6144. in: formData
  6145. name: model
  6146. required: true
  6147. type: string
  6148. - description: File
  6149. in: formData
  6150. name: file
  6151. required: true
  6152. type: file
  6153. - description: Optional Aiproxy-Channel header
  6154. in: header
  6155. name: Aiproxy-Channel
  6156. type: string
  6157. produces:
  6158. - application/json
  6159. responses:
  6160. "200":
  6161. description: OK
  6162. headers:
  6163. X-RateLimit-Limit-Requests:
  6164. description: X-RateLimit-Limit-Requests
  6165. type: integer
  6166. X-RateLimit-Limit-Tokens:
  6167. description: X-RateLimit-Limit-Tokens
  6168. type: integer
  6169. X-RateLimit-Remaining-Requests:
  6170. description: X-RateLimit-Remaining-Requests
  6171. type: integer
  6172. X-RateLimit-Remaining-Tokens:
  6173. description: X-RateLimit-Remaining-Tokens
  6174. type: integer
  6175. X-RateLimit-Reset-Requests:
  6176. description: X-RateLimit-Reset-Requests
  6177. type: string
  6178. X-RateLimit-Reset-Tokens:
  6179. description: X-RateLimit-Reset-Tokens
  6180. type: string
  6181. schema:
  6182. $ref: '#/definitions/model.SttJSONResponse'
  6183. security:
  6184. - ApiKeyAuth: []
  6185. summary: AudioTranslation
  6186. tags:
  6187. - relay
  6188. /v1/chat/completions:
  6189. post:
  6190. description: ChatCompletions
  6191. parameters:
  6192. - description: Request
  6193. in: body
  6194. name: request
  6195. required: true
  6196. schema:
  6197. $ref: '#/definitions/model.GeneralOpenAIRequest'
  6198. - description: Optional Aiproxy-Channel header
  6199. in: header
  6200. name: Aiproxy-Channel
  6201. type: string
  6202. produces:
  6203. - application/json
  6204. responses:
  6205. "200":
  6206. description: OK
  6207. headers:
  6208. X-RateLimit-Limit-Requests:
  6209. description: X-RateLimit-Limit-Requests
  6210. type: integer
  6211. X-RateLimit-Limit-Tokens:
  6212. description: X-RateLimit-Limit-Tokens
  6213. type: integer
  6214. X-RateLimit-Remaining-Requests:
  6215. description: X-RateLimit-Remaining-Requests
  6216. type: integer
  6217. X-RateLimit-Remaining-Tokens:
  6218. description: X-RateLimit-Remaining-Tokens
  6219. type: integer
  6220. X-RateLimit-Reset-Requests:
  6221. description: X-RateLimit-Reset-Requests
  6222. type: string
  6223. X-RateLimit-Reset-Tokens:
  6224. description: X-RateLimit-Reset-Tokens
  6225. type: string
  6226. schema:
  6227. $ref: '#/definitions/model.TextResponse'
  6228. security:
  6229. - ApiKeyAuth: []
  6230. summary: ChatCompletions
  6231. tags:
  6232. - relay
  6233. /v1/completions:
  6234. post:
  6235. description: Completions
  6236. parameters:
  6237. - description: Request
  6238. in: body
  6239. name: request
  6240. required: true
  6241. schema:
  6242. $ref: '#/definitions/model.GeneralOpenAIRequest'
  6243. - description: Optional Aiproxy-Channel header
  6244. in: header
  6245. name: Aiproxy-Channel
  6246. type: string
  6247. produces:
  6248. - application/json
  6249. responses:
  6250. "200":
  6251. description: OK
  6252. headers:
  6253. X-RateLimit-Limit-Requests:
  6254. description: X-RateLimit-Limit-Requests
  6255. type: integer
  6256. X-RateLimit-Limit-Tokens:
  6257. description: X-RateLimit-Limit-Tokens
  6258. type: integer
  6259. X-RateLimit-Remaining-Requests:
  6260. description: X-RateLimit-Remaining-Requests
  6261. type: integer
  6262. X-RateLimit-Remaining-Tokens:
  6263. description: X-RateLimit-Remaining-Tokens
  6264. type: integer
  6265. X-RateLimit-Reset-Requests:
  6266. description: X-RateLimit-Reset-Requests
  6267. type: string
  6268. X-RateLimit-Reset-Tokens:
  6269. description: X-RateLimit-Reset-Tokens
  6270. type: string
  6271. schema:
  6272. $ref: '#/definitions/model.TextResponse'
  6273. security:
  6274. - ApiKeyAuth: []
  6275. summary: Completions
  6276. tags:
  6277. - relay
  6278. /v1/dashboard/billing/subscription:
  6279. get:
  6280. description: Get subscription
  6281. produces:
  6282. - application/json
  6283. responses:
  6284. "200":
  6285. description: OK
  6286. schema:
  6287. $ref: '#/definitions/openai.SubscriptionResponse'
  6288. security:
  6289. - ApiKeyAuth: []
  6290. summary: Get subscription
  6291. tags:
  6292. - relay
  6293. /v1/dashboard/billing/usage:
  6294. get:
  6295. description: Get usage
  6296. produces:
  6297. - application/json
  6298. responses:
  6299. "200":
  6300. description: OK
  6301. schema:
  6302. $ref: '#/definitions/openai.UsageResponse'
  6303. security:
  6304. - ApiKeyAuth: []
  6305. summary: Get usage
  6306. tags:
  6307. - relay
  6308. /v1/embeddings:
  6309. post:
  6310. description: Embeddings
  6311. parameters:
  6312. - description: Request
  6313. in: body
  6314. name: request
  6315. required: true
  6316. schema:
  6317. $ref: '#/definitions/model.EmbeddingRequest'
  6318. - description: Optional Aiproxy-Channel header
  6319. in: header
  6320. name: Aiproxy-Channel
  6321. type: string
  6322. produces:
  6323. - application/json
  6324. responses:
  6325. "200":
  6326. description: OK
  6327. headers:
  6328. X-RateLimit-Limit-Requests:
  6329. description: X-RateLimit-Limit-Requests
  6330. type: integer
  6331. X-RateLimit-Limit-Tokens:
  6332. description: X-RateLimit-Limit-Tokens
  6333. type: integer
  6334. X-RateLimit-Remaining-Requests:
  6335. description: X-RateLimit-Remaining-Requests
  6336. type: integer
  6337. X-RateLimit-Remaining-Tokens:
  6338. description: X-RateLimit-Remaining-Tokens
  6339. type: integer
  6340. X-RateLimit-Reset-Requests:
  6341. description: X-RateLimit-Reset-Requests
  6342. type: string
  6343. X-RateLimit-Reset-Tokens:
  6344. description: X-RateLimit-Reset-Tokens
  6345. type: string
  6346. schema:
  6347. $ref: '#/definitions/model.EmbeddingResponse'
  6348. security:
  6349. - ApiKeyAuth: []
  6350. summary: Embeddings
  6351. tags:
  6352. - relay
  6353. /v1/images/edits:
  6354. post:
  6355. description: ImagesEdits
  6356. parameters:
  6357. - description: Prompt
  6358. in: formData
  6359. name: prompt
  6360. required: true
  6361. type: string
  6362. - description: Model
  6363. in: formData
  6364. name: model
  6365. required: true
  6366. type: string
  6367. - description: Images
  6368. in: formData
  6369. name: image
  6370. required: true
  6371. type: file
  6372. - description: Optional Aiproxy-Channel header
  6373. in: header
  6374. name: Aiproxy-Channel
  6375. type: string
  6376. produces:
  6377. - application/json
  6378. responses:
  6379. "200":
  6380. description: OK
  6381. headers:
  6382. X-RateLimit-Limit-Requests:
  6383. description: X-RateLimit-Limit-Requests
  6384. type: integer
  6385. X-RateLimit-Limit-Tokens:
  6386. description: X-RateLimit-Limit-Tokens
  6387. type: integer
  6388. X-RateLimit-Remaining-Requests:
  6389. description: X-RateLimit-Remaining-Requests
  6390. type: integer
  6391. X-RateLimit-Remaining-Tokens:
  6392. description: X-RateLimit-Remaining-Tokens
  6393. type: integer
  6394. X-RateLimit-Reset-Requests:
  6395. description: X-RateLimit-Reset-Requests
  6396. type: string
  6397. X-RateLimit-Reset-Tokens:
  6398. description: X-RateLimit-Reset-Tokens
  6399. type: string
  6400. schema:
  6401. $ref: '#/definitions/model.SttJSONResponse'
  6402. security:
  6403. - ApiKeyAuth: []
  6404. summary: ImagesEdits
  6405. tags:
  6406. - relay
  6407. /v1/images/generations:
  6408. post:
  6409. description: ImagesGenerations
  6410. parameters:
  6411. - description: Request
  6412. in: body
  6413. name: request
  6414. required: true
  6415. schema:
  6416. $ref: '#/definitions/model.ImageRequest'
  6417. - description: Optional Aiproxy-Channel header
  6418. in: header
  6419. name: Aiproxy-Channel
  6420. type: string
  6421. produces:
  6422. - application/json
  6423. responses:
  6424. "200":
  6425. description: OK
  6426. headers:
  6427. X-RateLimit-Limit-Requests:
  6428. description: X-RateLimit-Limit-Requests
  6429. type: integer
  6430. X-RateLimit-Limit-Tokens:
  6431. description: X-RateLimit-Limit-Tokens
  6432. type: integer
  6433. X-RateLimit-Remaining-Requests:
  6434. description: X-RateLimit-Remaining-Requests
  6435. type: integer
  6436. X-RateLimit-Remaining-Tokens:
  6437. description: X-RateLimit-Remaining-Tokens
  6438. type: integer
  6439. X-RateLimit-Reset-Requests:
  6440. description: X-RateLimit-Reset-Requests
  6441. type: string
  6442. X-RateLimit-Reset-Tokens:
  6443. description: X-RateLimit-Reset-Tokens
  6444. type: string
  6445. schema:
  6446. $ref: '#/definitions/model.ImageResponse'
  6447. security:
  6448. - ApiKeyAuth: []
  6449. summary: ImagesGenerations
  6450. tags:
  6451. - relay
  6452. /v1/messages:
  6453. post:
  6454. description: Anthropic
  6455. parameters:
  6456. - description: Request
  6457. in: body
  6458. name: request
  6459. required: true
  6460. schema:
  6461. $ref: '#/definitions/model.AnthropicMessageRequest'
  6462. - description: Optional Aiproxy-Channel header
  6463. in: header
  6464. name: Aiproxy-Channel
  6465. type: string
  6466. produces:
  6467. - application/json
  6468. responses:
  6469. "200":
  6470. description: OK
  6471. headers:
  6472. X-RateLimit-Limit-Requests:
  6473. description: X-RateLimit-Limit-Requests
  6474. type: integer
  6475. X-RateLimit-Limit-Tokens:
  6476. description: X-RateLimit-Limit-Tokens
  6477. type: integer
  6478. X-RateLimit-Remaining-Requests:
  6479. description: X-RateLimit-Remaining-Requests
  6480. type: integer
  6481. X-RateLimit-Remaining-Tokens:
  6482. description: X-RateLimit-Remaining-Tokens
  6483. type: integer
  6484. X-RateLimit-Reset-Requests:
  6485. description: X-RateLimit-Reset-Requests
  6486. type: string
  6487. X-RateLimit-Reset-Tokens:
  6488. description: X-RateLimit-Reset-Tokens
  6489. type: string
  6490. schema:
  6491. $ref: '#/definitions/model.TextResponse'
  6492. security:
  6493. - ApiKeyAuth: []
  6494. summary: Anthropic
  6495. tags:
  6496. - relay
  6497. /v1/models:
  6498. get:
  6499. description: List all models
  6500. produces:
  6501. - application/json
  6502. responses:
  6503. "200":
  6504. description: OK
  6505. schema:
  6506. properties:
  6507. data:
  6508. items:
  6509. $ref: '#/definitions/controller.OpenAIModels'
  6510. type: array
  6511. object:
  6512. type: string
  6513. type: object
  6514. security:
  6515. - ApiKeyAuth: []
  6516. summary: List models
  6517. tags:
  6518. - relay
  6519. /v1/models/{model}:
  6520. get:
  6521. description: Retrieve a model
  6522. produces:
  6523. - application/json
  6524. responses:
  6525. "200":
  6526. description: OK
  6527. schema:
  6528. $ref: '#/definitions/controller.OpenAIModels'
  6529. security:
  6530. - ApiKeyAuth: []
  6531. summary: Retrieve model
  6532. tags:
  6533. - relay
  6534. /v1/parse/pdf:
  6535. post:
  6536. description: ParsePdf
  6537. parameters:
  6538. - description: Model
  6539. in: formData
  6540. name: model
  6541. required: true
  6542. type: string
  6543. - description: File
  6544. in: formData
  6545. name: file
  6546. required: true
  6547. type: file
  6548. - description: Optional Aiproxy-Channel header
  6549. in: header
  6550. name: Aiproxy-Channel
  6551. type: string
  6552. produces:
  6553. - application/json
  6554. responses:
  6555. "200":
  6556. description: OK
  6557. headers:
  6558. X-RateLimit-Limit-Requests:
  6559. description: X-RateLimit-Limit-Requests
  6560. type: integer
  6561. X-RateLimit-Limit-Tokens:
  6562. description: X-RateLimit-Limit-Tokens
  6563. type: integer
  6564. X-RateLimit-Remaining-Requests:
  6565. description: X-RateLimit-Remaining-Requests
  6566. type: integer
  6567. X-RateLimit-Remaining-Tokens:
  6568. description: X-RateLimit-Remaining-Tokens
  6569. type: integer
  6570. X-RateLimit-Reset-Requests:
  6571. description: X-RateLimit-Reset-Requests
  6572. type: string
  6573. X-RateLimit-Reset-Tokens:
  6574. description: X-RateLimit-Reset-Tokens
  6575. type: string
  6576. schema:
  6577. $ref: '#/definitions/model.ParsePdfResponse'
  6578. security:
  6579. - ApiKeyAuth: []
  6580. summary: ParsePdf
  6581. tags:
  6582. - relay
  6583. /v1/rerank:
  6584. post:
  6585. description: Rerank
  6586. parameters:
  6587. - description: Request
  6588. in: body
  6589. name: request
  6590. required: true
  6591. schema:
  6592. $ref: '#/definitions/model.RerankRequest'
  6593. - description: Optional Aiproxy-Channel header
  6594. in: header
  6595. name: Aiproxy-Channel
  6596. type: string
  6597. produces:
  6598. - application/json
  6599. responses:
  6600. "200":
  6601. description: OK
  6602. headers:
  6603. X-RateLimit-Limit-Requests:
  6604. description: X-RateLimit-Limit-Requests
  6605. type: integer
  6606. X-RateLimit-Limit-Tokens:
  6607. description: X-RateLimit-Limit-Tokens
  6608. type: integer
  6609. X-RateLimit-Remaining-Requests:
  6610. description: X-RateLimit-Remaining-Requests
  6611. type: integer
  6612. X-RateLimit-Remaining-Tokens:
  6613. description: X-RateLimit-Remaining-Tokens
  6614. type: integer
  6615. X-RateLimit-Reset-Requests:
  6616. description: X-RateLimit-Reset-Requests
  6617. type: string
  6618. X-RateLimit-Reset-Tokens:
  6619. description: X-RateLimit-Reset-Tokens
  6620. type: string
  6621. schema:
  6622. $ref: '#/definitions/model.RerankResponse'
  6623. security:
  6624. - ApiKeyAuth: []
  6625. summary: Rerank
  6626. tags:
  6627. - relay
  6628. /v1/video/generations/{id}/content/video:
  6629. get:
  6630. description: VideoGenerationsContent
  6631. parameters:
  6632. - description: Request
  6633. in: body
  6634. name: request
  6635. required: true
  6636. schema:
  6637. $ref: '#/definitions/model.VideoGenerationJobRequest'
  6638. - description: Optional Aiproxy-Channel header
  6639. in: header
  6640. name: Aiproxy-Channel
  6641. type: string
  6642. produces:
  6643. - application/json
  6644. responses:
  6645. "200":
  6646. description: video binary
  6647. headers:
  6648. X-RateLimit-Limit-Requests:
  6649. description: X-RateLimit-Limit-Requests
  6650. type: integer
  6651. X-RateLimit-Limit-Tokens:
  6652. description: X-RateLimit-Limit-Tokens
  6653. type: integer
  6654. X-RateLimit-Remaining-Requests:
  6655. description: X-RateLimit-Remaining-Requests
  6656. type: integer
  6657. X-RateLimit-Remaining-Tokens:
  6658. description: X-RateLimit-Remaining-Tokens
  6659. type: integer
  6660. X-RateLimit-Reset-Requests:
  6661. description: X-RateLimit-Reset-Requests
  6662. type: string
  6663. X-RateLimit-Reset-Tokens:
  6664. description: X-RateLimit-Reset-Tokens
  6665. type: string
  6666. schema:
  6667. type: file
  6668. security:
  6669. - ApiKeyAuth: []
  6670. summary: VideoGenerationsContent
  6671. tags:
  6672. - relay
  6673. /v1/video/generations/jobs:
  6674. post:
  6675. description: VideoGenerationsJobs
  6676. parameters:
  6677. - description: Request
  6678. in: body
  6679. name: request
  6680. required: true
  6681. schema:
  6682. $ref: '#/definitions/model.VideoGenerationJobRequest'
  6683. - description: Optional Aiproxy-Channel header
  6684. in: header
  6685. name: Aiproxy-Channel
  6686. type: string
  6687. produces:
  6688. - application/json
  6689. responses:
  6690. "200":
  6691. description: OK
  6692. headers:
  6693. X-RateLimit-Limit-Requests:
  6694. description: X-RateLimit-Limit-Requests
  6695. type: integer
  6696. X-RateLimit-Limit-Tokens:
  6697. description: X-RateLimit-Limit-Tokens
  6698. type: integer
  6699. X-RateLimit-Remaining-Requests:
  6700. description: X-RateLimit-Remaining-Requests
  6701. type: integer
  6702. X-RateLimit-Remaining-Tokens:
  6703. description: X-RateLimit-Remaining-Tokens
  6704. type: integer
  6705. X-RateLimit-Reset-Requests:
  6706. description: X-RateLimit-Reset-Requests
  6707. type: string
  6708. X-RateLimit-Reset-Tokens:
  6709. description: X-RateLimit-Reset-Tokens
  6710. type: string
  6711. schema:
  6712. $ref: '#/definitions/model.VideoGenerationJob'
  6713. security:
  6714. - ApiKeyAuth: []
  6715. summary: VideoGenerationsJobs
  6716. tags:
  6717. - relay
  6718. /v1/video/generations/jobs/{id}:
  6719. get:
  6720. description: VideoGenerationsGetJobs
  6721. parameters:
  6722. - description: Request
  6723. in: body
  6724. name: request
  6725. required: true
  6726. schema:
  6727. $ref: '#/definitions/model.VideoGenerationJobRequest'
  6728. - description: Optional Aiproxy-Channel header
  6729. in: header
  6730. name: Aiproxy-Channel
  6731. type: string
  6732. produces:
  6733. - application/json
  6734. responses:
  6735. "200":
  6736. description: OK
  6737. headers:
  6738. X-RateLimit-Limit-Requests:
  6739. description: X-RateLimit-Limit-Requests
  6740. type: integer
  6741. X-RateLimit-Limit-Tokens:
  6742. description: X-RateLimit-Limit-Tokens
  6743. type: integer
  6744. X-RateLimit-Remaining-Requests:
  6745. description: X-RateLimit-Remaining-Requests
  6746. type: integer
  6747. X-RateLimit-Remaining-Tokens:
  6748. description: X-RateLimit-Remaining-Tokens
  6749. type: integer
  6750. X-RateLimit-Reset-Requests:
  6751. description: X-RateLimit-Reset-Requests
  6752. type: string
  6753. X-RateLimit-Reset-Tokens:
  6754. description: X-RateLimit-Reset-Tokens
  6755. type: string
  6756. schema:
  6757. $ref: '#/definitions/model.VideoGenerationJob'
  6758. security:
  6759. - ApiKeyAuth: []
  6760. summary: VideoGenerationsGetJobs
  6761. tags:
  6762. - relay
  6763. securityDefinitions:
  6764. ApiKeyAuth:
  6765. in: header
  6766. name: Authorization
  6767. type: apiKey
  6768. swagger: "2.0"