docs.go 421 KB

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