docs.go 384 KB

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