swagger.json 421 KB

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