docs.go 419 KB

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