swagger.json 418 KB

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