swagger.yaml 163 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766
  1. definitions:
  2. adaptor.ConfigTemplate:
  3. properties:
  4. description:
  5. type: string
  6. example: {}
  7. name:
  8. type: string
  9. required:
  10. type: boolean
  11. type:
  12. $ref: '#/definitions/adaptor.ConfigType'
  13. type: object
  14. adaptor.ConfigTemplates:
  15. additionalProperties:
  16. $ref: '#/definitions/adaptor.ConfigTemplate'
  17. type: object
  18. adaptor.ConfigType:
  19. enum:
  20. - string
  21. - number
  22. - bool
  23. - object
  24. type: string
  25. x-enum-varnames:
  26. - ConfigTypeString
  27. - ConfigTypeNumber
  28. - ConfigTypeBool
  29. - ConfigTypeObject
  30. adaptors.AdaptorMeta:
  31. properties:
  32. config:
  33. $ref: '#/definitions/adaptor.ConfigTemplates'
  34. defaultBaseUrl:
  35. type: string
  36. fetures:
  37. items:
  38. type: string
  39. type: array
  40. keyHelp:
  41. type: string
  42. name:
  43. type: string
  44. type: object
  45. controller.AddChannelRequest:
  46. properties:
  47. base_url:
  48. type: string
  49. config:
  50. $ref: '#/definitions/model.ChannelConfig'
  51. key:
  52. type: string
  53. model_mapping:
  54. additionalProperties:
  55. type: string
  56. type: object
  57. models:
  58. items:
  59. type: string
  60. type: array
  61. name:
  62. type: string
  63. priority:
  64. type: integer
  65. sets:
  66. items:
  67. type: string
  68. type: array
  69. status:
  70. type: integer
  71. type:
  72. $ref: '#/definitions/model.ChannelType'
  73. type: object
  74. controller.AddTokenRequest:
  75. properties:
  76. expiredAt:
  77. type: integer
  78. models:
  79. items:
  80. type: string
  81. type: array
  82. name:
  83. type: string
  84. quota:
  85. type: number
  86. subnets:
  87. items:
  88. type: string
  89. type: array
  90. type: object
  91. controller.BuiltinModelConfig:
  92. properties:
  93. config:
  94. additionalProperties: {}
  95. type: object
  96. created_at:
  97. type: string
  98. exclude_from_tests:
  99. type: boolean
  100. force_save_detail:
  101. type: boolean
  102. image_prices:
  103. additionalProperties:
  104. type: number
  105. description: map[size]price_per_image
  106. type: object
  107. image_quality_prices:
  108. additionalProperties:
  109. additionalProperties:
  110. type: number
  111. type: object
  112. description: map[size]map[quality]price_per_image
  113. type: object
  114. max_error_rate:
  115. type: number
  116. model:
  117. type: string
  118. owner:
  119. $ref: '#/definitions/model.ModelOwner'
  120. plugin:
  121. additionalProperties:
  122. items:
  123. type: integer
  124. type: array
  125. type: object
  126. price:
  127. $ref: '#/definitions/model.Price'
  128. retry_times:
  129. type: integer
  130. rpm:
  131. type: integer
  132. timeout:
  133. type: integer
  134. tpm:
  135. type: integer
  136. type:
  137. $ref: '#/definitions/mode.Mode'
  138. updated_at:
  139. type: string
  140. type: object
  141. controller.CreateGroupRequest:
  142. properties:
  143. available_sets:
  144. items:
  145. type: string
  146. type: array
  147. balance_alert_enabled:
  148. type: boolean
  149. balance_alert_threshold:
  150. type: number
  151. rpm_ratio:
  152. type: number
  153. tpm_ratio:
  154. type: number
  155. type: object
  156. controller.EmbedMCP:
  157. properties:
  158. config_templates:
  159. $ref: '#/definitions/controller.EmbedMCPConfigTemplates'
  160. enabled:
  161. type: boolean
  162. id:
  163. type: string
  164. name:
  165. type: string
  166. readme:
  167. type: string
  168. tags:
  169. items:
  170. type: string
  171. type: array
  172. type: object
  173. controller.EmbedMCPConfigTemplate:
  174. properties:
  175. description:
  176. type: string
  177. example:
  178. type: string
  179. name:
  180. type: string
  181. required:
  182. type: boolean
  183. type: object
  184. controller.EmbedMCPConfigTemplates:
  185. additionalProperties:
  186. $ref: '#/definitions/controller.EmbedMCPConfigTemplate'
  187. type: object
  188. controller.EnabledModelChannel:
  189. properties:
  190. id:
  191. type: integer
  192. name:
  193. type: string
  194. type:
  195. $ref: '#/definitions/model.ChannelType'
  196. type: object
  197. controller.GetModelConfigsByModelsContainsRequest:
  198. properties:
  199. models:
  200. items:
  201. type: string
  202. type: array
  203. type: object
  204. controller.GroupMCPResponse:
  205. properties:
  206. created_at:
  207. type: string
  208. endpoints:
  209. $ref: '#/definitions/controller.MCPEndpoint'
  210. group_id:
  211. type: string
  212. id:
  213. type: string
  214. name:
  215. type: string
  216. openapi_config:
  217. $ref: '#/definitions/model.MCPOpenAPIConfig'
  218. proxy_config:
  219. $ref: '#/definitions/model.GroupMCPProxyConfig'
  220. status:
  221. $ref: '#/definitions/model.GroupMCPStatus'
  222. type:
  223. $ref: '#/definitions/model.GroupMCPType'
  224. update_at:
  225. type: string
  226. type: object
  227. controller.GroupResponse:
  228. properties:
  229. accessed_at:
  230. type: string
  231. available_sets:
  232. items:
  233. type: string
  234. type: array
  235. balance_alert_enabled:
  236. type: boolean
  237. balance_alert_threshold:
  238. type: number
  239. created_at:
  240. type: string
  241. id:
  242. type: string
  243. request_count:
  244. type: integer
  245. rpm_ratio:
  246. type: number
  247. status:
  248. type: integer
  249. tpm_ratio:
  250. type: number
  251. used_amount:
  252. type: number
  253. type: object
  254. controller.ImportChannelFromOneAPIRequest:
  255. properties:
  256. dsn:
  257. type: string
  258. type: object
  259. controller.MCPEndpoint:
  260. properties:
  261. host:
  262. type: string
  263. sse:
  264. type: string
  265. streamable_http:
  266. type: string
  267. type: object
  268. controller.OpenAIModelPermission:
  269. properties:
  270. allow_create_engine:
  271. type: boolean
  272. allow_fine_tuning:
  273. type: boolean
  274. allow_logprobs:
  275. type: boolean
  276. allow_sampling:
  277. type: boolean
  278. allow_search_indices:
  279. type: boolean
  280. allow_view:
  281. type: boolean
  282. created:
  283. type: integer
  284. group:
  285. type: string
  286. id:
  287. type: string
  288. is_blocking:
  289. type: boolean
  290. object:
  291. type: string
  292. organization:
  293. type: string
  294. type: object
  295. controller.OpenAIModels:
  296. properties:
  297. created:
  298. type: integer
  299. id:
  300. type: string
  301. object:
  302. type: string
  303. owned_by:
  304. type: string
  305. parent:
  306. type: string
  307. permission:
  308. items:
  309. $ref: '#/definitions/controller.OpenAIModelPermission'
  310. type: array
  311. root:
  312. type: string
  313. type: object
  314. controller.PublicMCPResponse:
  315. properties:
  316. created_at:
  317. type: string
  318. embed_config:
  319. $ref: '#/definitions/model.MCPEmbeddingConfig'
  320. endpoints:
  321. $ref: '#/definitions/controller.MCPEndpoint'
  322. id:
  323. type: string
  324. logo_url:
  325. type: string
  326. name:
  327. type: string
  328. openapi_config:
  329. $ref: '#/definitions/model.MCPOpenAPIConfig'
  330. price:
  331. $ref: '#/definitions/model.MCPPrice'
  332. proxy_config:
  333. $ref: '#/definitions/model.PublicMCPProxyConfig'
  334. readme:
  335. type: string
  336. readme_url:
  337. type: string
  338. repo_url:
  339. type: string
  340. status:
  341. $ref: '#/definitions/model.PublicMCPStatus'
  342. tags:
  343. items:
  344. type: string
  345. type: array
  346. type:
  347. $ref: '#/definitions/model.PublicMCPType'
  348. update_at:
  349. type: string
  350. type: object
  351. controller.SaveEmbedMCPRequest:
  352. properties:
  353. enabled:
  354. type: boolean
  355. id:
  356. type: string
  357. init_config:
  358. additionalProperties:
  359. type: string
  360. type: object
  361. type: object
  362. controller.SaveGroupModelConfigRequest:
  363. properties:
  364. force_save_detail:
  365. type: boolean
  366. image_prices:
  367. additionalProperties:
  368. type: number
  369. type: object
  370. model:
  371. type: string
  372. override_force_save_detail:
  373. type: boolean
  374. override_limit:
  375. type: boolean
  376. override_price:
  377. type: boolean
  378. override_retry_times:
  379. type: boolean
  380. price:
  381. $ref: '#/definitions/model.Price'
  382. retry_times:
  383. type: integer
  384. rpm:
  385. type: integer
  386. tpm:
  387. type: integer
  388. type: object
  389. controller.SaveModelConfigsRequest:
  390. properties:
  391. config:
  392. additionalProperties: {}
  393. type: object
  394. created_at:
  395. type: string
  396. exclude_from_tests:
  397. type: boolean
  398. force_save_detail:
  399. type: boolean
  400. image_prices:
  401. additionalProperties:
  402. type: number
  403. description: map[size]price_per_image
  404. type: object
  405. image_quality_prices:
  406. additionalProperties:
  407. additionalProperties:
  408. type: number
  409. type: object
  410. description: map[size]map[quality]price_per_image
  411. type: object
  412. max_error_rate:
  413. type: number
  414. model:
  415. type: string
  416. owner:
  417. $ref: '#/definitions/model.ModelOwner'
  418. plugin:
  419. additionalProperties:
  420. items:
  421. type: integer
  422. type: array
  423. type: object
  424. price:
  425. $ref: '#/definitions/model.Price'
  426. retry_times:
  427. type: integer
  428. rpm:
  429. type: integer
  430. timeout:
  431. type: integer
  432. tpm:
  433. type: integer
  434. type:
  435. $ref: '#/definitions/mode.Mode'
  436. updated_at:
  437. type: string
  438. type: object
  439. controller.StatusData:
  440. properties:
  441. startTime:
  442. type: integer
  443. type: object
  444. controller.TestResult:
  445. properties:
  446. data:
  447. $ref: '#/definitions/model.ChannelTest'
  448. message:
  449. type: string
  450. success:
  451. type: boolean
  452. type: object
  453. controller.TokenResponse:
  454. properties:
  455. accessed_at:
  456. type: string
  457. created_at:
  458. type: string
  459. expired_at:
  460. type: string
  461. group:
  462. type: string
  463. id:
  464. type: integer
  465. key:
  466. type: string
  467. models:
  468. items:
  469. type: string
  470. type: array
  471. name:
  472. type: string
  473. quota:
  474. type: number
  475. request_count:
  476. type: integer
  477. status:
  478. type: integer
  479. subnets:
  480. items:
  481. type: string
  482. type: array
  483. used_amount:
  484. type: number
  485. type: object
  486. controller.UpdateChannelStatusRequest:
  487. properties:
  488. status:
  489. type: integer
  490. type: object
  491. controller.UpdateGroupMCPStatusRequest:
  492. properties:
  493. status:
  494. $ref: '#/definitions/model.GroupMCPStatus'
  495. type: object
  496. controller.UpdateGroupRPMRatioRequest:
  497. properties:
  498. rpm_ratio:
  499. type: number
  500. type: object
  501. controller.UpdateGroupStatusRequest:
  502. properties:
  503. status:
  504. type: integer
  505. type: object
  506. controller.UpdateGroupTPMRatioRequest:
  507. properties:
  508. tpm_ratio:
  509. type: number
  510. type: object
  511. controller.UpdateGroupsStatusRequest:
  512. properties:
  513. groups:
  514. items:
  515. type: string
  516. type: array
  517. status:
  518. type: integer
  519. type: object
  520. controller.UpdatePublicMCPStatusRequest:
  521. properties:
  522. status:
  523. $ref: '#/definitions/model.PublicMCPStatus'
  524. type: object
  525. controller.UpdateTokenNameRequest:
  526. properties:
  527. name:
  528. type: string
  529. type: object
  530. controller.UpdateTokenStatusRequest:
  531. properties:
  532. status:
  533. type: integer
  534. type: object
  535. github_com_labring_aiproxy_core_model.Usage:
  536. properties:
  537. cache_creation_tokens:
  538. type: integer
  539. cached_tokens:
  540. type: integer
  541. image_input_tokens:
  542. type: integer
  543. input_tokens:
  544. type: integer
  545. output_tokens:
  546. type: integer
  547. reasoning_tokens:
  548. type: integer
  549. total_tokens:
  550. type: integer
  551. web_search_count:
  552. type: integer
  553. type: object
  554. github_com_labring_aiproxy_core_relay_model.Usage:
  555. properties:
  556. completion_tokens:
  557. type: integer
  558. completion_tokens_details:
  559. $ref: '#/definitions/model.CompletionTokensDetails'
  560. prompt_tokens:
  561. type: integer
  562. prompt_tokens_details:
  563. $ref: '#/definitions/model.PromptTokensDetails'
  564. total_tokens:
  565. type: integer
  566. web_search_count:
  567. type: integer
  568. type: object
  569. middleware.APIResponse:
  570. properties:
  571. data: {}
  572. message:
  573. type: string
  574. success:
  575. type: boolean
  576. type: object
  577. mode.Mode:
  578. enum:
  579. - 0
  580. - 1
  581. - 2
  582. - 3
  583. - 4
  584. - 5
  585. - 6
  586. - 7
  587. - 8
  588. - 9
  589. - 10
  590. - 11
  591. - 12
  592. - 13
  593. - 14
  594. - 15
  595. type: integer
  596. x-enum-varnames:
  597. - Unknown
  598. - ChatCompletions
  599. - Completions
  600. - Embeddings
  601. - Moderations
  602. - ImagesGenerations
  603. - ImagesEdits
  604. - AudioSpeech
  605. - AudioTranscription
  606. - AudioTranslation
  607. - Rerank
  608. - ParsePdf
  609. - Anthropic
  610. - VideoGenerationsJobs
  611. - VideoGenerationsGetJobs
  612. - VideoGenerationsContent
  613. model.AnthropicMessageRequest:
  614. properties:
  615. messages:
  616. items:
  617. $ref: '#/definitions/model.Message'
  618. type: array
  619. model:
  620. type: string
  621. type: object
  622. model.Channel:
  623. properties:
  624. balance:
  625. type: number
  626. balance_threshold:
  627. type: number
  628. balance_updated_at:
  629. type: string
  630. base_url:
  631. type: string
  632. channel_tests:
  633. items:
  634. $ref: '#/definitions/model.ChannelTest'
  635. type: array
  636. config:
  637. $ref: '#/definitions/model.ChannelConfig'
  638. created_at:
  639. type: string
  640. enabled_auto_balance_check:
  641. type: boolean
  642. id:
  643. type: integer
  644. key:
  645. type: string
  646. last_test_error_at:
  647. type: string
  648. model_mapping:
  649. additionalProperties:
  650. type: string
  651. type: object
  652. models:
  653. items:
  654. type: string
  655. type: array
  656. name:
  657. type: string
  658. priority:
  659. type: integer
  660. request_count:
  661. type: integer
  662. sets:
  663. items:
  664. type: string
  665. type: array
  666. status:
  667. type: integer
  668. type:
  669. $ref: '#/definitions/model.ChannelType'
  670. used_amount:
  671. type: number
  672. type: object
  673. model.ChannelConfig:
  674. properties:
  675. spec:
  676. items:
  677. type: integer
  678. type: array
  679. type: object
  680. model.ChannelTest:
  681. properties:
  682. actual_model:
  683. type: string
  684. channel_id:
  685. type: integer
  686. channel_name:
  687. type: string
  688. channel_type:
  689. $ref: '#/definitions/model.ChannelType'
  690. code:
  691. type: integer
  692. mode:
  693. $ref: '#/definitions/mode.Mode'
  694. model:
  695. type: string
  696. response:
  697. type: string
  698. success:
  699. type: boolean
  700. test_at:
  701. type: string
  702. took:
  703. type: number
  704. type: object
  705. model.ChannelType:
  706. enum:
  707. - 1
  708. - 3
  709. - 4
  710. - 12
  711. - 13
  712. - 14
  713. - 15
  714. - 16
  715. - 17
  716. - 18
  717. - 19
  718. - 20
  719. - 23
  720. - 24
  721. - 25
  722. - 26
  723. - 27
  724. - 28
  725. - 29
  726. - 30
  727. - 31
  728. - 32
  729. - 33
  730. - 34
  731. - 35
  732. - 36
  733. - 37
  734. - 40
  735. - 41
  736. - 42
  737. - 43
  738. - 44
  739. - 45
  740. - 46
  741. - 47
  742. - 48
  743. type: integer
  744. x-enum-varnames:
  745. - ChannelTypeOpenAI
  746. - ChannelTypeAzure
  747. - ChannelTypeAzure2
  748. - ChannelTypeGoogleGeminiOpenAI
  749. - ChannelTypeBaiduV2
  750. - ChannelTypeAnthropic
  751. - ChannelTypeBaidu
  752. - ChannelTypeZhipu
  753. - ChannelTypeAli
  754. - ChannelTypeXunfei
  755. - ChannelTypeAI360
  756. - ChannelTypeOpenRouter
  757. - ChannelTypeTencent
  758. - ChannelTypeGoogleGemini
  759. - ChannelTypeMoonshot
  760. - ChannelTypeBaichuan
  761. - ChannelTypeMinimax
  762. - ChannelTypeMistral
  763. - ChannelTypeGroq
  764. - ChannelTypeOllama
  765. - ChannelTypeLingyiwanwu
  766. - ChannelTypeStepfun
  767. - ChannelTypeAWS
  768. - ChannelTypeCoze
  769. - ChannelTypeCohere
  770. - ChannelTypeDeepseek
  771. - ChannelTypeCloudflare
  772. - ChannelTypeDoubao
  773. - ChannelTypeNovita
  774. - ChannelTypeVertexAI
  775. - ChannelTypeSiliconflow
  776. - ChannelTypeDoubaoAudio
  777. - ChannelTypeXAI
  778. - ChannelTypeDoc2x
  779. - ChannelTypeJina
  780. - ChannelTypeTextEmbeddingsInference
  781. model.ChartData:
  782. properties:
  783. cache_creation_tokens:
  784. type: integer
  785. cached_tokens:
  786. type: integer
  787. exception_count:
  788. type: integer
  789. input_tokens:
  790. type: integer
  791. max_rpm:
  792. type: integer
  793. max_rps:
  794. type: integer
  795. max_tpm:
  796. type: integer
  797. max_tps:
  798. type: integer
  799. output_tokens:
  800. type: integer
  801. request_count:
  802. type: integer
  803. timestamp:
  804. type: integer
  805. total_tokens:
  806. type: integer
  807. used_amount:
  808. type: number
  809. web_search_count:
  810. type: integer
  811. type: object
  812. model.CompletionTokensDetails:
  813. properties:
  814. accepted_prediction_tokens:
  815. type: integer
  816. audio_tokens:
  817. type: integer
  818. reasoning_tokens:
  819. type: integer
  820. rejected_prediction_tokens:
  821. type: integer
  822. type: object
  823. model.DashboardResponse:
  824. properties:
  825. cache_creation_tokens:
  826. type: integer
  827. cached_tokens:
  828. type: integer
  829. channels:
  830. items:
  831. type: integer
  832. type: array
  833. chart_data:
  834. items:
  835. $ref: '#/definitions/model.ChartData'
  836. type: array
  837. exception_count:
  838. type: integer
  839. input_tokens:
  840. type: integer
  841. max_rpm:
  842. type: integer
  843. max_rps:
  844. type: integer
  845. max_tpm:
  846. type: integer
  847. max_tps:
  848. type: integer
  849. models:
  850. items:
  851. type: string
  852. type: array
  853. output_tokens:
  854. type: integer
  855. rpm:
  856. type: integer
  857. total_count:
  858. type: integer
  859. total_tokens:
  860. type: integer
  861. tpm:
  862. type: integer
  863. used_amount:
  864. type: number
  865. web_search_count:
  866. type: integer
  867. type: object
  868. model.Document:
  869. properties:
  870. text:
  871. type: string
  872. type: object
  873. model.EmbeddingRequest:
  874. properties:
  875. dimensions:
  876. type: integer
  877. encoding_format:
  878. type: string
  879. input:
  880. type: string
  881. model:
  882. type: string
  883. type: object
  884. model.EmbeddingResponse:
  885. properties:
  886. data:
  887. items:
  888. $ref: '#/definitions/model.EmbeddingResponseItem'
  889. type: array
  890. model:
  891. type: string
  892. object:
  893. type: string
  894. usage:
  895. $ref: '#/definitions/github_com_labring_aiproxy_core_relay_model.Usage'
  896. type: object
  897. model.EmbeddingResponseItem:
  898. properties:
  899. embedding:
  900. items:
  901. type: number
  902. type: array
  903. index:
  904. type: integer
  905. object:
  906. type: string
  907. type: object
  908. model.FinishReason:
  909. enum:
  910. - stop
  911. - length
  912. - content_filter
  913. - tool_calls
  914. - function_call
  915. type: string
  916. x-enum-varnames:
  917. - FinishReasonStop
  918. - FinishReasonLength
  919. - FinishReasonContentFilter
  920. - FinishReasonToolCalls
  921. - FinishReasonFunctionCall
  922. model.Function:
  923. properties:
  924. arguments:
  925. type: string
  926. description:
  927. type: string
  928. name:
  929. type: string
  930. parameters: {}
  931. type: object
  932. model.GeneralOpenAIRequest:
  933. properties:
  934. frequency_penalty:
  935. type: number
  936. function_call: {}
  937. functions: {}
  938. input: {}
  939. logit_bias: {}
  940. logprobs:
  941. type: boolean
  942. max_completion_tokens:
  943. type: integer
  944. max_tokens:
  945. type: integer
  946. messages:
  947. items:
  948. $ref: '#/definitions/model.Message'
  949. type: array
  950. metadata: {}
  951. model:
  952. type: string
  953. num_ctx:
  954. type: integer
  955. presence_penalty:
  956. type: number
  957. prompt: {}
  958. response_format:
  959. $ref: '#/definitions/model.ResponseFormat'
  960. seed:
  961. type: number
  962. size:
  963. type: string
  964. stop: {}
  965. stream:
  966. type: boolean
  967. stream_options:
  968. $ref: '#/definitions/model.StreamOptions'
  969. temperature:
  970. type: number
  971. tool_choice: {}
  972. tools:
  973. items:
  974. $ref: '#/definitions/model.Tool'
  975. type: array
  976. top_k:
  977. type: integer
  978. top_logprobs:
  979. type: integer
  980. top_p:
  981. type: number
  982. user:
  983. type: string
  984. type: object
  985. model.GetGroupLogsResult:
  986. properties:
  987. channels:
  988. items:
  989. type: integer
  990. type: array
  991. logs:
  992. items:
  993. $ref: '#/definitions/model.Log'
  994. type: array
  995. models:
  996. items:
  997. type: string
  998. type: array
  999. token_names:
  1000. items:
  1001. type: string
  1002. type: array
  1003. total:
  1004. type: integer
  1005. type: object
  1006. model.GetLogsResult:
  1007. properties:
  1008. channels:
  1009. items:
  1010. type: integer
  1011. type: array
  1012. logs:
  1013. items:
  1014. $ref: '#/definitions/model.Log'
  1015. type: array
  1016. total:
  1017. type: integer
  1018. type: object
  1019. model.Group:
  1020. properties:
  1021. available_sets:
  1022. items:
  1023. type: string
  1024. type: array
  1025. balance_alert_enabled:
  1026. type: boolean
  1027. balance_alert_threshold:
  1028. type: number
  1029. created_at:
  1030. type: string
  1031. id:
  1032. type: string
  1033. request_count:
  1034. type: integer
  1035. rpm_ratio:
  1036. type: number
  1037. status:
  1038. type: integer
  1039. tpm_ratio:
  1040. type: number
  1041. used_amount:
  1042. type: number
  1043. type: object
  1044. model.GroupDashboardResponse:
  1045. properties:
  1046. cache_creation_tokens:
  1047. type: integer
  1048. cached_tokens:
  1049. type: integer
  1050. channels:
  1051. items:
  1052. type: integer
  1053. type: array
  1054. chart_data:
  1055. items:
  1056. $ref: '#/definitions/model.ChartData'
  1057. type: array
  1058. exception_count:
  1059. type: integer
  1060. input_tokens:
  1061. type: integer
  1062. max_rpm:
  1063. type: integer
  1064. max_rps:
  1065. type: integer
  1066. max_tpm:
  1067. type: integer
  1068. max_tps:
  1069. type: integer
  1070. models:
  1071. items:
  1072. type: string
  1073. type: array
  1074. output_tokens:
  1075. type: integer
  1076. rpm:
  1077. type: integer
  1078. token_names:
  1079. items:
  1080. type: string
  1081. type: array
  1082. total_count:
  1083. type: integer
  1084. total_tokens:
  1085. type: integer
  1086. tpm:
  1087. type: integer
  1088. used_amount:
  1089. type: number
  1090. web_search_count:
  1091. type: integer
  1092. type: object
  1093. model.GroupMCP:
  1094. properties:
  1095. created_at:
  1096. type: string
  1097. group_id:
  1098. type: string
  1099. id:
  1100. type: string
  1101. name:
  1102. type: string
  1103. openapi_config:
  1104. $ref: '#/definitions/model.MCPOpenAPIConfig'
  1105. proxy_config:
  1106. $ref: '#/definitions/model.GroupMCPProxyConfig'
  1107. status:
  1108. $ref: '#/definitions/model.GroupMCPStatus'
  1109. type:
  1110. $ref: '#/definitions/model.GroupMCPType'
  1111. update_at:
  1112. type: string
  1113. type: object
  1114. model.GroupMCPProxyConfig:
  1115. properties:
  1116. headers:
  1117. additionalProperties:
  1118. type: string
  1119. type: object
  1120. querys:
  1121. additionalProperties:
  1122. type: string
  1123. type: object
  1124. url:
  1125. type: string
  1126. type: object
  1127. model.GroupMCPStatus:
  1128. enum:
  1129. - 1
  1130. - 2
  1131. type: integer
  1132. x-enum-varnames:
  1133. - GroupMCPStatusEnabled
  1134. - GroupMCPStatusDisabled
  1135. model.GroupMCPType:
  1136. enum:
  1137. - mcp_proxy_sse
  1138. - mcp_proxy_streamable
  1139. - mcp_openapi
  1140. type: string
  1141. x-enum-varnames:
  1142. - GroupMCPTypeProxySSE
  1143. - GroupMCPTypeProxyStreamable
  1144. - GroupMCPTypeOpenAPI
  1145. model.GroupModelConfig:
  1146. properties:
  1147. force_save_detail:
  1148. type: boolean
  1149. group_id:
  1150. type: string
  1151. image_prices:
  1152. additionalProperties:
  1153. type: number
  1154. type: object
  1155. model:
  1156. type: string
  1157. override_force_save_detail:
  1158. type: boolean
  1159. override_limit:
  1160. type: boolean
  1161. override_price:
  1162. type: boolean
  1163. override_retry_times:
  1164. type: boolean
  1165. price:
  1166. $ref: '#/definitions/model.Price'
  1167. retry_times:
  1168. type: integer
  1169. rpm:
  1170. type: integer
  1171. tpm:
  1172. type: integer
  1173. type: object
  1174. model.ImageData:
  1175. properties:
  1176. b64_json:
  1177. type: string
  1178. revised_prompt:
  1179. type: string
  1180. url:
  1181. type: string
  1182. type: object
  1183. model.ImageInputTokensDetails:
  1184. properties:
  1185. image_tokens:
  1186. description: The number of image tokens in the input prompt.
  1187. type: integer
  1188. text_tokens:
  1189. description: The number of text tokens in the input prompt.
  1190. type: integer
  1191. type: object
  1192. model.ImageRequest:
  1193. properties:
  1194. background:
  1195. type: string
  1196. model:
  1197. type: string
  1198. moderation:
  1199. type: string
  1200. "n":
  1201. type: integer
  1202. output_compression:
  1203. type: integer
  1204. output_format:
  1205. description: png, jpeg, webp
  1206. type: string
  1207. prompt:
  1208. type: string
  1209. quality:
  1210. description: auto, high, medium, low, hd, standard
  1211. type: string
  1212. response_format:
  1213. description: url, b64_json
  1214. type: string
  1215. size:
  1216. description: 1024x1024, 1536x1024, 1024x1536, auto, 256x256, 512x512, 1792x1024,
  1217. 1024x1792
  1218. type: string
  1219. style:
  1220. description: vivid, natural
  1221. type: string
  1222. user:
  1223. type: string
  1224. type: object
  1225. model.ImageResponse:
  1226. properties:
  1227. created:
  1228. type: integer
  1229. data:
  1230. items:
  1231. $ref: '#/definitions/model.ImageData'
  1232. type: array
  1233. usage:
  1234. allOf:
  1235. - $ref: '#/definitions/model.ImageUsage'
  1236. description: For gpt-image-1 only, the token usage information for the image
  1237. generation.
  1238. type: object
  1239. model.ImageUsage:
  1240. properties:
  1241. input_tokens:
  1242. description: The number of tokens (images and text) in the input prompt.
  1243. type: integer
  1244. input_tokens_details:
  1245. allOf:
  1246. - $ref: '#/definitions/model.ImageInputTokensDetails'
  1247. description: The input tokens detailed information for the image generation.
  1248. output_tokens:
  1249. description: The number of image tokens in the output image.
  1250. type: integer
  1251. total_tokens:
  1252. description: The total number of tokens (images and text) used for the image
  1253. generation.
  1254. type: integer
  1255. type: object
  1256. model.JSONSchema:
  1257. properties:
  1258. description:
  1259. type: string
  1260. name:
  1261. type: string
  1262. schema:
  1263. additionalProperties: {}
  1264. type: object
  1265. strict:
  1266. type: boolean
  1267. type: object
  1268. model.Log:
  1269. properties:
  1270. channel:
  1271. type: integer
  1272. code:
  1273. type: integer
  1274. content:
  1275. type: string
  1276. created_at:
  1277. type: string
  1278. endpoint:
  1279. type: string
  1280. group:
  1281. type: string
  1282. id:
  1283. type: integer
  1284. ip:
  1285. type: string
  1286. metadata:
  1287. additionalProperties:
  1288. type: string
  1289. type: object
  1290. mode:
  1291. type: integer
  1292. model:
  1293. type: string
  1294. price:
  1295. $ref: '#/definitions/model.Price'
  1296. request_at:
  1297. type: string
  1298. request_detail:
  1299. $ref: '#/definitions/model.RequestDetail'
  1300. request_id:
  1301. type: string
  1302. retry_at:
  1303. type: string
  1304. retry_times:
  1305. type: integer
  1306. token_id:
  1307. type: integer
  1308. token_name:
  1309. type: string
  1310. ttfb_milliseconds:
  1311. type: integer
  1312. usage:
  1313. $ref: '#/definitions/github_com_labring_aiproxy_core_model.Usage'
  1314. used_amount:
  1315. type: number
  1316. user:
  1317. description: https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids
  1318. type: string
  1319. type: object
  1320. model.MCPEmbeddingConfig:
  1321. properties:
  1322. init:
  1323. additionalProperties:
  1324. type: string
  1325. type: object
  1326. reusing:
  1327. additionalProperties:
  1328. $ref: '#/definitions/model.MCPEmbeddingReusingConfig'
  1329. type: object
  1330. type: object
  1331. model.MCPEmbeddingReusingConfig:
  1332. properties:
  1333. description:
  1334. type: string
  1335. name:
  1336. type: string
  1337. required:
  1338. type: boolean
  1339. type: object
  1340. model.MCPOpenAPIConfig:
  1341. properties:
  1342. authorization:
  1343. type: string
  1344. openapi_content:
  1345. type: string
  1346. openapi_spec:
  1347. type: string
  1348. server_addr:
  1349. type: string
  1350. v2:
  1351. type: boolean
  1352. type: object
  1353. model.MCPPrice:
  1354. properties:
  1355. default_tools_call_price:
  1356. type: number
  1357. tools_call_prices:
  1358. additionalProperties:
  1359. type: number
  1360. type: object
  1361. type: object
  1362. model.Message:
  1363. properties:
  1364. content: {}
  1365. name:
  1366. type: string
  1367. reasoning_content:
  1368. type: string
  1369. role:
  1370. type: string
  1371. tool_call_id:
  1372. type: string
  1373. tool_calls:
  1374. items:
  1375. $ref: '#/definitions/model.Tool'
  1376. type: array
  1377. type: object
  1378. model.ModelConfig:
  1379. properties:
  1380. config:
  1381. additionalProperties: {}
  1382. type: object
  1383. created_at:
  1384. type: string
  1385. exclude_from_tests:
  1386. type: boolean
  1387. force_save_detail:
  1388. type: boolean
  1389. image_prices:
  1390. additionalProperties:
  1391. type: number
  1392. description: map[size]price_per_image
  1393. type: object
  1394. image_quality_prices:
  1395. additionalProperties:
  1396. additionalProperties:
  1397. type: number
  1398. type: object
  1399. description: map[size]map[quality]price_per_image
  1400. type: object
  1401. max_error_rate:
  1402. type: number
  1403. model:
  1404. type: string
  1405. owner:
  1406. $ref: '#/definitions/model.ModelOwner'
  1407. plugin:
  1408. additionalProperties:
  1409. items:
  1410. type: integer
  1411. type: array
  1412. type: object
  1413. price:
  1414. $ref: '#/definitions/model.Price'
  1415. retry_times:
  1416. type: integer
  1417. rpm:
  1418. type: integer
  1419. timeout:
  1420. type: integer
  1421. tpm:
  1422. type: integer
  1423. type:
  1424. $ref: '#/definitions/mode.Mode'
  1425. updated_at:
  1426. type: string
  1427. type: object
  1428. model.ModelData:
  1429. properties:
  1430. cache_creation_tokens:
  1431. type: integer
  1432. cached_tokens:
  1433. type: integer
  1434. exception_count:
  1435. type: integer
  1436. input_tokens:
  1437. type: integer
  1438. max_rpm:
  1439. type: integer
  1440. max_rps:
  1441. type: integer
  1442. max_tpm:
  1443. type: integer
  1444. max_tps:
  1445. type: integer
  1446. model:
  1447. type: string
  1448. output_tokens:
  1449. type: integer
  1450. request_count:
  1451. type: integer
  1452. timestamp:
  1453. type: integer
  1454. total_tokens:
  1455. type: integer
  1456. used_amount:
  1457. type: number
  1458. web_search_count:
  1459. type: integer
  1460. type: object
  1461. model.ModelOwner:
  1462. enum:
  1463. - openai
  1464. - alibaba
  1465. - tencent
  1466. - xunfei
  1467. - deepseek
  1468. - moonshot
  1469. - minimax
  1470. - baidu
  1471. - google
  1472. - baai
  1473. - funaudiollm
  1474. - doubao
  1475. - fishaudio
  1476. - chatglm
  1477. - stabilityai
  1478. - netease
  1479. - ai360
  1480. - anthropic
  1481. - meta
  1482. - baichuan
  1483. - mistral
  1484. - openchat
  1485. - microsoft
  1486. - defog
  1487. - nexusflow
  1488. - cohere
  1489. - huggingface
  1490. - lingyiwanwu
  1491. - stepfun
  1492. - xai
  1493. - doc2x
  1494. - jina
  1495. type: string
  1496. x-enum-varnames:
  1497. - ModelOwnerOpenAI
  1498. - ModelOwnerAlibaba
  1499. - ModelOwnerTencent
  1500. - ModelOwnerXunfei
  1501. - ModelOwnerDeepSeek
  1502. - ModelOwnerMoonshot
  1503. - ModelOwnerMiniMax
  1504. - ModelOwnerBaidu
  1505. - ModelOwnerGoogle
  1506. - ModelOwnerBAAI
  1507. - ModelOwnerFunAudioLLM
  1508. - ModelOwnerDoubao
  1509. - ModelOwnerFishAudio
  1510. - ModelOwnerChatGLM
  1511. - ModelOwnerStabilityAI
  1512. - ModelOwnerNetease
  1513. - ModelOwnerAI360
  1514. - ModelOwnerAnthropic
  1515. - ModelOwnerMeta
  1516. - ModelOwnerBaichuan
  1517. - ModelOwnerMistral
  1518. - ModelOwnerOpenChat
  1519. - ModelOwnerMicrosoft
  1520. - ModelOwnerDefog
  1521. - ModelOwnerNexusFlow
  1522. - ModelOwnerCohere
  1523. - ModelOwnerHuggingFace
  1524. - ModelOwnerLingyiWanwu
  1525. - ModelOwnerStepFun
  1526. - ModelOwnerXAI
  1527. - ModelOwnerDoc2x
  1528. - ModelOwnerJina
  1529. model.Option:
  1530. properties:
  1531. key:
  1532. type: string
  1533. value:
  1534. type: string
  1535. type: object
  1536. model.ParamType:
  1537. enum:
  1538. - header
  1539. - query
  1540. type: string
  1541. x-enum-varnames:
  1542. - ParamTypeHeader
  1543. - ParamTypeQuery
  1544. model.ParsePdfResponse:
  1545. properties:
  1546. markdown:
  1547. type: string
  1548. pages:
  1549. type: integer
  1550. type: object
  1551. model.Price:
  1552. properties:
  1553. cache_creation_price:
  1554. type: number
  1555. cache_creation_price_unit:
  1556. type: integer
  1557. cached_price:
  1558. type: number
  1559. cached_price_unit:
  1560. type: integer
  1561. image_input_price:
  1562. type: number
  1563. image_input_price_unit:
  1564. type: integer
  1565. input_price:
  1566. type: number
  1567. input_price_unit:
  1568. type: integer
  1569. output_price:
  1570. type: number
  1571. output_price_unit:
  1572. type: integer
  1573. per_request_price:
  1574. type: number
  1575. thinking_mode_output_price:
  1576. description: |-
  1577. when ThinkingModeOutputPrice and ReasoningTokens are not 0, OutputPrice and OutputPriceUnit
  1578. will be overwritten
  1579. type: number
  1580. thinking_mode_output_price_unit:
  1581. type: integer
  1582. web_search_price:
  1583. type: number
  1584. web_search_price_unit:
  1585. type: integer
  1586. type: object
  1587. model.PromptTokensDetails:
  1588. properties:
  1589. audio_tokens:
  1590. type: integer
  1591. cache_creation_tokens:
  1592. type: integer
  1593. cached_tokens:
  1594. type: integer
  1595. type: object
  1596. model.PublicMCP:
  1597. properties:
  1598. created_at:
  1599. type: string
  1600. embed_config:
  1601. $ref: '#/definitions/model.MCPEmbeddingConfig'
  1602. id:
  1603. type: string
  1604. logo_url:
  1605. type: string
  1606. name:
  1607. type: string
  1608. openapi_config:
  1609. $ref: '#/definitions/model.MCPOpenAPIConfig'
  1610. price:
  1611. $ref: '#/definitions/model.MCPPrice'
  1612. proxy_config:
  1613. $ref: '#/definitions/model.PublicMCPProxyConfig'
  1614. readme:
  1615. type: string
  1616. readme_url:
  1617. type: string
  1618. repo_url:
  1619. type: string
  1620. status:
  1621. $ref: '#/definitions/model.PublicMCPStatus'
  1622. tags:
  1623. items:
  1624. type: string
  1625. type: array
  1626. type:
  1627. $ref: '#/definitions/model.PublicMCPType'
  1628. update_at:
  1629. type: string
  1630. type: object
  1631. model.PublicMCPProxyConfig:
  1632. properties:
  1633. headers:
  1634. additionalProperties:
  1635. type: string
  1636. type: object
  1637. querys:
  1638. additionalProperties:
  1639. type: string
  1640. type: object
  1641. reusing_params:
  1642. additionalProperties:
  1643. $ref: '#/definitions/model.ReusingParam'
  1644. type: object
  1645. url:
  1646. type: string
  1647. type: object
  1648. model.PublicMCPReusingParam:
  1649. properties:
  1650. created_at:
  1651. type: string
  1652. group_id:
  1653. type: string
  1654. mcp_id:
  1655. type: string
  1656. reusing_params:
  1657. additionalProperties:
  1658. type: string
  1659. type: object
  1660. update_at:
  1661. type: string
  1662. type: object
  1663. model.PublicMCPStatus:
  1664. enum:
  1665. - 1
  1666. - 2
  1667. type: integer
  1668. x-enum-varnames:
  1669. - PublicMCPStatusEnabled
  1670. - PublicMCPStatusDisabled
  1671. model.PublicMCPType:
  1672. enum:
  1673. - mcp_proxy_sse
  1674. - mcp_proxy_streamable
  1675. - mcp_docs
  1676. - mcp_openapi
  1677. - mcp_embed
  1678. type: string
  1679. x-enum-comments:
  1680. PublicMCPTypeDocs: read only
  1681. x-enum-varnames:
  1682. - PublicMCPTypeProxySSE
  1683. - PublicMCPTypeProxyStreamable
  1684. - PublicMCPTypeDocs
  1685. - PublicMCPTypeOpenAPI
  1686. - PublicMCPTypeEmbed
  1687. model.RequestDetail:
  1688. properties:
  1689. id:
  1690. type: integer
  1691. log_id:
  1692. type: integer
  1693. request_body:
  1694. type: string
  1695. request_body_truncated:
  1696. type: boolean
  1697. response_body:
  1698. type: string
  1699. response_body_truncated:
  1700. type: boolean
  1701. type: object
  1702. model.RerankMeta:
  1703. properties:
  1704. model:
  1705. type: string
  1706. tokens:
  1707. $ref: '#/definitions/model.RerankMetaTokens'
  1708. type: object
  1709. model.RerankMetaTokens:
  1710. properties:
  1711. input_tokens:
  1712. type: integer
  1713. output_tokens:
  1714. type: integer
  1715. type: object
  1716. model.RerankRequest:
  1717. properties:
  1718. documents:
  1719. items:
  1720. type: string
  1721. type: array
  1722. max_chunks_per_doc:
  1723. type: integer
  1724. model:
  1725. type: string
  1726. overlap_tokens:
  1727. type: integer
  1728. query:
  1729. type: string
  1730. return_documents:
  1731. type: boolean
  1732. top_n:
  1733. type: integer
  1734. type: object
  1735. model.RerankResponse:
  1736. properties:
  1737. id:
  1738. type: string
  1739. meta:
  1740. $ref: '#/definitions/model.RerankMeta'
  1741. results:
  1742. items:
  1743. $ref: '#/definitions/model.RerankResult'
  1744. type: array
  1745. type: object
  1746. model.RerankResult:
  1747. properties:
  1748. document:
  1749. $ref: '#/definitions/model.Document'
  1750. index:
  1751. type: integer
  1752. relevance_score:
  1753. type: number
  1754. type: object
  1755. model.ResponseFormat:
  1756. properties:
  1757. json_schema:
  1758. $ref: '#/definitions/model.JSONSchema'
  1759. type:
  1760. type: string
  1761. type: object
  1762. model.ReusingParam:
  1763. properties:
  1764. description:
  1765. type: string
  1766. name:
  1767. type: string
  1768. required:
  1769. type: boolean
  1770. type:
  1771. $ref: '#/definitions/model.ParamType'
  1772. type: object
  1773. model.StreamOptions:
  1774. properties:
  1775. include_usage:
  1776. type: boolean
  1777. type: object
  1778. model.SttJSONResponse:
  1779. properties:
  1780. text:
  1781. type: string
  1782. type: object
  1783. model.TextResponse:
  1784. properties:
  1785. choices:
  1786. items:
  1787. $ref: '#/definitions/model.TextResponseChoice'
  1788. type: array
  1789. created:
  1790. type: integer
  1791. id:
  1792. type: string
  1793. model:
  1794. type: string
  1795. object:
  1796. type: string
  1797. usage:
  1798. $ref: '#/definitions/github_com_labring_aiproxy_core_relay_model.Usage'
  1799. type: object
  1800. model.TextResponseChoice:
  1801. properties:
  1802. finish_reason:
  1803. $ref: '#/definitions/model.FinishReason'
  1804. index:
  1805. type: integer
  1806. message:
  1807. $ref: '#/definitions/model.Message'
  1808. text:
  1809. type: string
  1810. type: object
  1811. model.TextToSpeechRequest:
  1812. properties:
  1813. input:
  1814. type: string
  1815. model:
  1816. type: string
  1817. response_format:
  1818. type: string
  1819. speed:
  1820. type: number
  1821. voice:
  1822. type: string
  1823. required:
  1824. - input
  1825. - model
  1826. - voice
  1827. type: object
  1828. model.TimeModelData:
  1829. properties:
  1830. models:
  1831. items:
  1832. $ref: '#/definitions/model.ModelData'
  1833. type: array
  1834. timestamp:
  1835. type: integer
  1836. type: object
  1837. model.Tool:
  1838. properties:
  1839. function:
  1840. $ref: '#/definitions/model.Function'
  1841. id:
  1842. type: string
  1843. type:
  1844. type: string
  1845. type: object
  1846. model.VideoGenerationJob:
  1847. properties:
  1848. created_at:
  1849. type: integer
  1850. expires_at:
  1851. type: integer
  1852. finish_reason:
  1853. type: string
  1854. finished_at:
  1855. type: integer
  1856. generations:
  1857. items:
  1858. $ref: '#/definitions/model.VideoGenerations'
  1859. type: array
  1860. height:
  1861. type: integer
  1862. id:
  1863. type: string
  1864. model:
  1865. type: string
  1866. n_seconds:
  1867. type: integer
  1868. n_variants:
  1869. type: integer
  1870. object:
  1871. type: string
  1872. prompt:
  1873. type: string
  1874. status:
  1875. $ref: '#/definitions/model.VideoGenerationJobStatus'
  1876. width:
  1877. type: integer
  1878. type: object
  1879. model.VideoGenerationJobRequest:
  1880. properties:
  1881. height:
  1882. type: integer
  1883. model:
  1884. type: string
  1885. n_seconds:
  1886. type: integer
  1887. n_variants:
  1888. type: integer
  1889. prompt:
  1890. type: string
  1891. width:
  1892. type: integer
  1893. type: object
  1894. model.VideoGenerationJobStatus:
  1895. enum:
  1896. - queued
  1897. - processing
  1898. - running
  1899. - succeeded
  1900. type: string
  1901. x-enum-varnames:
  1902. - VideoGenerationJobStatusQueued
  1903. - VideoGenerationJobStatusProcessing
  1904. - VideoGenerationJobStatusRunning
  1905. - VideoGenerationJobStatusSucceeded
  1906. model.VideoGenerations:
  1907. properties:
  1908. created_at:
  1909. type: integer
  1910. height:
  1911. type: integer
  1912. id:
  1913. type: string
  1914. job_id:
  1915. type: string
  1916. n_seconds:
  1917. type: integer
  1918. object:
  1919. type: string
  1920. prompt:
  1921. type: string
  1922. width:
  1923. type: integer
  1924. type: object
  1925. openai.SubscriptionResponse:
  1926. properties:
  1927. access_until:
  1928. type: integer
  1929. hard_limit_usd:
  1930. type: number
  1931. has_payment_method:
  1932. type: boolean
  1933. object:
  1934. type: string
  1935. soft_limit_usd:
  1936. type: number
  1937. system_hard_limit_usd:
  1938. type: number
  1939. type: object
  1940. openai.UsageResponse:
  1941. properties:
  1942. object:
  1943. type: string
  1944. total_usage:
  1945. description: DailyCosts []OpenAIUsageDailyCost `json:"daily_costs"`
  1946. type: number
  1947. type: object
  1948. info:
  1949. contact: {}
  1950. title: AI Proxy Swagger API
  1951. version: "1.0"
  1952. paths:
  1953. /api/channel/:
  1954. post:
  1955. consumes:
  1956. - application/json
  1957. description: Adds a new channel to the system
  1958. parameters:
  1959. - description: Channel information
  1960. in: body
  1961. name: channel
  1962. required: true
  1963. schema:
  1964. $ref: '#/definitions/controller.AddChannelRequest'
  1965. produces:
  1966. - application/json
  1967. responses:
  1968. "200":
  1969. description: OK
  1970. schema:
  1971. $ref: '#/definitions/middleware.APIResponse'
  1972. security:
  1973. - ApiKeyAuth: []
  1974. summary: Add a single channel
  1975. tags:
  1976. - channel
  1977. /api/channel/{id}:
  1978. delete:
  1979. description: Deletes a channel by its ID
  1980. parameters:
  1981. - description: Channel ID
  1982. in: path
  1983. name: id
  1984. required: true
  1985. type: integer
  1986. produces:
  1987. - application/json
  1988. responses:
  1989. "200":
  1990. description: OK
  1991. schema:
  1992. $ref: '#/definitions/middleware.APIResponse'
  1993. security:
  1994. - ApiKeyAuth: []
  1995. summary: Delete a channel
  1996. tags:
  1997. - channel
  1998. get:
  1999. description: Returns detailed information about a specific channel
  2000. parameters:
  2001. - description: Channel ID
  2002. in: path
  2003. name: id
  2004. required: true
  2005. type: integer
  2006. produces:
  2007. - application/json
  2008. responses:
  2009. "200":
  2010. description: OK
  2011. schema:
  2012. allOf:
  2013. - $ref: '#/definitions/middleware.APIResponse'
  2014. - properties:
  2015. data:
  2016. $ref: '#/definitions/model.Channel'
  2017. type: object
  2018. security:
  2019. - ApiKeyAuth: []
  2020. summary: Get a channel by ID
  2021. tags:
  2022. - channel
  2023. put:
  2024. consumes:
  2025. - application/json
  2026. description: Updates an existing channel by its ID
  2027. parameters:
  2028. - description: Channel ID
  2029. in: path
  2030. name: id
  2031. required: true
  2032. type: integer
  2033. - description: Updated channel information
  2034. in: body
  2035. name: channel
  2036. required: true
  2037. schema:
  2038. $ref: '#/definitions/controller.AddChannelRequest'
  2039. produces:
  2040. - application/json
  2041. responses:
  2042. "200":
  2043. description: OK
  2044. schema:
  2045. allOf:
  2046. - $ref: '#/definitions/middleware.APIResponse'
  2047. - properties:
  2048. data:
  2049. $ref: '#/definitions/model.Channel'
  2050. type: object
  2051. security:
  2052. - ApiKeyAuth: []
  2053. summary: Update a channel
  2054. tags:
  2055. - channel
  2056. /api/channel/{id}/{model}:
  2057. get:
  2058. description: Tests a single model in the channel
  2059. parameters:
  2060. - description: Channel ID
  2061. in: path
  2062. name: id
  2063. required: true
  2064. type: integer
  2065. - description: Model name
  2066. in: path
  2067. name: model
  2068. required: true
  2069. type: string
  2070. produces:
  2071. - application/json
  2072. responses:
  2073. "200":
  2074. description: OK
  2075. schema:
  2076. allOf:
  2077. - $ref: '#/definitions/middleware.APIResponse'
  2078. - properties:
  2079. data:
  2080. $ref: '#/definitions/model.ChannelTest'
  2081. type: object
  2082. security:
  2083. - ApiKeyAuth: []
  2084. summary: Test channel model
  2085. tags:
  2086. - channel
  2087. /api/channel/{id}/balance:
  2088. get:
  2089. description: Updates the balance for a single channel
  2090. parameters:
  2091. - description: Channel ID
  2092. in: path
  2093. name: id
  2094. required: true
  2095. type: integer
  2096. produces:
  2097. - application/json
  2098. responses:
  2099. "200":
  2100. description: OK
  2101. schema:
  2102. allOf:
  2103. - $ref: '#/definitions/middleware.APIResponse'
  2104. - properties:
  2105. data:
  2106. type: number
  2107. type: object
  2108. security:
  2109. - ApiKeyAuth: []
  2110. summary: Update channel balance
  2111. tags:
  2112. - channel
  2113. /api/channel/{id}/status:
  2114. post:
  2115. consumes:
  2116. - application/json
  2117. description: Updates the status of a channel by its ID
  2118. parameters:
  2119. - description: Channel ID
  2120. in: path
  2121. name: id
  2122. required: true
  2123. type: integer
  2124. - description: Status information
  2125. in: body
  2126. name: status
  2127. required: true
  2128. schema:
  2129. $ref: '#/definitions/controller.UpdateChannelStatusRequest'
  2130. produces:
  2131. - application/json
  2132. responses:
  2133. "200":
  2134. description: OK
  2135. schema:
  2136. $ref: '#/definitions/middleware.APIResponse'
  2137. security:
  2138. - ApiKeyAuth: []
  2139. summary: Update channel status
  2140. tags:
  2141. - channel
  2142. /api/channel/{id}/test:
  2143. get:
  2144. description: Tests all models in the channel
  2145. parameters:
  2146. - description: Channel ID
  2147. in: path
  2148. name: id
  2149. required: true
  2150. type: integer
  2151. - description: Return success
  2152. in: query
  2153. name: return_success
  2154. type: boolean
  2155. - description: Success body
  2156. in: query
  2157. name: success_body
  2158. type: boolean
  2159. - description: Stream
  2160. in: query
  2161. name: stream
  2162. type: boolean
  2163. produces:
  2164. - application/json
  2165. responses:
  2166. "200":
  2167. description: OK
  2168. schema:
  2169. allOf:
  2170. - $ref: '#/definitions/middleware.APIResponse'
  2171. - properties:
  2172. data:
  2173. items:
  2174. $ref: '#/definitions/controller.TestResult'
  2175. type: array
  2176. type: object
  2177. security:
  2178. - ApiKeyAuth: []
  2179. summary: Test channel models
  2180. tags:
  2181. - channel
  2182. /api/channels/:
  2183. get:
  2184. description: Returns a paginated list of channels with optional filters
  2185. parameters:
  2186. - description: Page number
  2187. in: query
  2188. name: page
  2189. type: integer
  2190. - description: Items per page
  2191. in: query
  2192. name: per_page
  2193. type: integer
  2194. - description: Filter by id
  2195. in: query
  2196. name: id
  2197. type: integer
  2198. - description: Filter by name
  2199. in: query
  2200. name: name
  2201. type: string
  2202. - description: Filter by key
  2203. in: query
  2204. name: key
  2205. type: string
  2206. - description: Filter by channel type
  2207. in: query
  2208. name: channel_type
  2209. type: integer
  2210. - description: Filter by base URL
  2211. in: query
  2212. name: base_url
  2213. type: string
  2214. - description: Order by field
  2215. in: query
  2216. name: order
  2217. type: string
  2218. produces:
  2219. - application/json
  2220. responses:
  2221. "200":
  2222. description: OK
  2223. schema:
  2224. allOf:
  2225. - $ref: '#/definitions/middleware.APIResponse'
  2226. - properties:
  2227. data:
  2228. additionalProperties:
  2229. allOf:
  2230. - {}
  2231. - properties:
  2232. channels:
  2233. items:
  2234. $ref: '#/definitions/model.Channel'
  2235. type: array
  2236. total:
  2237. type: integer
  2238. type: object
  2239. type: object
  2240. type: object
  2241. security:
  2242. - ApiKeyAuth: []
  2243. summary: Get channels with pagination
  2244. tags:
  2245. - channels
  2246. post:
  2247. consumes:
  2248. - application/json
  2249. description: Adds multiple channels in a batch operation
  2250. parameters:
  2251. - description: Channel information
  2252. in: body
  2253. name: channels
  2254. required: true
  2255. schema:
  2256. items:
  2257. $ref: '#/definitions/controller.AddChannelRequest'
  2258. type: array
  2259. produces:
  2260. - application/json
  2261. responses:
  2262. "200":
  2263. description: OK
  2264. schema:
  2265. $ref: '#/definitions/middleware.APIResponse'
  2266. security:
  2267. - ApiKeyAuth: []
  2268. summary: Add multiple channels
  2269. tags:
  2270. - channels
  2271. /api/channels/all:
  2272. get:
  2273. description: Returns a list of all channels without pagination
  2274. produces:
  2275. - application/json
  2276. responses:
  2277. "200":
  2278. description: OK
  2279. schema:
  2280. allOf:
  2281. - $ref: '#/definitions/middleware.APIResponse'
  2282. - properties:
  2283. data:
  2284. items:
  2285. $ref: '#/definitions/model.Channel'
  2286. type: array
  2287. type: object
  2288. security:
  2289. - ApiKeyAuth: []
  2290. summary: Get all channels
  2291. tags:
  2292. - channels
  2293. /api/channels/balance:
  2294. get:
  2295. description: Updates the balance for all channels
  2296. produces:
  2297. - application/json
  2298. responses:
  2299. "200":
  2300. description: OK
  2301. schema:
  2302. $ref: '#/definitions/middleware.APIResponse'
  2303. security:
  2304. - ApiKeyAuth: []
  2305. summary: Update all channels balance
  2306. tags:
  2307. - channel
  2308. /api/channels/batch_delete:
  2309. post:
  2310. consumes:
  2311. - application/json
  2312. description: Deletes multiple channels by their IDs
  2313. parameters:
  2314. - description: Channel IDs
  2315. in: body
  2316. name: ids
  2317. required: true
  2318. schema:
  2319. items:
  2320. type: integer
  2321. type: array
  2322. produces:
  2323. - application/json
  2324. responses:
  2325. "200":
  2326. description: OK
  2327. schema:
  2328. $ref: '#/definitions/middleware.APIResponse'
  2329. security:
  2330. - ApiKeyAuth: []
  2331. summary: Delete multiple channels
  2332. tags:
  2333. - channels
  2334. /api/channels/import/oneapi:
  2335. post:
  2336. description: Imports channels from OneAPI
  2337. parameters:
  2338. - description: Import channel from OneAPI request
  2339. in: body
  2340. name: request
  2341. required: true
  2342. schema:
  2343. $ref: '#/definitions/controller.ImportChannelFromOneAPIRequest'
  2344. produces:
  2345. - application/json
  2346. responses:
  2347. "200":
  2348. description: OK
  2349. schema:
  2350. allOf:
  2351. - $ref: '#/definitions/middleware.APIResponse'
  2352. - properties:
  2353. data:
  2354. items: {}
  2355. type: array
  2356. type: object
  2357. security:
  2358. - ApiKeyAuth: []
  2359. summary: Import channel from OneAPI
  2360. tags:
  2361. - channels
  2362. /api/channels/search:
  2363. get:
  2364. description: Search channels with keyword and optional filters
  2365. parameters:
  2366. - description: Search keyword
  2367. in: query
  2368. name: keyword
  2369. required: true
  2370. type: string
  2371. - description: Page number
  2372. in: query
  2373. name: page
  2374. type: integer
  2375. - description: Items per page
  2376. in: query
  2377. name: per_page
  2378. type: integer
  2379. - description: Filter by id
  2380. in: query
  2381. name: id
  2382. type: integer
  2383. - description: Filter by name
  2384. in: query
  2385. name: name
  2386. type: string
  2387. - description: Filter by key
  2388. in: query
  2389. name: key
  2390. type: string
  2391. - description: Filter by channel type
  2392. in: query
  2393. name: channel_type
  2394. type: integer
  2395. - description: Filter by base URL
  2396. in: query
  2397. name: base_url
  2398. type: string
  2399. - description: Order by field
  2400. in: query
  2401. name: order
  2402. type: string
  2403. produces:
  2404. - application/json
  2405. responses:
  2406. "200":
  2407. description: OK
  2408. schema:
  2409. allOf:
  2410. - $ref: '#/definitions/middleware.APIResponse'
  2411. - properties:
  2412. data:
  2413. additionalProperties:
  2414. allOf:
  2415. - {}
  2416. - properties:
  2417. channels:
  2418. items:
  2419. $ref: '#/definitions/model.Channel'
  2420. type: array
  2421. total:
  2422. type: integer
  2423. type: object
  2424. type: object
  2425. type: object
  2426. security:
  2427. - ApiKeyAuth: []
  2428. summary: Search channels
  2429. tags:
  2430. - channels
  2431. /api/channels/test:
  2432. get:
  2433. description: Tests all channels
  2434. parameters:
  2435. - description: Test disabled
  2436. in: query
  2437. name: test_disabled
  2438. type: boolean
  2439. - description: Return success
  2440. in: query
  2441. name: return_success
  2442. type: boolean
  2443. - description: Success body
  2444. in: query
  2445. name: success_body
  2446. type: boolean
  2447. - description: Stream
  2448. in: query
  2449. name: stream
  2450. type: boolean
  2451. produces:
  2452. - application/json
  2453. responses:
  2454. "200":
  2455. description: OK
  2456. schema:
  2457. allOf:
  2458. - $ref: '#/definitions/middleware.APIResponse'
  2459. - properties:
  2460. data:
  2461. items:
  2462. $ref: '#/definitions/controller.TestResult'
  2463. type: array
  2464. type: object
  2465. security:
  2466. - ApiKeyAuth: []
  2467. summary: Test all channels
  2468. tags:
  2469. - channel
  2470. /api/channels/type_metas:
  2471. get:
  2472. description: Returns metadata for all channel types
  2473. produces:
  2474. - application/json
  2475. responses:
  2476. "200":
  2477. description: OK
  2478. schema:
  2479. allOf:
  2480. - $ref: '#/definitions/middleware.APIResponse'
  2481. - properties:
  2482. data:
  2483. additionalProperties:
  2484. $ref: '#/definitions/adaptors.AdaptorMeta'
  2485. type: object
  2486. type: object
  2487. security:
  2488. - ApiKeyAuth: []
  2489. summary: Get channel type metadata
  2490. tags:
  2491. - channels
  2492. /api/dashboard/:
  2493. get:
  2494. description: Returns the general dashboard data including usage statistics and
  2495. metrics
  2496. parameters:
  2497. - description: Channel ID
  2498. in: query
  2499. name: channel
  2500. type: integer
  2501. - description: Model name
  2502. in: query
  2503. name: model
  2504. type: string
  2505. - description: Start second timestamp
  2506. in: query
  2507. name: start_timestamp
  2508. type: integer
  2509. - description: End second timestamp
  2510. in: query
  2511. name: end_timestamp
  2512. type: integer
  2513. - description: Timezone, default is Local
  2514. in: query
  2515. name: timezone
  2516. type: string
  2517. - description: Time span type (day, hour)
  2518. in: query
  2519. name: timespan
  2520. type: string
  2521. produces:
  2522. - application/json
  2523. responses:
  2524. "200":
  2525. description: OK
  2526. schema:
  2527. allOf:
  2528. - $ref: '#/definitions/middleware.APIResponse'
  2529. - properties:
  2530. data:
  2531. $ref: '#/definitions/model.DashboardResponse'
  2532. type: object
  2533. security:
  2534. - ApiKeyAuth: []
  2535. summary: Get dashboard data
  2536. tags:
  2537. - dashboard
  2538. /api/dashboard/{group}:
  2539. get:
  2540. description: Returns dashboard data and metrics specific to the given group
  2541. parameters:
  2542. - description: Group
  2543. in: path
  2544. name: group
  2545. required: true
  2546. type: string
  2547. - description: Token name
  2548. in: query
  2549. name: token_name
  2550. type: string
  2551. - description: Model or *
  2552. in: query
  2553. name: model
  2554. type: string
  2555. - description: Start second timestamp
  2556. in: query
  2557. name: start_timestamp
  2558. type: integer
  2559. - description: End second timestamp
  2560. in: query
  2561. name: end_timestamp
  2562. type: integer
  2563. - description: Timezone, default is Local
  2564. in: query
  2565. name: timezone
  2566. type: string
  2567. - description: Time span type (day, hour)
  2568. in: query
  2569. name: timespan
  2570. type: string
  2571. produces:
  2572. - application/json
  2573. responses:
  2574. "200":
  2575. description: OK
  2576. schema:
  2577. allOf:
  2578. - $ref: '#/definitions/middleware.APIResponse'
  2579. - properties:
  2580. data:
  2581. $ref: '#/definitions/model.GroupDashboardResponse'
  2582. type: object
  2583. security:
  2584. - ApiKeyAuth: []
  2585. summary: Get dashboard data for a specific group
  2586. tags:
  2587. - dashboard
  2588. /api/dashboard/{group}/models:
  2589. get:
  2590. description: Returns model-specific metrics and usage data for the given group
  2591. parameters:
  2592. - description: Group
  2593. in: path
  2594. name: group
  2595. required: true
  2596. type: string
  2597. produces:
  2598. - application/json
  2599. responses:
  2600. "200":
  2601. description: OK
  2602. schema:
  2603. allOf:
  2604. - $ref: '#/definitions/middleware.APIResponse'
  2605. - properties:
  2606. data:
  2607. items:
  2608. $ref: '#/definitions/model.ModelConfig'
  2609. type: array
  2610. type: object
  2611. security:
  2612. - ApiKeyAuth: []
  2613. summary: Get model usage data for a specific group
  2614. tags:
  2615. - dashboard
  2616. /api/dashboardv2/:
  2617. get:
  2618. description: Returns model-specific metrics and usage data for the given channel
  2619. parameters:
  2620. - description: Channel ID
  2621. in: query
  2622. name: channel
  2623. type: integer
  2624. - description: Start timestamp
  2625. in: query
  2626. name: start_timestamp
  2627. type: integer
  2628. - description: End timestamp
  2629. in: query
  2630. name: end_timestamp
  2631. type: integer
  2632. - description: Timezone, default is Local
  2633. in: query
  2634. name: timezone
  2635. type: string
  2636. - description: Time span type (day, hour)
  2637. in: query
  2638. name: timespan
  2639. type: string
  2640. produces:
  2641. - application/json
  2642. responses:
  2643. "200":
  2644. description: OK
  2645. schema:
  2646. allOf:
  2647. - $ref: '#/definitions/middleware.APIResponse'
  2648. - properties:
  2649. data:
  2650. items:
  2651. $ref: '#/definitions/model.TimeModelData'
  2652. type: array
  2653. type: object
  2654. security:
  2655. - ApiKeyAuth: []
  2656. summary: Get model usage data for a specific channel
  2657. tags:
  2658. - dashboard
  2659. /api/dashboardv2/{group}:
  2660. get:
  2661. description: Returns model-specific metrics and usage data for the given group
  2662. parameters:
  2663. - description: Group
  2664. in: path
  2665. name: group
  2666. required: true
  2667. type: string
  2668. - description: Token name
  2669. in: query
  2670. name: token_name
  2671. type: string
  2672. - description: Start timestamp
  2673. in: query
  2674. name: start_timestamp
  2675. type: integer
  2676. - description: End timestamp
  2677. in: query
  2678. name: end_timestamp
  2679. type: integer
  2680. - description: Timezone, default is Local
  2681. in: query
  2682. name: timezone
  2683. type: string
  2684. - description: Time span type (day, hour)
  2685. in: query
  2686. name: timespan
  2687. type: string
  2688. produces:
  2689. - application/json
  2690. responses:
  2691. "200":
  2692. description: OK
  2693. schema:
  2694. allOf:
  2695. - $ref: '#/definitions/middleware.APIResponse'
  2696. - properties:
  2697. data:
  2698. items:
  2699. $ref: '#/definitions/model.TimeModelData'
  2700. type: array
  2701. type: object
  2702. security:
  2703. - ApiKeyAuth: []
  2704. summary: Get model usage data for a specific group
  2705. tags:
  2706. - dashboard
  2707. /api/embedmcp/:
  2708. get:
  2709. consumes:
  2710. - application/json
  2711. description: Get embed mcp
  2712. produces:
  2713. - application/json
  2714. responses:
  2715. "200":
  2716. description: OK
  2717. schema:
  2718. items:
  2719. $ref: '#/definitions/controller.EmbedMCP'
  2720. type: array
  2721. security:
  2722. - ApiKeyAuth: []
  2723. summary: Get embed mcp
  2724. tags:
  2725. - embedmcp
  2726. post:
  2727. consumes:
  2728. - application/json
  2729. description: Save embed mcp
  2730. parameters:
  2731. - description: Save embed mcp request
  2732. in: body
  2733. name: body
  2734. required: true
  2735. schema:
  2736. $ref: '#/definitions/controller.SaveEmbedMCPRequest'
  2737. produces:
  2738. - application/json
  2739. responses:
  2740. "200":
  2741. description: OK
  2742. security:
  2743. - ApiKeyAuth: []
  2744. summary: Save embed mcp
  2745. tags:
  2746. - embedmcp
  2747. /api/group/{group}:
  2748. delete:
  2749. description: Deletes a group by its name
  2750. parameters:
  2751. - description: Group name
  2752. in: path
  2753. name: group
  2754. required: true
  2755. type: string
  2756. produces:
  2757. - application/json
  2758. responses:
  2759. "200":
  2760. description: OK
  2761. schema:
  2762. $ref: '#/definitions/middleware.APIResponse'
  2763. security:
  2764. - ApiKeyAuth: []
  2765. summary: Delete a group
  2766. tags:
  2767. - group
  2768. get:
  2769. description: Returns detailed information about a specific group
  2770. parameters:
  2771. - description: Group name
  2772. in: path
  2773. name: group
  2774. required: true
  2775. type: string
  2776. produces:
  2777. - application/json
  2778. responses:
  2779. "200":
  2780. description: OK
  2781. schema:
  2782. allOf:
  2783. - $ref: '#/definitions/middleware.APIResponse'
  2784. - properties:
  2785. data:
  2786. $ref: '#/definitions/controller.GroupResponse'
  2787. type: object
  2788. security:
  2789. - ApiKeyAuth: []
  2790. summary: Get a group
  2791. tags:
  2792. - group
  2793. post:
  2794. consumes:
  2795. - application/json
  2796. description: Creates a new group with the given information
  2797. parameters:
  2798. - description: Group name
  2799. in: path
  2800. name: group
  2801. required: true
  2802. type: string
  2803. - description: Group information
  2804. in: body
  2805. name: data
  2806. required: true
  2807. schema:
  2808. $ref: '#/definitions/controller.CreateGroupRequest'
  2809. produces:
  2810. - application/json
  2811. responses:
  2812. "200":
  2813. description: OK
  2814. schema:
  2815. allOf:
  2816. - $ref: '#/definitions/middleware.APIResponse'
  2817. - properties:
  2818. data:
  2819. $ref: '#/definitions/model.Group'
  2820. type: object
  2821. security:
  2822. - ApiKeyAuth: []
  2823. summary: Create a new group
  2824. tags:
  2825. - group
  2826. put:
  2827. consumes:
  2828. - application/json
  2829. description: Updates an existing group with the given information
  2830. parameters:
  2831. - description: Group name
  2832. in: path
  2833. name: group
  2834. required: true
  2835. type: string
  2836. - description: Updated group information
  2837. in: body
  2838. name: data
  2839. required: true
  2840. schema:
  2841. $ref: '#/definitions/controller.CreateGroupRequest'
  2842. produces:
  2843. - application/json
  2844. responses:
  2845. "200":
  2846. description: OK
  2847. schema:
  2848. allOf:
  2849. - $ref: '#/definitions/middleware.APIResponse'
  2850. - properties:
  2851. data:
  2852. $ref: '#/definitions/model.Group'
  2853. type: object
  2854. security:
  2855. - ApiKeyAuth: []
  2856. summary: Update a group
  2857. tags:
  2858. - group
  2859. /api/group/{group}/model_config/{model}:
  2860. delete:
  2861. description: Delete group model config
  2862. parameters:
  2863. - description: Group name
  2864. in: path
  2865. name: group
  2866. required: true
  2867. type: string
  2868. - description: Model name
  2869. in: path
  2870. name: model
  2871. required: true
  2872. type: string
  2873. produces:
  2874. - application/json
  2875. responses:
  2876. "200":
  2877. description: OK
  2878. schema:
  2879. $ref: '#/definitions/middleware.APIResponse'
  2880. security:
  2881. - ApiKeyAuth: []
  2882. summary: Delete group model config
  2883. tags:
  2884. - group
  2885. get:
  2886. description: Get group model config
  2887. parameters:
  2888. - description: Group name
  2889. in: path
  2890. name: group
  2891. required: true
  2892. type: string
  2893. - description: Model name
  2894. in: path
  2895. name: model
  2896. required: true
  2897. type: string
  2898. produces:
  2899. - application/json
  2900. responses:
  2901. "200":
  2902. description: OK
  2903. schema:
  2904. allOf:
  2905. - $ref: '#/definitions/middleware.APIResponse'
  2906. - properties:
  2907. data:
  2908. $ref: '#/definitions/model.GroupModelConfig'
  2909. type: object
  2910. security:
  2911. - ApiKeyAuth: []
  2912. summary: Get group model config
  2913. tags:
  2914. - group
  2915. post:
  2916. consumes:
  2917. - application/json
  2918. description: Save group model config
  2919. parameters:
  2920. - description: Group name
  2921. in: path
  2922. name: group
  2923. required: true
  2924. type: string
  2925. - description: Group model config information
  2926. in: body
  2927. name: data
  2928. required: true
  2929. schema:
  2930. $ref: '#/definitions/controller.SaveGroupModelConfigRequest'
  2931. produces:
  2932. - application/json
  2933. responses:
  2934. "200":
  2935. description: OK
  2936. schema:
  2937. $ref: '#/definitions/middleware.APIResponse'
  2938. security:
  2939. - ApiKeyAuth: []
  2940. summary: Save group model config
  2941. tags:
  2942. - group
  2943. put:
  2944. consumes:
  2945. - application/json
  2946. description: Update group model config
  2947. parameters:
  2948. - description: Group name
  2949. in: path
  2950. name: group
  2951. required: true
  2952. type: string
  2953. - description: Model name
  2954. in: path
  2955. name: model
  2956. required: true
  2957. type: string
  2958. - description: Group model config information
  2959. in: body
  2960. name: data
  2961. required: true
  2962. schema:
  2963. $ref: '#/definitions/controller.SaveGroupModelConfigRequest'
  2964. produces:
  2965. - application/json
  2966. responses:
  2967. "200":
  2968. description: OK
  2969. schema:
  2970. $ref: '#/definitions/middleware.APIResponse'
  2971. security:
  2972. - ApiKeyAuth: []
  2973. summary: Update group model config
  2974. tags:
  2975. - group
  2976. /api/group/{group}/model_configs/:
  2977. delete:
  2978. description: Delete group model configs
  2979. parameters:
  2980. - description: Group name
  2981. in: path
  2982. name: group
  2983. required: true
  2984. type: string
  2985. - description: Model names
  2986. in: body
  2987. name: models
  2988. required: true
  2989. schema:
  2990. items:
  2991. type: string
  2992. type: array
  2993. produces:
  2994. - application/json
  2995. responses:
  2996. "200":
  2997. description: OK
  2998. schema:
  2999. $ref: '#/definitions/middleware.APIResponse'
  3000. security:
  3001. - ApiKeyAuth: []
  3002. summary: Delete group model configs
  3003. tags:
  3004. - group
  3005. get:
  3006. description: Get group model configs
  3007. parameters:
  3008. - description: Group name
  3009. in: path
  3010. name: group
  3011. required: true
  3012. type: string
  3013. produces:
  3014. - application/json
  3015. responses:
  3016. "200":
  3017. description: OK
  3018. schema:
  3019. allOf:
  3020. - $ref: '#/definitions/middleware.APIResponse'
  3021. - properties:
  3022. data:
  3023. items:
  3024. $ref: '#/definitions/model.GroupModelConfig'
  3025. type: array
  3026. type: object
  3027. security:
  3028. - ApiKeyAuth: []
  3029. summary: Get group model configs
  3030. tags:
  3031. - group
  3032. post:
  3033. consumes:
  3034. - application/json
  3035. description: Save group model configs
  3036. parameters:
  3037. - description: Group name
  3038. in: path
  3039. name: group
  3040. required: true
  3041. type: string
  3042. - description: Group model config information
  3043. in: body
  3044. name: data
  3045. required: true
  3046. schema:
  3047. items:
  3048. $ref: '#/definitions/controller.SaveGroupModelConfigRequest'
  3049. type: array
  3050. produces:
  3051. - application/json
  3052. responses:
  3053. "200":
  3054. description: OK
  3055. schema:
  3056. $ref: '#/definitions/middleware.APIResponse'
  3057. security:
  3058. - ApiKeyAuth: []
  3059. summary: Save group model configs
  3060. tags:
  3061. - group
  3062. put:
  3063. consumes:
  3064. - application/json
  3065. description: Update group model configs
  3066. parameters:
  3067. - description: Group name
  3068. in: path
  3069. name: group
  3070. required: true
  3071. type: string
  3072. - description: Group model config information
  3073. in: body
  3074. name: data
  3075. required: true
  3076. schema:
  3077. items:
  3078. $ref: '#/definitions/controller.SaveGroupModelConfigRequest'
  3079. type: array
  3080. produces:
  3081. - application/json
  3082. responses:
  3083. "200":
  3084. description: OK
  3085. schema:
  3086. $ref: '#/definitions/middleware.APIResponse'
  3087. security:
  3088. - ApiKeyAuth: []
  3089. summary: Update group model configs
  3090. tags:
  3091. - group
  3092. /api/group/{group}/rpm_ratio:
  3093. post:
  3094. consumes:
  3095. - application/json
  3096. description: Updates the RPM (Requests Per Minute) ratio for a group
  3097. parameters:
  3098. - description: Group name
  3099. in: path
  3100. name: group
  3101. required: true
  3102. type: string
  3103. - description: RPM ratio information
  3104. in: body
  3105. name: data
  3106. required: true
  3107. schema:
  3108. $ref: '#/definitions/controller.UpdateGroupRPMRatioRequest'
  3109. produces:
  3110. - application/json
  3111. responses:
  3112. "200":
  3113. description: OK
  3114. schema:
  3115. $ref: '#/definitions/middleware.APIResponse'
  3116. security:
  3117. - ApiKeyAuth: []
  3118. summary: Update group RPM ratio
  3119. tags:
  3120. - group
  3121. /api/group/{group}/status:
  3122. post:
  3123. consumes:
  3124. - application/json
  3125. description: Updates the status of a group
  3126. parameters:
  3127. - description: Group name
  3128. in: path
  3129. name: group
  3130. required: true
  3131. type: string
  3132. - description: Status information
  3133. in: body
  3134. name: status
  3135. required: true
  3136. schema:
  3137. $ref: '#/definitions/controller.UpdateGroupStatusRequest'
  3138. produces:
  3139. - application/json
  3140. responses:
  3141. "200":
  3142. description: OK
  3143. schema:
  3144. $ref: '#/definitions/middleware.APIResponse'
  3145. security:
  3146. - ApiKeyAuth: []
  3147. summary: Update group status
  3148. tags:
  3149. - group
  3150. /api/group/{group}/tpm_ratio:
  3151. post:
  3152. consumes:
  3153. - application/json
  3154. description: Updates the TPM (Tokens Per Minute) ratio for a group
  3155. parameters:
  3156. - description: Group name
  3157. in: path
  3158. name: group
  3159. required: true
  3160. type: string
  3161. - description: TPM ratio information
  3162. in: body
  3163. name: data
  3164. required: true
  3165. schema:
  3166. $ref: '#/definitions/controller.UpdateGroupTPMRatioRequest'
  3167. produces:
  3168. - application/json
  3169. responses:
  3170. "200":
  3171. description: OK
  3172. schema:
  3173. $ref: '#/definitions/middleware.APIResponse'
  3174. security:
  3175. - ApiKeyAuth: []
  3176. summary: Update group TPM ratio
  3177. tags:
  3178. - group
  3179. /api/groups/:
  3180. get:
  3181. description: Returns a list of all groups with pagination
  3182. parameters:
  3183. - description: Page number
  3184. in: query
  3185. name: page
  3186. type: integer
  3187. - description: Items per page
  3188. in: query
  3189. name: per_page
  3190. type: integer
  3191. produces:
  3192. - application/json
  3193. responses:
  3194. "200":
  3195. description: OK
  3196. schema:
  3197. allOf:
  3198. - $ref: '#/definitions/middleware.APIResponse'
  3199. - properties:
  3200. data:
  3201. additionalProperties:
  3202. allOf:
  3203. - {}
  3204. - properties:
  3205. groups:
  3206. items:
  3207. $ref: '#/definitions/controller.GroupResponse'
  3208. type: array
  3209. total:
  3210. type: integer
  3211. type: object
  3212. type: object
  3213. type: object
  3214. security:
  3215. - ApiKeyAuth: []
  3216. summary: Get all groups
  3217. tags:
  3218. - groups
  3219. /api/groups/batch_delete:
  3220. post:
  3221. consumes:
  3222. - application/json
  3223. description: Deletes multiple groups by their IDs
  3224. parameters:
  3225. - description: Group IDs
  3226. in: body
  3227. name: ids
  3228. required: true
  3229. schema:
  3230. items:
  3231. type: string
  3232. type: array
  3233. produces:
  3234. - application/json
  3235. responses:
  3236. "200":
  3237. description: OK
  3238. schema:
  3239. $ref: '#/definitions/middleware.APIResponse'
  3240. security:
  3241. - ApiKeyAuth: []
  3242. summary: Delete multiple groups
  3243. tags:
  3244. - groups
  3245. /api/groups/batch_status:
  3246. post:
  3247. consumes:
  3248. - application/json
  3249. description: Updates the status of multiple groups
  3250. parameters:
  3251. - description: Group IDs and status
  3252. in: body
  3253. name: data
  3254. required: true
  3255. schema:
  3256. $ref: '#/definitions/controller.UpdateGroupsStatusRequest'
  3257. produces:
  3258. - application/json
  3259. responses:
  3260. "200":
  3261. description: OK
  3262. schema:
  3263. $ref: '#/definitions/middleware.APIResponse'
  3264. security:
  3265. - ApiKeyAuth: []
  3266. summary: Update multiple groups status
  3267. tags:
  3268. - groups
  3269. /api/groups/ip_groups:
  3270. get:
  3271. description: Get IP group list
  3272. parameters:
  3273. - description: Threshold
  3274. in: query
  3275. name: threshold
  3276. type: integer
  3277. - description: Start timestamp
  3278. in: query
  3279. name: start_timestamp
  3280. type: integer
  3281. - description: End timestamp
  3282. in: query
  3283. name: end_timestamp
  3284. type: integer
  3285. produces:
  3286. - application/json
  3287. responses:
  3288. "200":
  3289. description: OK
  3290. schema:
  3291. allOf:
  3292. - $ref: '#/definitions/middleware.APIResponse'
  3293. - properties:
  3294. data:
  3295. additionalProperties:
  3296. items:
  3297. type: string
  3298. type: array
  3299. type: object
  3300. type: object
  3301. security:
  3302. - ApiKeyAuth: []
  3303. summary: Get IP group list
  3304. tags:
  3305. - groups
  3306. /api/groups/search:
  3307. get:
  3308. description: Search groups with keyword and pagination
  3309. parameters:
  3310. - description: Search keyword
  3311. in: query
  3312. name: keyword
  3313. required: true
  3314. type: string
  3315. - description: Page number
  3316. in: query
  3317. name: page
  3318. type: integer
  3319. - description: Items per page
  3320. in: query
  3321. name: per_page
  3322. type: integer
  3323. - description: Status
  3324. in: query
  3325. name: status
  3326. type: integer
  3327. - description: Order
  3328. in: query
  3329. name: order
  3330. type: string
  3331. produces:
  3332. - application/json
  3333. responses:
  3334. "200":
  3335. description: OK
  3336. schema:
  3337. allOf:
  3338. - $ref: '#/definitions/middleware.APIResponse'
  3339. - properties:
  3340. data:
  3341. additionalProperties:
  3342. allOf:
  3343. - {}
  3344. - properties:
  3345. groups:
  3346. items:
  3347. $ref: '#/definitions/controller.GroupResponse'
  3348. type: array
  3349. total:
  3350. type: integer
  3351. type: object
  3352. type: object
  3353. type: object
  3354. security:
  3355. - ApiKeyAuth: []
  3356. summary: Search groups
  3357. tags:
  3358. - groups
  3359. /api/log/{group}:
  3360. get:
  3361. description: Get logs for a specific group
  3362. parameters:
  3363. - description: Group name
  3364. in: path
  3365. name: group
  3366. required: true
  3367. type: string
  3368. - description: Page number
  3369. in: query
  3370. name: page
  3371. type: integer
  3372. - description: Items per page
  3373. in: query
  3374. name: per_page
  3375. type: integer
  3376. - description: Start timestamp (milliseconds)
  3377. in: query
  3378. name: start_timestamp
  3379. type: integer
  3380. - description: End timestamp (milliseconds)
  3381. in: query
  3382. name: end_timestamp
  3383. type: integer
  3384. - description: Token name
  3385. in: query
  3386. name: token_name
  3387. type: string
  3388. - description: Model name
  3389. in: query
  3390. name: model_name
  3391. type: string
  3392. - description: Channel ID
  3393. in: query
  3394. name: channel
  3395. type: integer
  3396. - description: Token ID
  3397. in: query
  3398. name: token_id
  3399. type: integer
  3400. - description: Order
  3401. in: query
  3402. name: order
  3403. type: string
  3404. - description: Request ID
  3405. in: query
  3406. name: request_id
  3407. type: string
  3408. - description: Status code type
  3409. in: query
  3410. name: code_type
  3411. type: string
  3412. - description: Status code
  3413. in: query
  3414. name: code
  3415. type: integer
  3416. - description: With body
  3417. in: query
  3418. name: with_body
  3419. type: boolean
  3420. - description: IP
  3421. in: query
  3422. name: ip
  3423. type: string
  3424. - description: User
  3425. in: query
  3426. name: user
  3427. type: string
  3428. produces:
  3429. - application/json
  3430. responses:
  3431. "200":
  3432. description: OK
  3433. schema:
  3434. allOf:
  3435. - $ref: '#/definitions/middleware.APIResponse'
  3436. - properties:
  3437. data:
  3438. $ref: '#/definitions/model.GetGroupLogsResult'
  3439. type: object
  3440. security:
  3441. - ApiKeyAuth: []
  3442. summary: Get group logs
  3443. tags:
  3444. - log
  3445. /api/log/{group}/detail/{log_id}:
  3446. get:
  3447. description: Get detailed information about a specific log entry in a group
  3448. parameters:
  3449. - description: Group name
  3450. in: path
  3451. name: group
  3452. required: true
  3453. type: string
  3454. - description: Log ID
  3455. in: path
  3456. name: log_id
  3457. required: true
  3458. type: string
  3459. produces:
  3460. - application/json
  3461. responses:
  3462. "200":
  3463. description: OK
  3464. schema:
  3465. allOf:
  3466. - $ref: '#/definitions/middleware.APIResponse'
  3467. - properties:
  3468. data:
  3469. $ref: '#/definitions/model.RequestDetail'
  3470. type: object
  3471. security:
  3472. - ApiKeyAuth: []
  3473. summary: Get group log detail
  3474. tags:
  3475. - log
  3476. /api/log/{group}/search:
  3477. get:
  3478. description: Search logs for a specific group with filters
  3479. parameters:
  3480. - description: Group name
  3481. in: path
  3482. name: group
  3483. required: true
  3484. type: string
  3485. - description: Keyword
  3486. in: query
  3487. name: keyword
  3488. type: string
  3489. - description: Page number
  3490. in: query
  3491. name: page
  3492. type: integer
  3493. - description: Items per page
  3494. in: query
  3495. name: per_page
  3496. type: integer
  3497. - description: Start timestamp (milliseconds)
  3498. in: query
  3499. name: start_timestamp
  3500. type: integer
  3501. - description: End timestamp (milliseconds)
  3502. in: query
  3503. name: end_timestamp
  3504. type: integer
  3505. - description: Filter by token name
  3506. in: query
  3507. name: token_name
  3508. type: string
  3509. - description: Filter by model name
  3510. in: query
  3511. name: model_name
  3512. type: string
  3513. - description: Filter by token id
  3514. in: query
  3515. name: token_id
  3516. type: integer
  3517. - description: Order
  3518. in: query
  3519. name: order
  3520. type: string
  3521. - description: Request ID
  3522. in: query
  3523. name: request_id
  3524. type: string
  3525. - description: Status code type
  3526. in: query
  3527. name: code_type
  3528. type: string
  3529. - description: Status code
  3530. in: query
  3531. name: code
  3532. type: integer
  3533. - description: With body
  3534. in: query
  3535. name: with_body
  3536. type: boolean
  3537. - description: IP
  3538. in: query
  3539. name: ip
  3540. type: string
  3541. - description: User
  3542. in: query
  3543. name: user
  3544. type: string
  3545. produces:
  3546. - application/json
  3547. responses:
  3548. "200":
  3549. description: OK
  3550. schema:
  3551. allOf:
  3552. - $ref: '#/definitions/middleware.APIResponse'
  3553. - properties:
  3554. data:
  3555. $ref: '#/definitions/model.GetGroupLogsResult'
  3556. type: object
  3557. security:
  3558. - ApiKeyAuth: []
  3559. summary: Search group logs
  3560. tags:
  3561. - log
  3562. /api/logs/:
  3563. delete:
  3564. description: Deletes logs older than the specified retention period
  3565. parameters:
  3566. - description: Timestamp (milliseconds)
  3567. in: query
  3568. name: timestamp
  3569. required: true
  3570. type: integer
  3571. produces:
  3572. - application/json
  3573. responses:
  3574. "200":
  3575. description: OK
  3576. schema:
  3577. allOf:
  3578. - $ref: '#/definitions/middleware.APIResponse'
  3579. - properties:
  3580. data:
  3581. type: integer
  3582. type: object
  3583. security:
  3584. - ApiKeyAuth: []
  3585. summary: Delete historical logs
  3586. tags:
  3587. - logs
  3588. get:
  3589. description: Returns a paginated list of all logs with optional filters
  3590. parameters:
  3591. - description: Page number
  3592. in: query
  3593. name: page
  3594. type: integer
  3595. - description: Items per page
  3596. in: query
  3597. name: per_page
  3598. type: integer
  3599. - description: Start timestamp (milliseconds)
  3600. in: query
  3601. name: start_timestamp
  3602. type: integer
  3603. - description: End timestamp (milliseconds)
  3604. in: query
  3605. name: end_timestamp
  3606. type: integer
  3607. - description: Model name
  3608. in: query
  3609. name: model_name
  3610. type: string
  3611. - description: Channel ID
  3612. in: query
  3613. name: channel
  3614. type: integer
  3615. - description: Order
  3616. in: query
  3617. name: order
  3618. type: string
  3619. - description: Request ID
  3620. in: query
  3621. name: request_id
  3622. type: string
  3623. - description: Status code type
  3624. in: query
  3625. name: code_type
  3626. type: string
  3627. - description: Status code
  3628. in: query
  3629. name: code
  3630. type: integer
  3631. - description: With body
  3632. in: query
  3633. name: with_body
  3634. type: boolean
  3635. - description: IP
  3636. in: query
  3637. name: ip
  3638. type: string
  3639. - description: User
  3640. in: query
  3641. name: user
  3642. type: string
  3643. produces:
  3644. - application/json
  3645. responses:
  3646. "200":
  3647. description: OK
  3648. schema:
  3649. allOf:
  3650. - $ref: '#/definitions/middleware.APIResponse'
  3651. - properties:
  3652. data:
  3653. $ref: '#/definitions/model.GetLogsResult'
  3654. type: object
  3655. security:
  3656. - ApiKeyAuth: []
  3657. summary: Get all logs
  3658. tags:
  3659. - logs
  3660. /api/logs/consume_error:
  3661. get:
  3662. description: Search for logs with consumption errors
  3663. parameters:
  3664. - description: Page number
  3665. in: query
  3666. name: page
  3667. type: integer
  3668. - description: Items per page
  3669. in: query
  3670. name: per_page
  3671. type: integer
  3672. - description: Start timestamp (milliseconds)
  3673. in: query
  3674. name: start_timestamp
  3675. type: integer
  3676. - description: End timestamp (milliseconds)
  3677. in: query
  3678. name: end_timestamp
  3679. type: integer
  3680. - description: Keyword
  3681. in: query
  3682. name: keyword
  3683. type: string
  3684. - description: Group
  3685. in: query
  3686. name: group
  3687. type: string
  3688. - description: Token name
  3689. in: query
  3690. name: token_name
  3691. type: string
  3692. - description: Model name
  3693. in: query
  3694. name: model_name
  3695. type: string
  3696. - description: Content
  3697. in: query
  3698. name: content
  3699. type: string
  3700. - description: Token ID
  3701. in: query
  3702. name: token_id
  3703. type: integer
  3704. - description: Order
  3705. in: query
  3706. name: order
  3707. type: string
  3708. - description: Request ID
  3709. in: query
  3710. name: request_id
  3711. type: string
  3712. produces:
  3713. - application/json
  3714. responses:
  3715. "200":
  3716. description: OK
  3717. schema:
  3718. allOf:
  3719. - $ref: '#/definitions/middleware.APIResponse'
  3720. - properties:
  3721. data:
  3722. additionalProperties:
  3723. allOf:
  3724. - {}
  3725. - properties:
  3726. logs:
  3727. items:
  3728. $ref: '#/definitions/model.RequestDetail'
  3729. type: array
  3730. total:
  3731. type: integer
  3732. type: object
  3733. type: object
  3734. type: object
  3735. security:
  3736. - ApiKeyAuth: []
  3737. summary: Search consumption errors
  3738. tags:
  3739. - logs
  3740. /api/logs/detail/{log_id}:
  3741. get:
  3742. description: Get detailed information about a specific log entry
  3743. parameters:
  3744. - description: Log ID
  3745. in: path
  3746. name: log_id
  3747. required: true
  3748. type: string
  3749. produces:
  3750. - application/json
  3751. responses:
  3752. "200":
  3753. description: OK
  3754. schema:
  3755. allOf:
  3756. - $ref: '#/definitions/middleware.APIResponse'
  3757. - properties:
  3758. data:
  3759. $ref: '#/definitions/model.RequestDetail'
  3760. type: object
  3761. security:
  3762. - ApiKeyAuth: []
  3763. summary: Get log detail
  3764. tags:
  3765. - logs
  3766. /api/logs/search:
  3767. get:
  3768. description: Search logs with various filters
  3769. parameters:
  3770. - description: Keyword
  3771. in: query
  3772. name: keyword
  3773. type: string
  3774. - description: Page number
  3775. in: query
  3776. name: page
  3777. type: integer
  3778. - description: Items per page
  3779. in: query
  3780. name: per_page
  3781. type: integer
  3782. - description: Start timestamp (milliseconds)
  3783. in: query
  3784. name: start_timestamp
  3785. type: integer
  3786. - description: End timestamp (milliseconds)
  3787. in: query
  3788. name: end_timestamp
  3789. type: integer
  3790. - description: Filter by model name
  3791. in: query
  3792. name: model_name
  3793. type: string
  3794. - description: Filter by channel
  3795. in: query
  3796. name: channel
  3797. type: integer
  3798. - description: Filter by token id
  3799. in: query
  3800. name: token_id
  3801. type: integer
  3802. - description: Order
  3803. in: query
  3804. name: order
  3805. type: string
  3806. - description: Request ID
  3807. in: query
  3808. name: request_id
  3809. type: string
  3810. - description: Status code type
  3811. in: query
  3812. name: code_type
  3813. type: string
  3814. - description: Status code
  3815. in: query
  3816. name: code
  3817. type: integer
  3818. - description: With body
  3819. in: query
  3820. name: with_body
  3821. type: boolean
  3822. - description: IP
  3823. in: query
  3824. name: ip
  3825. type: string
  3826. - description: User
  3827. in: query
  3828. name: user
  3829. type: string
  3830. produces:
  3831. - application/json
  3832. responses:
  3833. "200":
  3834. description: OK
  3835. schema:
  3836. allOf:
  3837. - $ref: '#/definitions/middleware.APIResponse'
  3838. - properties:
  3839. data:
  3840. $ref: '#/definitions/model.GetLogsResult'
  3841. type: object
  3842. security:
  3843. - ApiKeyAuth: []
  3844. summary: Search logs
  3845. tags:
  3846. - logs
  3847. /api/mcp/group/{group}:
  3848. get:
  3849. description: Get a list of Group MCPs with pagination and filtering
  3850. parameters:
  3851. - description: Group ID
  3852. in: path
  3853. name: group
  3854. required: true
  3855. type: string
  3856. - description: Page number
  3857. in: query
  3858. name: page
  3859. type: integer
  3860. - description: Items per page
  3861. in: query
  3862. name: per_page
  3863. type: integer
  3864. - description: MCP type
  3865. in: query
  3866. name: type
  3867. type: string
  3868. - description: Search keyword
  3869. in: query
  3870. name: keyword
  3871. type: string
  3872. - description: MCP status
  3873. in: query
  3874. name: status
  3875. type: integer
  3876. produces:
  3877. - application/json
  3878. responses:
  3879. "200":
  3880. description: OK
  3881. schema:
  3882. allOf:
  3883. - $ref: '#/definitions/middleware.APIResponse'
  3884. - properties:
  3885. data:
  3886. items:
  3887. $ref: '#/definitions/controller.GroupMCPResponse'
  3888. type: array
  3889. type: object
  3890. security:
  3891. - ApiKeyAuth: []
  3892. summary: Get Group MCPs
  3893. tags:
  3894. - mcp
  3895. post:
  3896. consumes:
  3897. - application/json
  3898. description: Create a new Group MCP
  3899. parameters:
  3900. - description: Group ID
  3901. in: path
  3902. name: group
  3903. required: true
  3904. type: string
  3905. - description: Group MCP object
  3906. in: body
  3907. name: mcp
  3908. required: true
  3909. schema:
  3910. $ref: '#/definitions/model.GroupMCP'
  3911. produces:
  3912. - application/json
  3913. responses:
  3914. "200":
  3915. description: OK
  3916. schema:
  3917. allOf:
  3918. - $ref: '#/definitions/middleware.APIResponse'
  3919. - properties:
  3920. data:
  3921. $ref: '#/definitions/controller.GroupMCPResponse'
  3922. type: object
  3923. security:
  3924. - ApiKeyAuth: []
  3925. summary: Create Group MCP
  3926. tags:
  3927. - mcp
  3928. /api/mcp/group/{group}/{id}:
  3929. delete:
  3930. description: Delete a Group MCP by ID and Group ID
  3931. parameters:
  3932. - description: MCP ID
  3933. in: path
  3934. name: id
  3935. required: true
  3936. type: string
  3937. - description: Group ID
  3938. in: path
  3939. name: group
  3940. required: true
  3941. type: string
  3942. produces:
  3943. - application/json
  3944. responses:
  3945. "200":
  3946. description: OK
  3947. schema:
  3948. $ref: '#/definitions/middleware.APIResponse'
  3949. security:
  3950. - ApiKeyAuth: []
  3951. summary: Delete Group MCP
  3952. tags:
  3953. - mcp
  3954. get:
  3955. description: Get a specific Group MCP by its ID and Group ID
  3956. parameters:
  3957. - description: MCP ID
  3958. in: path
  3959. name: id
  3960. required: true
  3961. type: string
  3962. - description: Group ID
  3963. in: path
  3964. name: group
  3965. required: true
  3966. type: string
  3967. produces:
  3968. - application/json
  3969. responses:
  3970. "200":
  3971. description: OK
  3972. schema:
  3973. allOf:
  3974. - $ref: '#/definitions/middleware.APIResponse'
  3975. - properties:
  3976. data:
  3977. $ref: '#/definitions/controller.GroupMCPResponse'
  3978. type: object
  3979. security:
  3980. - ApiKeyAuth: []
  3981. summary: Get Group MCP by ID
  3982. tags:
  3983. - mcp
  3984. put:
  3985. consumes:
  3986. - application/json
  3987. description: Update an existing Group MCP
  3988. parameters:
  3989. - description: MCP ID
  3990. in: path
  3991. name: id
  3992. required: true
  3993. type: string
  3994. - description: Group ID
  3995. in: path
  3996. name: group
  3997. required: true
  3998. type: string
  3999. - description: Group MCP object
  4000. in: body
  4001. name: mcp
  4002. required: true
  4003. schema:
  4004. $ref: '#/definitions/model.GroupMCP'
  4005. produces:
  4006. - application/json
  4007. responses:
  4008. "200":
  4009. description: OK
  4010. schema:
  4011. allOf:
  4012. - $ref: '#/definitions/middleware.APIResponse'
  4013. - properties:
  4014. data:
  4015. $ref: '#/definitions/controller.GroupMCPResponse'
  4016. type: object
  4017. security:
  4018. - ApiKeyAuth: []
  4019. summary: Update Group MCP
  4020. tags:
  4021. - mcp
  4022. /api/mcp/group/{group}/{id}/status:
  4023. post:
  4024. consumes:
  4025. - application/json
  4026. description: Update the status of a Group MCP
  4027. parameters:
  4028. - description: MCP ID
  4029. in: path
  4030. name: id
  4031. required: true
  4032. type: string
  4033. - description: Group ID
  4034. in: path
  4035. name: group
  4036. required: true
  4037. type: string
  4038. - description: MCP status
  4039. in: body
  4040. name: status
  4041. required: true
  4042. schema:
  4043. $ref: '#/definitions/controller.UpdateGroupMCPStatusRequest'
  4044. produces:
  4045. - application/json
  4046. responses:
  4047. "200":
  4048. description: OK
  4049. schema:
  4050. $ref: '#/definitions/middleware.APIResponse'
  4051. security:
  4052. - ApiKeyAuth: []
  4053. summary: Update Group MCP status
  4054. tags:
  4055. - mcp
  4056. /api/mcp/group/all:
  4057. get:
  4058. description: Get all Group MCPs with filtering
  4059. parameters:
  4060. - description: MCP status
  4061. in: query
  4062. name: status
  4063. type: integer
  4064. produces:
  4065. - application/json
  4066. responses:
  4067. "200":
  4068. description: OK
  4069. schema:
  4070. allOf:
  4071. - $ref: '#/definitions/middleware.APIResponse'
  4072. - properties:
  4073. data:
  4074. items:
  4075. $ref: '#/definitions/controller.GroupMCPResponse'
  4076. type: array
  4077. type: object
  4078. security:
  4079. - ApiKeyAuth: []
  4080. summary: Get all Group MCPs
  4081. tags:
  4082. - mcp
  4083. /api/mcp/public/:
  4084. get:
  4085. description: Get a list of MCPs with pagination and filtering
  4086. parameters:
  4087. - description: Page number
  4088. in: query
  4089. name: page
  4090. type: integer
  4091. - description: Items per page
  4092. in: query
  4093. name: per_page
  4094. type: integer
  4095. - description: MCP type
  4096. in: query
  4097. name: type
  4098. type: string
  4099. - description: Search keyword
  4100. in: query
  4101. name: keyword
  4102. type: string
  4103. - description: MCP status
  4104. in: query
  4105. name: status
  4106. type: integer
  4107. produces:
  4108. - application/json
  4109. responses:
  4110. "200":
  4111. description: OK
  4112. schema:
  4113. allOf:
  4114. - $ref: '#/definitions/middleware.APIResponse'
  4115. - properties:
  4116. data:
  4117. items:
  4118. $ref: '#/definitions/controller.PublicMCPResponse'
  4119. type: array
  4120. type: object
  4121. security:
  4122. - ApiKeyAuth: []
  4123. summary: Get MCPs
  4124. tags:
  4125. - mcp
  4126. post:
  4127. consumes:
  4128. - application/json
  4129. description: Create a new MCP
  4130. parameters:
  4131. - description: MCP object
  4132. in: body
  4133. name: mcp
  4134. required: true
  4135. schema:
  4136. $ref: '#/definitions/model.PublicMCP'
  4137. produces:
  4138. - application/json
  4139. responses:
  4140. "200":
  4141. description: OK
  4142. schema:
  4143. allOf:
  4144. - $ref: '#/definitions/middleware.APIResponse'
  4145. - properties:
  4146. data:
  4147. $ref: '#/definitions/controller.PublicMCPResponse'
  4148. type: object
  4149. security:
  4150. - ApiKeyAuth: []
  4151. summary: Create MCP
  4152. tags:
  4153. - mcp
  4154. /api/mcp/public/{id}:
  4155. delete:
  4156. description: Delete an MCP by ID
  4157. parameters:
  4158. - description: MCP ID
  4159. in: path
  4160. name: id
  4161. required: true
  4162. type: string
  4163. produces:
  4164. - application/json
  4165. responses:
  4166. "200":
  4167. description: OK
  4168. schema:
  4169. $ref: '#/definitions/middleware.APIResponse'
  4170. security:
  4171. - ApiKeyAuth: []
  4172. summary: Delete MCP
  4173. tags:
  4174. - mcp
  4175. get:
  4176. description: Get a specific MCP by its ID
  4177. parameters:
  4178. - description: MCP ID
  4179. in: path
  4180. name: id
  4181. required: true
  4182. type: string
  4183. produces:
  4184. - application/json
  4185. responses:
  4186. "200":
  4187. description: OK
  4188. schema:
  4189. allOf:
  4190. - $ref: '#/definitions/middleware.APIResponse'
  4191. - properties:
  4192. data:
  4193. $ref: '#/definitions/controller.PublicMCPResponse'
  4194. type: object
  4195. security:
  4196. - ApiKeyAuth: []
  4197. summary: Get MCP by ID
  4198. tags:
  4199. - mcp
  4200. put:
  4201. consumes:
  4202. - application/json
  4203. description: Update an existing MCP
  4204. parameters:
  4205. - description: MCP ID
  4206. in: path
  4207. name: id
  4208. required: true
  4209. type: string
  4210. - description: MCP object
  4211. in: body
  4212. name: mcp
  4213. required: true
  4214. schema:
  4215. $ref: '#/definitions/model.PublicMCP'
  4216. produces:
  4217. - application/json
  4218. responses:
  4219. "200":
  4220. description: OK
  4221. schema:
  4222. allOf:
  4223. - $ref: '#/definitions/middleware.APIResponse'
  4224. - properties:
  4225. data:
  4226. $ref: '#/definitions/controller.PublicMCPResponse'
  4227. type: object
  4228. security:
  4229. - ApiKeyAuth: []
  4230. summary: Update MCP
  4231. tags:
  4232. - mcp
  4233. /api/mcp/public/{id}/group/{group}/params:
  4234. get:
  4235. description: Get reusing parameters for a specific group and MCP
  4236. parameters:
  4237. - description: MCP ID
  4238. in: path
  4239. name: id
  4240. required: true
  4241. type: string
  4242. - description: Group ID
  4243. in: path
  4244. name: group
  4245. required: true
  4246. type: string
  4247. produces:
  4248. - application/json
  4249. responses:
  4250. "200":
  4251. description: OK
  4252. schema:
  4253. allOf:
  4254. - $ref: '#/definitions/middleware.APIResponse'
  4255. - properties:
  4256. data:
  4257. $ref: '#/definitions/model.PublicMCPReusingParam'
  4258. type: object
  4259. security:
  4260. - ApiKeyAuth: []
  4261. summary: Get group MCP reusing parameters
  4262. tags:
  4263. - mcp
  4264. post:
  4265. consumes:
  4266. - application/json
  4267. description: Create or update reusing parameters for a specific group and MCP
  4268. parameters:
  4269. - description: MCP ID
  4270. in: path
  4271. name: id
  4272. required: true
  4273. type: string
  4274. - description: Group ID
  4275. in: path
  4276. name: group
  4277. required: true
  4278. type: string
  4279. - description: Reusing parameters
  4280. in: body
  4281. name: params
  4282. required: true
  4283. schema:
  4284. $ref: '#/definitions/model.PublicMCPReusingParam'
  4285. produces:
  4286. - application/json
  4287. responses:
  4288. "200":
  4289. description: OK
  4290. schema:
  4291. $ref: '#/definitions/middleware.APIResponse'
  4292. security:
  4293. - ApiKeyAuth: []
  4294. summary: Create or update group MCP reusing parameters
  4295. tags:
  4296. - mcp
  4297. /api/mcp/public/{id}/status:
  4298. post:
  4299. consumes:
  4300. - application/json
  4301. description: Update the status of an MCP
  4302. parameters:
  4303. - description: MCP ID
  4304. in: path
  4305. name: id
  4306. required: true
  4307. type: string
  4308. - description: MCP status
  4309. in: body
  4310. name: status
  4311. required: true
  4312. schema:
  4313. $ref: '#/definitions/controller.UpdatePublicMCPStatusRequest'
  4314. produces:
  4315. - application/json
  4316. responses:
  4317. "200":
  4318. description: OK
  4319. schema:
  4320. $ref: '#/definitions/middleware.APIResponse'
  4321. security:
  4322. - ApiKeyAuth: []
  4323. summary: Update MCP status
  4324. tags:
  4325. - mcp
  4326. /api/mcp/public/all:
  4327. get:
  4328. description: Get all MCPs with filtering
  4329. parameters:
  4330. - description: MCP status
  4331. in: query
  4332. name: status
  4333. type: integer
  4334. produces:
  4335. - application/json
  4336. responses:
  4337. "200":
  4338. description: OK
  4339. schema:
  4340. allOf:
  4341. - $ref: '#/definitions/middleware.APIResponse'
  4342. - properties:
  4343. data:
  4344. items:
  4345. $ref: '#/definitions/controller.PublicMCPResponse'
  4346. type: array
  4347. type: object
  4348. security:
  4349. - ApiKeyAuth: []
  4350. summary: Get all MCPs
  4351. tags:
  4352. - mcp
  4353. /api/model_config/:
  4354. post:
  4355. description: Saves a model config
  4356. parameters:
  4357. - description: Model config
  4358. in: body
  4359. name: config
  4360. required: true
  4361. schema:
  4362. $ref: '#/definitions/controller.SaveModelConfigsRequest'
  4363. produces:
  4364. - application/json
  4365. responses:
  4366. "200":
  4367. description: OK
  4368. schema:
  4369. $ref: '#/definitions/middleware.APIResponse'
  4370. security:
  4371. - ApiKeyAuth: []
  4372. summary: Save model config
  4373. tags:
  4374. - modelconfig
  4375. /api/model_config/{model}:
  4376. delete:
  4377. description: Deletes a model config
  4378. parameters:
  4379. - description: Model name
  4380. in: path
  4381. name: model
  4382. required: true
  4383. type: string
  4384. produces:
  4385. - application/json
  4386. responses:
  4387. "200":
  4388. description: OK
  4389. schema:
  4390. $ref: '#/definitions/middleware.APIResponse'
  4391. security:
  4392. - ApiKeyAuth: []
  4393. summary: Delete model config
  4394. tags:
  4395. - modelconfig
  4396. get:
  4397. description: Returns a model config
  4398. parameters:
  4399. - description: Model name
  4400. in: path
  4401. name: model
  4402. required: true
  4403. type: string
  4404. produces:
  4405. - application/json
  4406. responses:
  4407. "200":
  4408. description: OK
  4409. schema:
  4410. allOf:
  4411. - $ref: '#/definitions/middleware.APIResponse'
  4412. - properties:
  4413. data:
  4414. $ref: '#/definitions/model.ModelConfig'
  4415. type: object
  4416. security:
  4417. - ApiKeyAuth: []
  4418. summary: Get model config
  4419. tags:
  4420. - modelconfig
  4421. /api/model_configs/:
  4422. get:
  4423. description: Returns a list of model configs with pagination
  4424. parameters:
  4425. - description: Model name
  4426. in: query
  4427. name: model
  4428. type: string
  4429. produces:
  4430. - application/json
  4431. responses:
  4432. "200":
  4433. description: OK
  4434. schema:
  4435. allOf:
  4436. - $ref: '#/definitions/middleware.APIResponse'
  4437. - properties:
  4438. data:
  4439. additionalProperties:
  4440. allOf:
  4441. - {}
  4442. - properties:
  4443. configs:
  4444. items:
  4445. $ref: '#/definitions/model.ModelConfig'
  4446. type: array
  4447. total:
  4448. type: integer
  4449. type: object
  4450. type: object
  4451. type: object
  4452. security:
  4453. - ApiKeyAuth: []
  4454. summary: Get model configs
  4455. tags:
  4456. - modelconfig
  4457. post:
  4458. description: Saves a list of model configs
  4459. parameters:
  4460. - description: Model configs
  4461. in: body
  4462. name: configs
  4463. required: true
  4464. schema:
  4465. items:
  4466. $ref: '#/definitions/controller.SaveModelConfigsRequest'
  4467. type: array
  4468. produces:
  4469. - application/json
  4470. responses:
  4471. "200":
  4472. description: OK
  4473. schema:
  4474. $ref: '#/definitions/middleware.APIResponse'
  4475. security:
  4476. - ApiKeyAuth: []
  4477. summary: Save model configs
  4478. tags:
  4479. - modelconfig
  4480. /api/model_configs/all:
  4481. get:
  4482. description: Returns a list of all model configs
  4483. produces:
  4484. - application/json
  4485. responses:
  4486. "200":
  4487. description: OK
  4488. schema:
  4489. allOf:
  4490. - $ref: '#/definitions/middleware.APIResponse'
  4491. - properties:
  4492. data:
  4493. items:
  4494. $ref: '#/definitions/model.ModelConfig'
  4495. type: array
  4496. type: object
  4497. security:
  4498. - ApiKeyAuth: []
  4499. summary: Get all model configs
  4500. tags:
  4501. - modelconfig
  4502. /api/model_configs/batch_delete:
  4503. post:
  4504. description: Deletes a list of model configs
  4505. parameters:
  4506. - description: Model names
  4507. in: body
  4508. name: models
  4509. required: true
  4510. schema:
  4511. items:
  4512. type: string
  4513. type: array
  4514. produces:
  4515. - application/json
  4516. responses:
  4517. "200":
  4518. description: OK
  4519. schema:
  4520. $ref: '#/definitions/middleware.APIResponse'
  4521. security:
  4522. - ApiKeyAuth: []
  4523. summary: Delete model configs
  4524. tags:
  4525. - modelconfig
  4526. /api/model_configs/contains:
  4527. post:
  4528. description: Returns a list of model configs by models contains
  4529. parameters:
  4530. - description: Models
  4531. in: body
  4532. name: models
  4533. required: true
  4534. schema:
  4535. $ref: '#/definitions/controller.GetModelConfigsByModelsContainsRequest'
  4536. produces:
  4537. - application/json
  4538. responses:
  4539. "200":
  4540. description: OK
  4541. schema:
  4542. allOf:
  4543. - $ref: '#/definitions/middleware.APIResponse'
  4544. - properties:
  4545. data:
  4546. items:
  4547. $ref: '#/definitions/model.ModelConfig'
  4548. type: array
  4549. type: object
  4550. security:
  4551. - ApiKeyAuth: []
  4552. summary: Get model configs by models contains
  4553. tags:
  4554. - modelconfig
  4555. /api/model_configs/search:
  4556. get:
  4557. description: Returns a list of model configs by keyword
  4558. parameters:
  4559. - description: Keyword
  4560. in: query
  4561. name: keyword
  4562. type: string
  4563. - description: Model name
  4564. in: query
  4565. name: model
  4566. type: string
  4567. - description: Owner
  4568. in: query
  4569. name: owner
  4570. type: string
  4571. - description: Page
  4572. in: query
  4573. name: page
  4574. type: integer
  4575. - description: Per page
  4576. in: query
  4577. name: per_page
  4578. type: integer
  4579. produces:
  4580. - application/json
  4581. responses:
  4582. "200":
  4583. description: OK
  4584. schema:
  4585. allOf:
  4586. - $ref: '#/definitions/middleware.APIResponse'
  4587. - properties:
  4588. data:
  4589. additionalProperties:
  4590. allOf:
  4591. - {}
  4592. - properties:
  4593. configs:
  4594. items:
  4595. $ref: '#/definitions/model.ModelConfig'
  4596. type: array
  4597. total:
  4598. type: integer
  4599. type: object
  4600. type: object
  4601. type: object
  4602. security:
  4603. - ApiKeyAuth: []
  4604. summary: Search model configs
  4605. tags:
  4606. - modelconfig
  4607. /api/models/builtin:
  4608. get:
  4609. description: Returns a list of builtin models
  4610. produces:
  4611. - application/json
  4612. responses:
  4613. "200":
  4614. description: OK
  4615. schema:
  4616. allOf:
  4617. - $ref: '#/definitions/middleware.APIResponse'
  4618. - properties:
  4619. data:
  4620. items:
  4621. $ref: '#/definitions/controller.BuiltinModelConfig'
  4622. type: array
  4623. type: object
  4624. security:
  4625. - ApiKeyAuth: []
  4626. summary: Get builtin models
  4627. tags:
  4628. - model
  4629. /api/models/builtin/channel:
  4630. get:
  4631. description: Returns a list of channel builtin models
  4632. produces:
  4633. - application/json
  4634. responses:
  4635. "200":
  4636. description: OK
  4637. schema:
  4638. allOf:
  4639. - $ref: '#/definitions/middleware.APIResponse'
  4640. - properties:
  4641. data:
  4642. additionalProperties:
  4643. items:
  4644. $ref: '#/definitions/controller.BuiltinModelConfig'
  4645. type: array
  4646. type: object
  4647. type: object
  4648. security:
  4649. - ApiKeyAuth: []
  4650. summary: Get channel builtin models
  4651. tags:
  4652. - model
  4653. /api/models/builtin/channel/{type}:
  4654. get:
  4655. description: Returns a list of channel builtin models by type
  4656. parameters:
  4657. - description: Channel type
  4658. enum:
  4659. - 1
  4660. - 3
  4661. - 4
  4662. - 12
  4663. - 13
  4664. - 14
  4665. - 15
  4666. - 16
  4667. - 17
  4668. - 18
  4669. - 19
  4670. - 20
  4671. - 23
  4672. - 24
  4673. - 25
  4674. - 26
  4675. - 27
  4676. - 28
  4677. - 29
  4678. - 30
  4679. - 31
  4680. - 32
  4681. - 33
  4682. - 34
  4683. - 35
  4684. - 36
  4685. - 37
  4686. - 40
  4687. - 41
  4688. - 42
  4689. - 43
  4690. - 44
  4691. - 45
  4692. - 46
  4693. - 47
  4694. - 48
  4695. in: path
  4696. name: type
  4697. required: true
  4698. type: integer
  4699. produces:
  4700. - application/json
  4701. responses:
  4702. "200":
  4703. description: OK
  4704. schema:
  4705. allOf:
  4706. - $ref: '#/definitions/middleware.APIResponse'
  4707. - properties:
  4708. data:
  4709. items:
  4710. $ref: '#/definitions/controller.BuiltinModelConfig'
  4711. type: array
  4712. type: object
  4713. security:
  4714. - ApiKeyAuth: []
  4715. summary: Get channel builtin models by type
  4716. tags:
  4717. - model
  4718. /api/models/default:
  4719. get:
  4720. description: Returns a list of channel default models and mapping
  4721. produces:
  4722. - application/json
  4723. responses:
  4724. "200":
  4725. description: OK
  4726. schema:
  4727. allOf:
  4728. - $ref: '#/definitions/middleware.APIResponse'
  4729. - properties:
  4730. data:
  4731. additionalProperties:
  4732. allOf:
  4733. - {}
  4734. - properties:
  4735. mapping:
  4736. additionalProperties:
  4737. type: string
  4738. type: object
  4739. models:
  4740. items:
  4741. type: string
  4742. type: array
  4743. type: object
  4744. type: object
  4745. type: object
  4746. security:
  4747. - ApiKeyAuth: []
  4748. summary: Get channel default models and mapping
  4749. tags:
  4750. - model
  4751. /api/models/default/{type}:
  4752. get:
  4753. description: Returns a list of channel default models and mapping by type
  4754. parameters:
  4755. - description: Channel type
  4756. in: path
  4757. name: type
  4758. required: true
  4759. type: string
  4760. produces:
  4761. - application/json
  4762. responses:
  4763. "200":
  4764. description: OK
  4765. schema:
  4766. allOf:
  4767. - $ref: '#/definitions/middleware.APIResponse'
  4768. - properties:
  4769. data:
  4770. additionalProperties:
  4771. allOf:
  4772. - {}
  4773. - properties:
  4774. mapping:
  4775. additionalProperties:
  4776. type: string
  4777. type: object
  4778. models:
  4779. items:
  4780. type: string
  4781. type: array
  4782. type: object
  4783. type: object
  4784. type: object
  4785. security:
  4786. - ApiKeyAuth: []
  4787. summary: Get channel default models and mapping by type
  4788. tags:
  4789. - model
  4790. /api/models/enabled:
  4791. get:
  4792. description: Returns a list of enabled models
  4793. produces:
  4794. - application/json
  4795. responses:
  4796. "200":
  4797. description: OK
  4798. schema:
  4799. allOf:
  4800. - $ref: '#/definitions/middleware.APIResponse'
  4801. - properties:
  4802. data:
  4803. additionalProperties:
  4804. items:
  4805. $ref: '#/definitions/model.ModelConfig'
  4806. type: array
  4807. type: object
  4808. type: object
  4809. security:
  4810. - ApiKeyAuth: []
  4811. summary: Get enabled models
  4812. tags:
  4813. - model
  4814. /api/models/enabled/{set}:
  4815. get:
  4816. description: Returns a list of enabled models by set
  4817. parameters:
  4818. - description: Models set
  4819. in: path
  4820. name: set
  4821. required: true
  4822. type: string
  4823. produces:
  4824. - application/json
  4825. responses:
  4826. "200":
  4827. description: OK
  4828. schema:
  4829. allOf:
  4830. - $ref: '#/definitions/middleware.APIResponse'
  4831. - properties:
  4832. data:
  4833. items:
  4834. $ref: '#/definitions/model.ModelConfig'
  4835. type: array
  4836. type: object
  4837. security:
  4838. - ApiKeyAuth: []
  4839. summary: Get enabled models by set
  4840. tags:
  4841. - model
  4842. /api/models/sets:
  4843. get:
  4844. description: Returns a list of enabled models and channels sets
  4845. produces:
  4846. - application/json
  4847. responses:
  4848. "200":
  4849. description: OK
  4850. schema:
  4851. allOf:
  4852. - $ref: '#/definitions/middleware.APIResponse'
  4853. - properties:
  4854. data:
  4855. additionalProperties:
  4856. additionalProperties:
  4857. items:
  4858. $ref: '#/definitions/controller.EnabledModelChannel'
  4859. type: array
  4860. type: object
  4861. type: object
  4862. type: object
  4863. security:
  4864. - ApiKeyAuth: []
  4865. summary: Get enabled models and channels sets
  4866. tags:
  4867. - model
  4868. /api/monitor/:
  4869. delete:
  4870. description: Clears all model errors
  4871. produces:
  4872. - application/json
  4873. responses:
  4874. "200":
  4875. description: OK
  4876. schema:
  4877. $ref: '#/definitions/middleware.APIResponse'
  4878. security:
  4879. - ApiKeyAuth: []
  4880. summary: Clear all model errors
  4881. tags:
  4882. - monitor
  4883. get:
  4884. description: Returns a list of all channel model error rates
  4885. produces:
  4886. - application/json
  4887. responses:
  4888. "200":
  4889. description: OK
  4890. schema:
  4891. allOf:
  4892. - $ref: '#/definitions/middleware.APIResponse'
  4893. - properties:
  4894. data:
  4895. additionalProperties:
  4896. additionalProperties:
  4897. type: number
  4898. type: object
  4899. type: object
  4900. type: object
  4901. security:
  4902. - ApiKeyAuth: []
  4903. summary: Get all channel model error rates
  4904. tags:
  4905. - monitor
  4906. /api/monitor/{id}:
  4907. delete:
  4908. description: Clears all model errors for a specific channel
  4909. parameters:
  4910. - description: Channel ID
  4911. in: path
  4912. name: id
  4913. required: true
  4914. type: integer
  4915. produces:
  4916. - application/json
  4917. responses:
  4918. "200":
  4919. description: OK
  4920. schema:
  4921. $ref: '#/definitions/middleware.APIResponse'
  4922. security:
  4923. - ApiKeyAuth: []
  4924. summary: Clear channel all model errors
  4925. tags:
  4926. - monitor
  4927. get:
  4928. description: Returns a list of channel model error rates
  4929. parameters:
  4930. - description: Channel ID
  4931. in: path
  4932. name: id
  4933. required: true
  4934. type: integer
  4935. produces:
  4936. - application/json
  4937. responses:
  4938. "200":
  4939. description: OK
  4940. schema:
  4941. allOf:
  4942. - $ref: '#/definitions/middleware.APIResponse'
  4943. - properties:
  4944. data:
  4945. items:
  4946. additionalProperties:
  4947. type: number
  4948. type: object
  4949. type: array
  4950. type: object
  4951. security:
  4952. - ApiKeyAuth: []
  4953. summary: Get channel model error rates
  4954. tags:
  4955. - monitor
  4956. /api/monitor/{id}/{model}:
  4957. delete:
  4958. description: Clears model errors for a specific channel and model
  4959. parameters:
  4960. - description: Channel ID
  4961. in: path
  4962. name: id
  4963. required: true
  4964. type: integer
  4965. - description: Model name
  4966. in: path
  4967. name: model
  4968. required: true
  4969. type: string
  4970. produces:
  4971. - application/json
  4972. responses:
  4973. "200":
  4974. description: OK
  4975. schema:
  4976. $ref: '#/definitions/middleware.APIResponse'
  4977. security:
  4978. - ApiKeyAuth: []
  4979. summary: Clear channel model errors
  4980. tags:
  4981. - monitor
  4982. /api/monitor/banned_channels:
  4983. get:
  4984. description: Returns a list of all banned model channels
  4985. produces:
  4986. - application/json
  4987. responses:
  4988. "200":
  4989. description: OK
  4990. schema:
  4991. allOf:
  4992. - $ref: '#/definitions/middleware.APIResponse'
  4993. - properties:
  4994. data:
  4995. additionalProperties:
  4996. items:
  4997. type: integer
  4998. type: array
  4999. type: object
  5000. type: object
  5001. security:
  5002. - ApiKeyAuth: []
  5003. summary: Get all banned model channels
  5004. tags:
  5005. - monitor
  5006. /api/monitor/models:
  5007. get:
  5008. description: Returns a list of models error rate
  5009. produces:
  5010. - application/json
  5011. responses:
  5012. "200":
  5013. description: OK
  5014. schema:
  5015. allOf:
  5016. - $ref: '#/definitions/middleware.APIResponse'
  5017. - properties:
  5018. data:
  5019. additionalProperties:
  5020. type: number
  5021. type: object
  5022. type: object
  5023. security:
  5024. - ApiKeyAuth: []
  5025. summary: Get models error rate
  5026. tags:
  5027. - monitor
  5028. /api/option/:
  5029. get:
  5030. description: Returns a list of options
  5031. produces:
  5032. - application/json
  5033. responses:
  5034. "200":
  5035. description: OK
  5036. schema:
  5037. allOf:
  5038. - $ref: '#/definitions/middleware.APIResponse'
  5039. - properties:
  5040. data:
  5041. additionalProperties:
  5042. type: string
  5043. type: object
  5044. type: object
  5045. security:
  5046. - ApiKeyAuth: []
  5047. summary: Get options
  5048. tags:
  5049. - option
  5050. post:
  5051. description: Updates a single option
  5052. parameters:
  5053. - description: Option value
  5054. in: body
  5055. name: value
  5056. required: true
  5057. schema:
  5058. $ref: '#/definitions/model.Option'
  5059. produces:
  5060. - application/json
  5061. responses:
  5062. "200":
  5063. description: OK
  5064. schema:
  5065. $ref: '#/definitions/middleware.APIResponse'
  5066. security:
  5067. - ApiKeyAuth: []
  5068. summary: Update option
  5069. tags:
  5070. - option
  5071. put:
  5072. description: Updates a single option
  5073. parameters:
  5074. - description: Option value
  5075. in: body
  5076. name: value
  5077. required: true
  5078. schema:
  5079. $ref: '#/definitions/model.Option'
  5080. produces:
  5081. - application/json
  5082. responses:
  5083. "200":
  5084. description: OK
  5085. schema:
  5086. $ref: '#/definitions/middleware.APIResponse'
  5087. security:
  5088. - ApiKeyAuth: []
  5089. summary: Update option
  5090. tags:
  5091. - option
  5092. /api/option/{key}:
  5093. get:
  5094. description: Returns a single option
  5095. parameters:
  5096. - description: Option key
  5097. in: path
  5098. name: key
  5099. required: true
  5100. type: string
  5101. produces:
  5102. - application/json
  5103. responses:
  5104. "200":
  5105. description: OK
  5106. schema:
  5107. allOf:
  5108. - $ref: '#/definitions/middleware.APIResponse'
  5109. - properties:
  5110. data:
  5111. $ref: '#/definitions/model.Option'
  5112. type: object
  5113. security:
  5114. - ApiKeyAuth: []
  5115. summary: Get option
  5116. tags:
  5117. - option
  5118. put:
  5119. description: Updates a single option by key
  5120. parameters:
  5121. - description: Option key
  5122. in: path
  5123. name: key
  5124. required: true
  5125. type: string
  5126. - description: Option value
  5127. in: body
  5128. name: value
  5129. required: true
  5130. schema:
  5131. type: string
  5132. produces:
  5133. - application/json
  5134. responses:
  5135. "200":
  5136. description: OK
  5137. schema:
  5138. $ref: '#/definitions/middleware.APIResponse'
  5139. security:
  5140. - ApiKeyAuth: []
  5141. summary: Update option by key
  5142. tags:
  5143. - option
  5144. /api/option/batch:
  5145. post:
  5146. description: Updates multiple options
  5147. parameters:
  5148. - description: Options
  5149. in: body
  5150. name: options
  5151. required: true
  5152. schema:
  5153. additionalProperties:
  5154. type: string
  5155. type: object
  5156. produces:
  5157. - application/json
  5158. responses:
  5159. "200":
  5160. description: OK
  5161. schema:
  5162. $ref: '#/definitions/middleware.APIResponse'
  5163. security:
  5164. - ApiKeyAuth: []
  5165. summary: Update options
  5166. tags:
  5167. - option
  5168. /api/status:
  5169. get:
  5170. description: Returns the status of the server
  5171. produces:
  5172. - application/json
  5173. responses:
  5174. "200":
  5175. description: OK
  5176. schema:
  5177. allOf:
  5178. - $ref: '#/definitions/middleware.APIResponse'
  5179. - properties:
  5180. data:
  5181. $ref: '#/definitions/controller.StatusData'
  5182. type: object
  5183. summary: Get status
  5184. tags:
  5185. - misc
  5186. /api/test-embedmcp/{id}:
  5187. delete:
  5188. consumes:
  5189. - application/json
  5190. description: Test Embed MCP Streamable Server with various HTTP methods
  5191. parameters:
  5192. - description: MCP ID
  5193. in: path
  5194. name: id
  5195. required: true
  5196. type: string
  5197. - description: Initial configuration parameters (e.g. config[host]=http://localhost:3000)
  5198. in: query
  5199. name: config[key]
  5200. type: string
  5201. - description: Reusing configuration parameters (e.g., reusing[authorization]=apikey)
  5202. in: query
  5203. name: reusing[key]
  5204. type: string
  5205. produces:
  5206. - application/json
  5207. responses:
  5208. "200":
  5209. description: OK
  5210. "400":
  5211. description: Bad Request
  5212. security:
  5213. - ApiKeyAuth: []
  5214. summary: Test Embed MCP Streamable Server
  5215. tags:
  5216. - embedmcp
  5217. get:
  5218. consumes:
  5219. - application/json
  5220. description: Test Embed MCP Streamable Server with various HTTP methods
  5221. parameters:
  5222. - description: MCP ID
  5223. in: path
  5224. name: id
  5225. required: true
  5226. type: string
  5227. - description: Initial configuration parameters (e.g. config[host]=http://localhost:3000)
  5228. in: query
  5229. name: config[key]
  5230. type: string
  5231. - description: Reusing configuration parameters (e.g., reusing[authorization]=apikey)
  5232. in: query
  5233. name: reusing[key]
  5234. type: string
  5235. produces:
  5236. - application/json
  5237. responses:
  5238. "200":
  5239. description: OK
  5240. "400":
  5241. description: Bad Request
  5242. security:
  5243. - ApiKeyAuth: []
  5244. summary: Test Embed MCP Streamable Server
  5245. tags:
  5246. - embedmcp
  5247. post:
  5248. consumes:
  5249. - application/json
  5250. description: Test Embed MCP Streamable Server with various HTTP methods
  5251. parameters:
  5252. - description: MCP ID
  5253. in: path
  5254. name: id
  5255. required: true
  5256. type: string
  5257. - description: Initial configuration parameters (e.g. config[host]=http://localhost:3000)
  5258. in: query
  5259. name: config[key]
  5260. type: string
  5261. - description: Reusing configuration parameters (e.g., reusing[authorization]=apikey)
  5262. in: query
  5263. name: reusing[key]
  5264. type: string
  5265. produces:
  5266. - application/json
  5267. responses:
  5268. "200":
  5269. description: OK
  5270. "400":
  5271. description: Bad Request
  5272. security:
  5273. - ApiKeyAuth: []
  5274. summary: Test Embed MCP Streamable Server
  5275. tags:
  5276. - embedmcp
  5277. /api/test-embedmcp/{id}/sse:
  5278. get:
  5279. description: Test Embed MCP SSE Server
  5280. parameters:
  5281. - description: MCP ID
  5282. in: path
  5283. name: id
  5284. required: true
  5285. type: string
  5286. - description: Initial configuration parameters (e.g. config[host]=http://localhost:3000)
  5287. in: query
  5288. name: config[key]
  5289. type: string
  5290. - description: Reusing configuration parameters (e.g. reusing[authorization]=apikey)
  5291. in: query
  5292. name: reusing[key]
  5293. type: string
  5294. responses:
  5295. "200":
  5296. description: OK
  5297. "400":
  5298. description: Bad Request
  5299. security:
  5300. - ApiKeyAuth: []
  5301. summary: Test Embed MCP SSE Server
  5302. tags:
  5303. - embedmcp
  5304. /api/test-embedmcp/message:
  5305. post:
  5306. consumes:
  5307. - application/json
  5308. description: Send a message to the test embed MCP server
  5309. parameters:
  5310. - description: Session ID
  5311. in: query
  5312. name: sessionId
  5313. required: true
  5314. type: string
  5315. produces:
  5316. - application/json
  5317. responses:
  5318. "200":
  5319. description: OK
  5320. "400":
  5321. description: Bad Request
  5322. security:
  5323. - ApiKeyAuth: []
  5324. summary: Test Embed MCP Message
  5325. tags:
  5326. - embedmcp
  5327. /api/token/{group}:
  5328. post:
  5329. consumes:
  5330. - application/json
  5331. description: Adds a new token to a specific group
  5332. parameters:
  5333. - description: Group name
  5334. in: path
  5335. name: group
  5336. required: true
  5337. type: string
  5338. - description: Auto create group
  5339. in: query
  5340. name: auto_create_group
  5341. type: boolean
  5342. - description: Ignore exist
  5343. in: query
  5344. name: ignore_exist
  5345. type: boolean
  5346. - description: Token information
  5347. in: body
  5348. name: token
  5349. required: true
  5350. schema:
  5351. $ref: '#/definitions/controller.AddTokenRequest'
  5352. produces:
  5353. - application/json
  5354. responses:
  5355. "200":
  5356. description: OK
  5357. schema:
  5358. allOf:
  5359. - $ref: '#/definitions/middleware.APIResponse'
  5360. - properties:
  5361. data:
  5362. $ref: '#/definitions/controller.TokenResponse'
  5363. type: object
  5364. security:
  5365. - ApiKeyAuth: []
  5366. summary: Add group token
  5367. tags:
  5368. - token
  5369. /api/token/{group}/{id}:
  5370. delete:
  5371. description: Deletes a specific token from a group
  5372. parameters:
  5373. - description: Group name
  5374. in: path
  5375. name: group
  5376. required: true
  5377. type: string
  5378. - description: Token ID
  5379. in: path
  5380. name: id
  5381. required: true
  5382. type: integer
  5383. produces:
  5384. - application/json
  5385. responses:
  5386. "200":
  5387. description: OK
  5388. schema:
  5389. $ref: '#/definitions/middleware.APIResponse'
  5390. security:
  5391. - ApiKeyAuth: []
  5392. summary: Delete group token
  5393. tags:
  5394. - token
  5395. get:
  5396. description: Returns detailed information about a specific token for a specific
  5397. group
  5398. parameters:
  5399. - description: Group name
  5400. in: path
  5401. name: group
  5402. required: true
  5403. type: string
  5404. - description: Token ID
  5405. in: path
  5406. name: id
  5407. required: true
  5408. type: integer
  5409. produces:
  5410. - application/json
  5411. responses:
  5412. "200":
  5413. description: OK
  5414. schema:
  5415. allOf:
  5416. - $ref: '#/definitions/middleware.APIResponse'
  5417. - properties:
  5418. data:
  5419. $ref: '#/definitions/controller.TokenResponse'
  5420. type: object
  5421. security:
  5422. - ApiKeyAuth: []
  5423. summary: Get token by ID for a specific group
  5424. tags:
  5425. - token
  5426. put:
  5427. consumes:
  5428. - application/json
  5429. description: Updates an existing token in a specific group
  5430. parameters:
  5431. - description: Group name
  5432. in: path
  5433. name: group
  5434. required: true
  5435. type: string
  5436. - description: Token ID
  5437. in: path
  5438. name: id
  5439. required: true
  5440. type: integer
  5441. - description: Updated token information
  5442. in: body
  5443. name: token
  5444. required: true
  5445. schema:
  5446. $ref: '#/definitions/controller.AddTokenRequest'
  5447. produces:
  5448. - application/json
  5449. responses:
  5450. "200":
  5451. description: OK
  5452. schema:
  5453. allOf:
  5454. - $ref: '#/definitions/middleware.APIResponse'
  5455. - properties:
  5456. data:
  5457. $ref: '#/definitions/controller.TokenResponse'
  5458. type: object
  5459. security:
  5460. - ApiKeyAuth: []
  5461. summary: Update group token
  5462. tags:
  5463. - token
  5464. /api/token/{group}/{id}/name:
  5465. post:
  5466. consumes:
  5467. - application/json
  5468. description: Updates the name of a token in a specific group
  5469. parameters:
  5470. - description: Group name
  5471. in: path
  5472. name: group
  5473. required: true
  5474. type: string
  5475. - description: Token ID
  5476. in: path
  5477. name: id
  5478. required: true
  5479. type: integer
  5480. - description: Name information
  5481. in: body
  5482. name: name
  5483. required: true
  5484. schema:
  5485. $ref: '#/definitions/controller.UpdateTokenNameRequest'
  5486. produces:
  5487. - application/json
  5488. responses:
  5489. "200":
  5490. description: OK
  5491. schema:
  5492. $ref: '#/definitions/middleware.APIResponse'
  5493. security:
  5494. - ApiKeyAuth: []
  5495. summary: Update group token name
  5496. tags:
  5497. - token
  5498. /api/token/{group}/{id}/status:
  5499. post:
  5500. consumes:
  5501. - application/json
  5502. description: Updates the status of a token in a specific group
  5503. parameters:
  5504. - description: Group name
  5505. in: path
  5506. name: group
  5507. required: true
  5508. type: string
  5509. - description: Token ID
  5510. in: path
  5511. name: id
  5512. required: true
  5513. type: integer
  5514. - description: Status information
  5515. in: body
  5516. name: status
  5517. required: true
  5518. schema:
  5519. $ref: '#/definitions/controller.UpdateTokenStatusRequest'
  5520. produces:
  5521. - application/json
  5522. responses:
  5523. "200":
  5524. description: OK
  5525. schema:
  5526. $ref: '#/definitions/middleware.APIResponse'
  5527. security:
  5528. - ApiKeyAuth: []
  5529. summary: Update group token status
  5530. tags:
  5531. - token
  5532. /api/token/{group}/batch_delete:
  5533. post:
  5534. description: Deletes multiple tokens from a specific group
  5535. parameters:
  5536. - description: Group name
  5537. in: path
  5538. name: group
  5539. required: true
  5540. type: string
  5541. - description: Token IDs
  5542. in: body
  5543. name: ids
  5544. required: true
  5545. schema:
  5546. items:
  5547. type: integer
  5548. type: array
  5549. produces:
  5550. - application/json
  5551. responses:
  5552. "200":
  5553. description: OK
  5554. schema:
  5555. $ref: '#/definitions/middleware.APIResponse'
  5556. security:
  5557. - ApiKeyAuth: []
  5558. summary: Delete group tokens
  5559. tags:
  5560. - token
  5561. /api/token/{group}/search:
  5562. get:
  5563. description: Returns a paginated list of tokens for a specific group based on
  5564. search criteria
  5565. parameters:
  5566. - description: Group name
  5567. in: path
  5568. name: group
  5569. required: true
  5570. type: string
  5571. - description: Keyword
  5572. in: query
  5573. name: keyword
  5574. type: string
  5575. - description: Page number
  5576. in: query
  5577. name: page
  5578. type: integer
  5579. - description: Items per page
  5580. in: query
  5581. name: per_page
  5582. type: integer
  5583. - description: Order
  5584. in: query
  5585. name: order
  5586. type: string
  5587. - description: Name
  5588. in: query
  5589. name: name
  5590. type: string
  5591. - description: Key
  5592. in: query
  5593. name: key
  5594. type: string
  5595. - description: Status
  5596. in: query
  5597. name: status
  5598. type: integer
  5599. produces:
  5600. - application/json
  5601. responses:
  5602. "200":
  5603. description: OK
  5604. schema:
  5605. allOf:
  5606. - $ref: '#/definitions/middleware.APIResponse'
  5607. - properties:
  5608. data:
  5609. additionalProperties:
  5610. allOf:
  5611. - {}
  5612. - properties:
  5613. tokens:
  5614. items:
  5615. $ref: '#/definitions/controller.TokenResponse'
  5616. type: array
  5617. total:
  5618. type: integer
  5619. type: object
  5620. type: object
  5621. type: object
  5622. security:
  5623. - ApiKeyAuth: []
  5624. summary: Search tokens for a specific group
  5625. tags:
  5626. - token
  5627. /api/tokens/:
  5628. get:
  5629. description: Returns a paginated list of all tokens
  5630. parameters:
  5631. - description: Page number
  5632. in: query
  5633. name: page
  5634. type: integer
  5635. - description: Items per page
  5636. in: query
  5637. name: per_page
  5638. type: integer
  5639. - description: Group name
  5640. in: query
  5641. name: group
  5642. type: string
  5643. - description: Order
  5644. in: query
  5645. name: order
  5646. type: string
  5647. - description: Status
  5648. in: query
  5649. name: status
  5650. type: integer
  5651. produces:
  5652. - application/json
  5653. responses:
  5654. "200":
  5655. description: OK
  5656. schema:
  5657. allOf:
  5658. - $ref: '#/definitions/middleware.APIResponse'
  5659. - properties:
  5660. data:
  5661. additionalProperties:
  5662. allOf:
  5663. - {}
  5664. - properties:
  5665. tokens:
  5666. items:
  5667. $ref: '#/definitions/controller.TokenResponse'
  5668. type: array
  5669. total:
  5670. type: integer
  5671. type: object
  5672. type: object
  5673. type: object
  5674. security:
  5675. - ApiKeyAuth: []
  5676. summary: Get all tokens
  5677. tags:
  5678. - tokens
  5679. /api/tokens/{group}:
  5680. get:
  5681. description: Returns a paginated list of all tokens for a specific group
  5682. parameters:
  5683. - description: Group name
  5684. in: path
  5685. name: group
  5686. required: true
  5687. type: string
  5688. - description: Page number
  5689. in: query
  5690. name: page
  5691. type: integer
  5692. - description: Items per page
  5693. in: query
  5694. name: per_page
  5695. type: integer
  5696. - description: Order
  5697. in: query
  5698. name: order
  5699. type: string
  5700. - description: Status
  5701. in: query
  5702. name: status
  5703. type: integer
  5704. produces:
  5705. - application/json
  5706. responses:
  5707. "200":
  5708. description: OK
  5709. schema:
  5710. allOf:
  5711. - $ref: '#/definitions/middleware.APIResponse'
  5712. - properties:
  5713. data:
  5714. additionalProperties:
  5715. allOf:
  5716. - {}
  5717. - properties:
  5718. tokens:
  5719. items:
  5720. $ref: '#/definitions/controller.TokenResponse'
  5721. type: array
  5722. total:
  5723. type: integer
  5724. type: object
  5725. type: object
  5726. type: object
  5727. security:
  5728. - ApiKeyAuth: []
  5729. summary: Get all tokens for a specific group
  5730. tags:
  5731. - tokens
  5732. /api/tokens/{id}:
  5733. delete:
  5734. description: Deletes a specific token by ID
  5735. parameters:
  5736. - description: Token ID
  5737. in: path
  5738. name: id
  5739. required: true
  5740. type: integer
  5741. produces:
  5742. - application/json
  5743. responses:
  5744. "200":
  5745. description: OK
  5746. schema:
  5747. $ref: '#/definitions/middleware.APIResponse'
  5748. security:
  5749. - ApiKeyAuth: []
  5750. summary: Delete token
  5751. tags:
  5752. - tokens
  5753. get:
  5754. description: Returns detailed information about a specific token
  5755. parameters:
  5756. - description: Token ID
  5757. in: path
  5758. name: id
  5759. required: true
  5760. type: integer
  5761. produces:
  5762. - application/json
  5763. responses:
  5764. "200":
  5765. description: OK
  5766. schema:
  5767. allOf:
  5768. - $ref: '#/definitions/middleware.APIResponse'
  5769. - properties:
  5770. data:
  5771. $ref: '#/definitions/controller.TokenResponse'
  5772. type: object
  5773. security:
  5774. - ApiKeyAuth: []
  5775. summary: Get token by ID
  5776. tags:
  5777. - tokens
  5778. put:
  5779. consumes:
  5780. - application/json
  5781. description: Updates an existing token's information
  5782. parameters:
  5783. - description: Token ID
  5784. in: path
  5785. name: id
  5786. required: true
  5787. type: integer
  5788. - description: Updated token information
  5789. in: body
  5790. name: token
  5791. required: true
  5792. schema:
  5793. $ref: '#/definitions/controller.AddTokenRequest'
  5794. produces:
  5795. - application/json
  5796. responses:
  5797. "200":
  5798. description: OK
  5799. schema:
  5800. allOf:
  5801. - $ref: '#/definitions/middleware.APIResponse'
  5802. - properties:
  5803. data:
  5804. $ref: '#/definitions/controller.TokenResponse'
  5805. type: object
  5806. security:
  5807. - ApiKeyAuth: []
  5808. summary: Update token
  5809. tags:
  5810. - tokens
  5811. /api/tokens/{id}/name:
  5812. post:
  5813. consumes:
  5814. - application/json
  5815. description: Updates the name of a specific token
  5816. parameters:
  5817. - description: Token ID
  5818. in: path
  5819. name: id
  5820. required: true
  5821. type: integer
  5822. - description: Name information
  5823. in: body
  5824. name: name
  5825. required: true
  5826. schema:
  5827. $ref: '#/definitions/controller.UpdateTokenNameRequest'
  5828. produces:
  5829. - application/json
  5830. responses:
  5831. "200":
  5832. description: OK
  5833. schema:
  5834. $ref: '#/definitions/middleware.APIResponse'
  5835. security:
  5836. - ApiKeyAuth: []
  5837. summary: Update token name
  5838. tags:
  5839. - tokens
  5840. /api/tokens/{id}/status:
  5841. post:
  5842. consumes:
  5843. - application/json
  5844. description: Updates the status of a specific token
  5845. parameters:
  5846. - description: Token ID
  5847. in: path
  5848. name: id
  5849. required: true
  5850. type: integer
  5851. - description: Status information
  5852. in: body
  5853. name: status
  5854. required: true
  5855. schema:
  5856. $ref: '#/definitions/controller.UpdateTokenStatusRequest'
  5857. produces:
  5858. - application/json
  5859. responses:
  5860. "200":
  5861. description: OK
  5862. schema:
  5863. $ref: '#/definitions/middleware.APIResponse'
  5864. security:
  5865. - ApiKeyAuth: []
  5866. summary: Update token status
  5867. tags:
  5868. - tokens
  5869. /api/tokens/batch_delete:
  5870. post:
  5871. consumes:
  5872. - application/json
  5873. description: Deletes multiple tokens by their IDs
  5874. parameters:
  5875. - description: Token IDs
  5876. in: body
  5877. name: ids
  5878. required: true
  5879. schema:
  5880. items:
  5881. type: integer
  5882. type: array
  5883. produces:
  5884. - application/json
  5885. responses:
  5886. "200":
  5887. description: OK
  5888. schema:
  5889. $ref: '#/definitions/middleware.APIResponse'
  5890. security:
  5891. - ApiKeyAuth: []
  5892. summary: Delete multiple tokens
  5893. tags:
  5894. - tokens
  5895. /api/tokens/search:
  5896. get:
  5897. description: Returns a paginated list of tokens based on search criteria
  5898. parameters:
  5899. - description: Keyword
  5900. in: query
  5901. name: keyword
  5902. type: string
  5903. - description: Page number
  5904. in: query
  5905. name: page
  5906. type: integer
  5907. - description: Items per page
  5908. in: query
  5909. name: per_page
  5910. type: integer
  5911. - description: Order
  5912. in: query
  5913. name: order
  5914. type: string
  5915. - description: Name
  5916. in: query
  5917. name: name
  5918. type: string
  5919. - description: Key
  5920. in: query
  5921. name: key
  5922. type: string
  5923. - description: Status
  5924. in: query
  5925. name: status
  5926. type: integer
  5927. - description: Group
  5928. in: query
  5929. name: group
  5930. type: string
  5931. produces:
  5932. - application/json
  5933. responses:
  5934. "200":
  5935. description: OK
  5936. schema:
  5937. allOf:
  5938. - $ref: '#/definitions/middleware.APIResponse'
  5939. - properties:
  5940. data:
  5941. additionalProperties:
  5942. allOf:
  5943. - {}
  5944. - properties:
  5945. tokens:
  5946. items:
  5947. $ref: '#/definitions/controller.TokenResponse'
  5948. type: array
  5949. total:
  5950. type: integer
  5951. type: object
  5952. type: object
  5953. type: object
  5954. security:
  5955. - ApiKeyAuth: []
  5956. summary: Search tokens
  5957. tags:
  5958. - tokens
  5959. /mcp:
  5960. delete:
  5961. responses: {}
  5962. security:
  5963. - ApiKeyAuth: []
  5964. summary: Host MCP Streamable Server
  5965. get:
  5966. responses: {}
  5967. security:
  5968. - ApiKeyAuth: []
  5969. summary: Host MCP Streamable Server
  5970. post:
  5971. responses: {}
  5972. security:
  5973. - ApiKeyAuth: []
  5974. summary: Host MCP Streamable Server
  5975. /mcp/group/{id}:
  5976. delete:
  5977. responses: {}
  5978. security:
  5979. - ApiKeyAuth: []
  5980. summary: Group MCP Streamable Server
  5981. get:
  5982. responses: {}
  5983. security:
  5984. - ApiKeyAuth: []
  5985. summary: Group MCP Streamable Server
  5986. post:
  5987. responses: {}
  5988. security:
  5989. - ApiKeyAuth: []
  5990. summary: Group MCP Streamable Server
  5991. /mcp/group/{id}/sse:
  5992. get:
  5993. responses: {}
  5994. security:
  5995. - ApiKeyAuth: []
  5996. summary: Group MCP SSE Server
  5997. /mcp/group/message:
  5998. post:
  5999. responses: {}
  6000. security:
  6001. - ApiKeyAuth: []
  6002. summary: MCP SSE Proxy
  6003. /mcp/public/{id}:
  6004. delete:
  6005. responses: {}
  6006. security:
  6007. - ApiKeyAuth: []
  6008. summary: Public MCP Streamable Server
  6009. get:
  6010. responses: {}
  6011. security:
  6012. - ApiKeyAuth: []
  6013. summary: Public MCP Streamable Server
  6014. post:
  6015. responses: {}
  6016. security:
  6017. - ApiKeyAuth: []
  6018. summary: Public MCP Streamable Server
  6019. /mcp/public/{id}/sse:
  6020. get:
  6021. responses: {}
  6022. security:
  6023. - ApiKeyAuth: []
  6024. summary: Public MCP SSE Server
  6025. /mcp/public/message:
  6026. post:
  6027. responses: {}
  6028. security:
  6029. - ApiKeyAuth: []
  6030. summary: Public MCP SSE Server
  6031. /message:
  6032. post:
  6033. responses: {}
  6034. security:
  6035. - ApiKeyAuth: []
  6036. summary: Public MCP SSE Server
  6037. /sse:
  6038. get:
  6039. responses: {}
  6040. security:
  6041. - ApiKeyAuth: []
  6042. summary: Public MCP SSE Server
  6043. /v1/audio/speech:
  6044. post:
  6045. description: AudioSpeech
  6046. parameters:
  6047. - description: Request
  6048. in: body
  6049. name: request
  6050. required: true
  6051. schema:
  6052. $ref: '#/definitions/model.TextToSpeechRequest'
  6053. - description: Optional Aiproxy-Channel header
  6054. in: header
  6055. name: Aiproxy-Channel
  6056. type: string
  6057. produces:
  6058. - application/json
  6059. responses:
  6060. "200":
  6061. description: audio binary
  6062. headers:
  6063. X-RateLimit-Limit-Requests:
  6064. description: X-RateLimit-Limit-Requests
  6065. type: integer
  6066. X-RateLimit-Limit-Tokens:
  6067. description: X-RateLimit-Limit-Tokens
  6068. type: integer
  6069. X-RateLimit-Remaining-Requests:
  6070. description: X-RateLimit-Remaining-Requests
  6071. type: integer
  6072. X-RateLimit-Remaining-Tokens:
  6073. description: X-RateLimit-Remaining-Tokens
  6074. type: integer
  6075. X-RateLimit-Reset-Requests:
  6076. description: X-RateLimit-Reset-Requests
  6077. type: string
  6078. X-RateLimit-Reset-Tokens:
  6079. description: X-RateLimit-Reset-Tokens
  6080. type: string
  6081. schema:
  6082. type: file
  6083. security:
  6084. - ApiKeyAuth: []
  6085. summary: AudioSpeech
  6086. tags:
  6087. - relay
  6088. /v1/audio/transcriptions:
  6089. post:
  6090. description: AudioTranscription
  6091. parameters:
  6092. - description: Model
  6093. in: formData
  6094. name: model
  6095. required: true
  6096. type: string
  6097. - description: File
  6098. in: formData
  6099. name: file
  6100. required: true
  6101. type: file
  6102. - description: Optional Aiproxy-Channel header
  6103. in: header
  6104. name: Aiproxy-Channel
  6105. type: string
  6106. produces:
  6107. - application/json
  6108. responses:
  6109. "200":
  6110. description: OK
  6111. headers:
  6112. X-RateLimit-Limit-Requests:
  6113. description: X-RateLimit-Limit-Requests
  6114. type: integer
  6115. X-RateLimit-Limit-Tokens:
  6116. description: X-RateLimit-Limit-Tokens
  6117. type: integer
  6118. X-RateLimit-Remaining-Requests:
  6119. description: X-RateLimit-Remaining-Requests
  6120. type: integer
  6121. X-RateLimit-Remaining-Tokens:
  6122. description: X-RateLimit-Remaining-Tokens
  6123. type: integer
  6124. X-RateLimit-Reset-Requests:
  6125. description: X-RateLimit-Reset-Requests
  6126. type: string
  6127. X-RateLimit-Reset-Tokens:
  6128. description: X-RateLimit-Reset-Tokens
  6129. type: string
  6130. schema:
  6131. $ref: '#/definitions/model.SttJSONResponse'
  6132. security:
  6133. - ApiKeyAuth: []
  6134. summary: AudioTranscription
  6135. tags:
  6136. - relay
  6137. /v1/audio/translations:
  6138. post:
  6139. description: AudioTranslation
  6140. parameters:
  6141. - description: Model
  6142. in: formData
  6143. name: model
  6144. required: true
  6145. type: string
  6146. - description: File
  6147. in: formData
  6148. name: file
  6149. required: true
  6150. type: file
  6151. - description: Optional Aiproxy-Channel header
  6152. in: header
  6153. name: Aiproxy-Channel
  6154. type: string
  6155. produces:
  6156. - application/json
  6157. responses:
  6158. "200":
  6159. description: OK
  6160. headers:
  6161. X-RateLimit-Limit-Requests:
  6162. description: X-RateLimit-Limit-Requests
  6163. type: integer
  6164. X-RateLimit-Limit-Tokens:
  6165. description: X-RateLimit-Limit-Tokens
  6166. type: integer
  6167. X-RateLimit-Remaining-Requests:
  6168. description: X-RateLimit-Remaining-Requests
  6169. type: integer
  6170. X-RateLimit-Remaining-Tokens:
  6171. description: X-RateLimit-Remaining-Tokens
  6172. type: integer
  6173. X-RateLimit-Reset-Requests:
  6174. description: X-RateLimit-Reset-Requests
  6175. type: string
  6176. X-RateLimit-Reset-Tokens:
  6177. description: X-RateLimit-Reset-Tokens
  6178. type: string
  6179. schema:
  6180. $ref: '#/definitions/model.SttJSONResponse'
  6181. security:
  6182. - ApiKeyAuth: []
  6183. summary: AudioTranslation
  6184. tags:
  6185. - relay
  6186. /v1/chat/completions:
  6187. post:
  6188. description: ChatCompletions
  6189. parameters:
  6190. - description: Request
  6191. in: body
  6192. name: request
  6193. required: true
  6194. schema:
  6195. $ref: '#/definitions/model.GeneralOpenAIRequest'
  6196. - description: Optional Aiproxy-Channel header
  6197. in: header
  6198. name: Aiproxy-Channel
  6199. type: string
  6200. produces:
  6201. - application/json
  6202. responses:
  6203. "200":
  6204. description: OK
  6205. headers:
  6206. X-RateLimit-Limit-Requests:
  6207. description: X-RateLimit-Limit-Requests
  6208. type: integer
  6209. X-RateLimit-Limit-Tokens:
  6210. description: X-RateLimit-Limit-Tokens
  6211. type: integer
  6212. X-RateLimit-Remaining-Requests:
  6213. description: X-RateLimit-Remaining-Requests
  6214. type: integer
  6215. X-RateLimit-Remaining-Tokens:
  6216. description: X-RateLimit-Remaining-Tokens
  6217. type: integer
  6218. X-RateLimit-Reset-Requests:
  6219. description: X-RateLimit-Reset-Requests
  6220. type: string
  6221. X-RateLimit-Reset-Tokens:
  6222. description: X-RateLimit-Reset-Tokens
  6223. type: string
  6224. schema:
  6225. $ref: '#/definitions/model.TextResponse'
  6226. security:
  6227. - ApiKeyAuth: []
  6228. summary: ChatCompletions
  6229. tags:
  6230. - relay
  6231. /v1/completions:
  6232. post:
  6233. description: Completions
  6234. parameters:
  6235. - description: Request
  6236. in: body
  6237. name: request
  6238. required: true
  6239. schema:
  6240. $ref: '#/definitions/model.GeneralOpenAIRequest'
  6241. - description: Optional Aiproxy-Channel header
  6242. in: header
  6243. name: Aiproxy-Channel
  6244. type: string
  6245. produces:
  6246. - application/json
  6247. responses:
  6248. "200":
  6249. description: OK
  6250. headers:
  6251. X-RateLimit-Limit-Requests:
  6252. description: X-RateLimit-Limit-Requests
  6253. type: integer
  6254. X-RateLimit-Limit-Tokens:
  6255. description: X-RateLimit-Limit-Tokens
  6256. type: integer
  6257. X-RateLimit-Remaining-Requests:
  6258. description: X-RateLimit-Remaining-Requests
  6259. type: integer
  6260. X-RateLimit-Remaining-Tokens:
  6261. description: X-RateLimit-Remaining-Tokens
  6262. type: integer
  6263. X-RateLimit-Reset-Requests:
  6264. description: X-RateLimit-Reset-Requests
  6265. type: string
  6266. X-RateLimit-Reset-Tokens:
  6267. description: X-RateLimit-Reset-Tokens
  6268. type: string
  6269. schema:
  6270. $ref: '#/definitions/model.TextResponse'
  6271. security:
  6272. - ApiKeyAuth: []
  6273. summary: Completions
  6274. tags:
  6275. - relay
  6276. /v1/dashboard/billing/subscription:
  6277. get:
  6278. description: Get subscription
  6279. produces:
  6280. - application/json
  6281. responses:
  6282. "200":
  6283. description: OK
  6284. schema:
  6285. $ref: '#/definitions/openai.SubscriptionResponse'
  6286. security:
  6287. - ApiKeyAuth: []
  6288. summary: Get subscription
  6289. tags:
  6290. - relay
  6291. /v1/dashboard/billing/usage:
  6292. get:
  6293. description: Get usage
  6294. produces:
  6295. - application/json
  6296. responses:
  6297. "200":
  6298. description: OK
  6299. schema:
  6300. $ref: '#/definitions/openai.UsageResponse'
  6301. security:
  6302. - ApiKeyAuth: []
  6303. summary: Get usage
  6304. tags:
  6305. - relay
  6306. /v1/embeddings:
  6307. post:
  6308. description: Embeddings
  6309. parameters:
  6310. - description: Request
  6311. in: body
  6312. name: request
  6313. required: true
  6314. schema:
  6315. $ref: '#/definitions/model.EmbeddingRequest'
  6316. - description: Optional Aiproxy-Channel header
  6317. in: header
  6318. name: Aiproxy-Channel
  6319. type: string
  6320. produces:
  6321. - application/json
  6322. responses:
  6323. "200":
  6324. description: OK
  6325. headers:
  6326. X-RateLimit-Limit-Requests:
  6327. description: X-RateLimit-Limit-Requests
  6328. type: integer
  6329. X-RateLimit-Limit-Tokens:
  6330. description: X-RateLimit-Limit-Tokens
  6331. type: integer
  6332. X-RateLimit-Remaining-Requests:
  6333. description: X-RateLimit-Remaining-Requests
  6334. type: integer
  6335. X-RateLimit-Remaining-Tokens:
  6336. description: X-RateLimit-Remaining-Tokens
  6337. type: integer
  6338. X-RateLimit-Reset-Requests:
  6339. description: X-RateLimit-Reset-Requests
  6340. type: string
  6341. X-RateLimit-Reset-Tokens:
  6342. description: X-RateLimit-Reset-Tokens
  6343. type: string
  6344. schema:
  6345. $ref: '#/definitions/model.EmbeddingResponse'
  6346. security:
  6347. - ApiKeyAuth: []
  6348. summary: Embeddings
  6349. tags:
  6350. - relay
  6351. /v1/images/edits:
  6352. post:
  6353. description: ImagesEdits
  6354. parameters:
  6355. - description: Prompt
  6356. in: formData
  6357. name: prompt
  6358. required: true
  6359. type: string
  6360. - description: Model
  6361. in: formData
  6362. name: model
  6363. required: true
  6364. type: string
  6365. - description: Images
  6366. in: formData
  6367. name: image
  6368. required: true
  6369. type: file
  6370. - description: Optional Aiproxy-Channel header
  6371. in: header
  6372. name: Aiproxy-Channel
  6373. type: string
  6374. produces:
  6375. - application/json
  6376. responses:
  6377. "200":
  6378. description: OK
  6379. headers:
  6380. X-RateLimit-Limit-Requests:
  6381. description: X-RateLimit-Limit-Requests
  6382. type: integer
  6383. X-RateLimit-Limit-Tokens:
  6384. description: X-RateLimit-Limit-Tokens
  6385. type: integer
  6386. X-RateLimit-Remaining-Requests:
  6387. description: X-RateLimit-Remaining-Requests
  6388. type: integer
  6389. X-RateLimit-Remaining-Tokens:
  6390. description: X-RateLimit-Remaining-Tokens
  6391. type: integer
  6392. X-RateLimit-Reset-Requests:
  6393. description: X-RateLimit-Reset-Requests
  6394. type: string
  6395. X-RateLimit-Reset-Tokens:
  6396. description: X-RateLimit-Reset-Tokens
  6397. type: string
  6398. schema:
  6399. $ref: '#/definitions/model.SttJSONResponse'
  6400. security:
  6401. - ApiKeyAuth: []
  6402. summary: ImagesEdits
  6403. tags:
  6404. - relay
  6405. /v1/images/generations:
  6406. post:
  6407. description: ImagesGenerations
  6408. parameters:
  6409. - description: Request
  6410. in: body
  6411. name: request
  6412. required: true
  6413. schema:
  6414. $ref: '#/definitions/model.ImageRequest'
  6415. - description: Optional Aiproxy-Channel header
  6416. in: header
  6417. name: Aiproxy-Channel
  6418. type: string
  6419. produces:
  6420. - application/json
  6421. responses:
  6422. "200":
  6423. description: OK
  6424. headers:
  6425. X-RateLimit-Limit-Requests:
  6426. description: X-RateLimit-Limit-Requests
  6427. type: integer
  6428. X-RateLimit-Limit-Tokens:
  6429. description: X-RateLimit-Limit-Tokens
  6430. type: integer
  6431. X-RateLimit-Remaining-Requests:
  6432. description: X-RateLimit-Remaining-Requests
  6433. type: integer
  6434. X-RateLimit-Remaining-Tokens:
  6435. description: X-RateLimit-Remaining-Tokens
  6436. type: integer
  6437. X-RateLimit-Reset-Requests:
  6438. description: X-RateLimit-Reset-Requests
  6439. type: string
  6440. X-RateLimit-Reset-Tokens:
  6441. description: X-RateLimit-Reset-Tokens
  6442. type: string
  6443. schema:
  6444. $ref: '#/definitions/model.ImageResponse'
  6445. security:
  6446. - ApiKeyAuth: []
  6447. summary: ImagesGenerations
  6448. tags:
  6449. - relay
  6450. /v1/messages:
  6451. post:
  6452. description: Anthropic
  6453. parameters:
  6454. - description: Request
  6455. in: body
  6456. name: request
  6457. required: true
  6458. schema:
  6459. $ref: '#/definitions/model.AnthropicMessageRequest'
  6460. - description: Optional Aiproxy-Channel header
  6461. in: header
  6462. name: Aiproxy-Channel
  6463. type: string
  6464. produces:
  6465. - application/json
  6466. responses:
  6467. "200":
  6468. description: OK
  6469. headers:
  6470. X-RateLimit-Limit-Requests:
  6471. description: X-RateLimit-Limit-Requests
  6472. type: integer
  6473. X-RateLimit-Limit-Tokens:
  6474. description: X-RateLimit-Limit-Tokens
  6475. type: integer
  6476. X-RateLimit-Remaining-Requests:
  6477. description: X-RateLimit-Remaining-Requests
  6478. type: integer
  6479. X-RateLimit-Remaining-Tokens:
  6480. description: X-RateLimit-Remaining-Tokens
  6481. type: integer
  6482. X-RateLimit-Reset-Requests:
  6483. description: X-RateLimit-Reset-Requests
  6484. type: string
  6485. X-RateLimit-Reset-Tokens:
  6486. description: X-RateLimit-Reset-Tokens
  6487. type: string
  6488. schema:
  6489. $ref: '#/definitions/model.TextResponse'
  6490. security:
  6491. - ApiKeyAuth: []
  6492. summary: Anthropic
  6493. tags:
  6494. - relay
  6495. /v1/models:
  6496. get:
  6497. description: List all models
  6498. produces:
  6499. - application/json
  6500. responses:
  6501. "200":
  6502. description: OK
  6503. schema:
  6504. properties:
  6505. data:
  6506. items:
  6507. $ref: '#/definitions/controller.OpenAIModels'
  6508. type: array
  6509. object:
  6510. type: string
  6511. type: object
  6512. security:
  6513. - ApiKeyAuth: []
  6514. summary: List models
  6515. tags:
  6516. - relay
  6517. /v1/models/{model}:
  6518. get:
  6519. description: Retrieve a model
  6520. produces:
  6521. - application/json
  6522. responses:
  6523. "200":
  6524. description: OK
  6525. schema:
  6526. $ref: '#/definitions/controller.OpenAIModels'
  6527. security:
  6528. - ApiKeyAuth: []
  6529. summary: Retrieve model
  6530. tags:
  6531. - relay
  6532. /v1/parse/pdf:
  6533. post:
  6534. description: ParsePdf
  6535. parameters:
  6536. - description: Model
  6537. in: formData
  6538. name: model
  6539. required: true
  6540. type: string
  6541. - description: File
  6542. in: formData
  6543. name: file
  6544. required: true
  6545. type: file
  6546. - description: Optional Aiproxy-Channel header
  6547. in: header
  6548. name: Aiproxy-Channel
  6549. type: string
  6550. produces:
  6551. - application/json
  6552. responses:
  6553. "200":
  6554. description: OK
  6555. headers:
  6556. X-RateLimit-Limit-Requests:
  6557. description: X-RateLimit-Limit-Requests
  6558. type: integer
  6559. X-RateLimit-Limit-Tokens:
  6560. description: X-RateLimit-Limit-Tokens
  6561. type: integer
  6562. X-RateLimit-Remaining-Requests:
  6563. description: X-RateLimit-Remaining-Requests
  6564. type: integer
  6565. X-RateLimit-Remaining-Tokens:
  6566. description: X-RateLimit-Remaining-Tokens
  6567. type: integer
  6568. X-RateLimit-Reset-Requests:
  6569. description: X-RateLimit-Reset-Requests
  6570. type: string
  6571. X-RateLimit-Reset-Tokens:
  6572. description: X-RateLimit-Reset-Tokens
  6573. type: string
  6574. schema:
  6575. $ref: '#/definitions/model.ParsePdfResponse'
  6576. security:
  6577. - ApiKeyAuth: []
  6578. summary: ParsePdf
  6579. tags:
  6580. - relay
  6581. /v1/rerank:
  6582. post:
  6583. description: Rerank
  6584. parameters:
  6585. - description: Request
  6586. in: body
  6587. name: request
  6588. required: true
  6589. schema:
  6590. $ref: '#/definitions/model.RerankRequest'
  6591. - description: Optional Aiproxy-Channel header
  6592. in: header
  6593. name: Aiproxy-Channel
  6594. type: string
  6595. produces:
  6596. - application/json
  6597. responses:
  6598. "200":
  6599. description: OK
  6600. headers:
  6601. X-RateLimit-Limit-Requests:
  6602. description: X-RateLimit-Limit-Requests
  6603. type: integer
  6604. X-RateLimit-Limit-Tokens:
  6605. description: X-RateLimit-Limit-Tokens
  6606. type: integer
  6607. X-RateLimit-Remaining-Requests:
  6608. description: X-RateLimit-Remaining-Requests
  6609. type: integer
  6610. X-RateLimit-Remaining-Tokens:
  6611. description: X-RateLimit-Remaining-Tokens
  6612. type: integer
  6613. X-RateLimit-Reset-Requests:
  6614. description: X-RateLimit-Reset-Requests
  6615. type: string
  6616. X-RateLimit-Reset-Tokens:
  6617. description: X-RateLimit-Reset-Tokens
  6618. type: string
  6619. schema:
  6620. $ref: '#/definitions/model.RerankResponse'
  6621. security:
  6622. - ApiKeyAuth: []
  6623. summary: Rerank
  6624. tags:
  6625. - relay
  6626. /v1/video/generations/{id}/content/video:
  6627. get:
  6628. description: VideoGenerationsContent
  6629. parameters:
  6630. - description: Request
  6631. in: body
  6632. name: request
  6633. required: true
  6634. schema:
  6635. $ref: '#/definitions/model.VideoGenerationJobRequest'
  6636. - description: Optional Aiproxy-Channel header
  6637. in: header
  6638. name: Aiproxy-Channel
  6639. type: string
  6640. produces:
  6641. - application/json
  6642. responses:
  6643. "200":
  6644. description: video binary
  6645. headers:
  6646. X-RateLimit-Limit-Requests:
  6647. description: X-RateLimit-Limit-Requests
  6648. type: integer
  6649. X-RateLimit-Limit-Tokens:
  6650. description: X-RateLimit-Limit-Tokens
  6651. type: integer
  6652. X-RateLimit-Remaining-Requests:
  6653. description: X-RateLimit-Remaining-Requests
  6654. type: integer
  6655. X-RateLimit-Remaining-Tokens:
  6656. description: X-RateLimit-Remaining-Tokens
  6657. type: integer
  6658. X-RateLimit-Reset-Requests:
  6659. description: X-RateLimit-Reset-Requests
  6660. type: string
  6661. X-RateLimit-Reset-Tokens:
  6662. description: X-RateLimit-Reset-Tokens
  6663. type: string
  6664. schema:
  6665. type: file
  6666. security:
  6667. - ApiKeyAuth: []
  6668. summary: VideoGenerationsContent
  6669. tags:
  6670. - relay
  6671. /v1/video/generations/jobs:
  6672. post:
  6673. description: VideoGenerationsJobs
  6674. parameters:
  6675. - description: Request
  6676. in: body
  6677. name: request
  6678. required: true
  6679. schema:
  6680. $ref: '#/definitions/model.VideoGenerationJobRequest'
  6681. - description: Optional Aiproxy-Channel header
  6682. in: header
  6683. name: Aiproxy-Channel
  6684. type: string
  6685. produces:
  6686. - application/json
  6687. responses:
  6688. "200":
  6689. description: OK
  6690. headers:
  6691. X-RateLimit-Limit-Requests:
  6692. description: X-RateLimit-Limit-Requests
  6693. type: integer
  6694. X-RateLimit-Limit-Tokens:
  6695. description: X-RateLimit-Limit-Tokens
  6696. type: integer
  6697. X-RateLimit-Remaining-Requests:
  6698. description: X-RateLimit-Remaining-Requests
  6699. type: integer
  6700. X-RateLimit-Remaining-Tokens:
  6701. description: X-RateLimit-Remaining-Tokens
  6702. type: integer
  6703. X-RateLimit-Reset-Requests:
  6704. description: X-RateLimit-Reset-Requests
  6705. type: string
  6706. X-RateLimit-Reset-Tokens:
  6707. description: X-RateLimit-Reset-Tokens
  6708. type: string
  6709. schema:
  6710. $ref: '#/definitions/model.VideoGenerationJob'
  6711. security:
  6712. - ApiKeyAuth: []
  6713. summary: VideoGenerationsJobs
  6714. tags:
  6715. - relay
  6716. /v1/video/generations/jobs/{id}:
  6717. get:
  6718. description: VideoGenerationsGetJobs
  6719. parameters:
  6720. - description: Request
  6721. in: body
  6722. name: request
  6723. required: true
  6724. schema:
  6725. $ref: '#/definitions/model.VideoGenerationJobRequest'
  6726. - description: Optional Aiproxy-Channel header
  6727. in: header
  6728. name: Aiproxy-Channel
  6729. type: string
  6730. produces:
  6731. - application/json
  6732. responses:
  6733. "200":
  6734. description: OK
  6735. headers:
  6736. X-RateLimit-Limit-Requests:
  6737. description: X-RateLimit-Limit-Requests
  6738. type: integer
  6739. X-RateLimit-Limit-Tokens:
  6740. description: X-RateLimit-Limit-Tokens
  6741. type: integer
  6742. X-RateLimit-Remaining-Requests:
  6743. description: X-RateLimit-Remaining-Requests
  6744. type: integer
  6745. X-RateLimit-Remaining-Tokens:
  6746. description: X-RateLimit-Remaining-Tokens
  6747. type: integer
  6748. X-RateLimit-Reset-Requests:
  6749. description: X-RateLimit-Reset-Requests
  6750. type: string
  6751. X-RateLimit-Reset-Tokens:
  6752. description: X-RateLimit-Reset-Tokens
  6753. type: string
  6754. schema:
  6755. $ref: '#/definitions/model.VideoGenerationJob'
  6756. security:
  6757. - ApiKeyAuth: []
  6758. summary: VideoGenerationsGetJobs
  6759. tags:
  6760. - relay
  6761. securityDefinitions:
  6762. ApiKeyAuth:
  6763. in: header
  6764. name: Authorization
  6765. type: apiKey
  6766. swagger: "2.0"