swagger.json 374 KB

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