swagger.json 425 KB

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