docs.go 376 KB

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