swagger.json 420 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308
  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/subscription": {
  7392. "get": {
  7393. "security": [
  7394. {
  7395. "ApiKeyAuth": []
  7396. }
  7397. ],
  7398. "description": "Get subscription",
  7399. "produces": [
  7400. "application/json"
  7401. ],
  7402. "tags": [
  7403. "relay"
  7404. ],
  7405. "summary": "Get subscription",
  7406. "responses": {
  7407. "200": {
  7408. "description": "OK",
  7409. "schema": {
  7410. "$ref": "#/definitions/openai.SubscriptionResponse"
  7411. }
  7412. }
  7413. }
  7414. }
  7415. },
  7416. "/v1/dashboard/billing/usage": {
  7417. "get": {
  7418. "security": [
  7419. {
  7420. "ApiKeyAuth": []
  7421. }
  7422. ],
  7423. "description": "Get usage",
  7424. "produces": [
  7425. "application/json"
  7426. ],
  7427. "tags": [
  7428. "relay"
  7429. ],
  7430. "summary": "Get usage",
  7431. "responses": {
  7432. "200": {
  7433. "description": "OK",
  7434. "schema": {
  7435. "$ref": "#/definitions/openai.UsageResponse"
  7436. }
  7437. }
  7438. }
  7439. }
  7440. },
  7441. "/v1/embeddings": {
  7442. "post": {
  7443. "security": [
  7444. {
  7445. "ApiKeyAuth": []
  7446. }
  7447. ],
  7448. "description": "Embeddings",
  7449. "produces": [
  7450. "application/json"
  7451. ],
  7452. "tags": [
  7453. "relay"
  7454. ],
  7455. "summary": "Embeddings",
  7456. "parameters": [
  7457. {
  7458. "description": "Request",
  7459. "name": "request",
  7460. "in": "body",
  7461. "required": true,
  7462. "schema": {
  7463. "$ref": "#/definitions/model.EmbeddingRequest"
  7464. }
  7465. },
  7466. {
  7467. "type": "string",
  7468. "description": "Optional Aiproxy-Channel header",
  7469. "name": "Aiproxy-Channel",
  7470. "in": "header"
  7471. }
  7472. ],
  7473. "responses": {
  7474. "200": {
  7475. "description": "OK",
  7476. "schema": {
  7477. "$ref": "#/definitions/model.EmbeddingResponse"
  7478. },
  7479. "headers": {
  7480. "X-RateLimit-Limit-Requests": {
  7481. "type": "integer",
  7482. "description": "X-RateLimit-Limit-Requests"
  7483. },
  7484. "X-RateLimit-Limit-Tokens": {
  7485. "type": "integer",
  7486. "description": "X-RateLimit-Limit-Tokens"
  7487. },
  7488. "X-RateLimit-Remaining-Requests": {
  7489. "type": "integer",
  7490. "description": "X-RateLimit-Remaining-Requests"
  7491. },
  7492. "X-RateLimit-Remaining-Tokens": {
  7493. "type": "integer",
  7494. "description": "X-RateLimit-Remaining-Tokens"
  7495. },
  7496. "X-RateLimit-Reset-Requests": {
  7497. "type": "string",
  7498. "description": "X-RateLimit-Reset-Requests"
  7499. },
  7500. "X-RateLimit-Reset-Tokens": {
  7501. "type": "string",
  7502. "description": "X-RateLimit-Reset-Tokens"
  7503. }
  7504. }
  7505. }
  7506. }
  7507. }
  7508. },
  7509. "/v1/images/edits": {
  7510. "post": {
  7511. "security": [
  7512. {
  7513. "ApiKeyAuth": []
  7514. }
  7515. ],
  7516. "description": "ImagesEdits",
  7517. "produces": [
  7518. "application/json"
  7519. ],
  7520. "tags": [
  7521. "relay"
  7522. ],
  7523. "summary": "ImagesEdits",
  7524. "parameters": [
  7525. {
  7526. "type": "string",
  7527. "description": "Prompt",
  7528. "name": "prompt",
  7529. "in": "formData",
  7530. "required": true
  7531. },
  7532. {
  7533. "type": "string",
  7534. "description": "Model",
  7535. "name": "model",
  7536. "in": "formData",
  7537. "required": true
  7538. },
  7539. {
  7540. "type": "file",
  7541. "description": "Images",
  7542. "name": "image",
  7543. "in": "formData",
  7544. "required": true
  7545. },
  7546. {
  7547. "type": "string",
  7548. "description": "Optional Aiproxy-Channel header",
  7549. "name": "Aiproxy-Channel",
  7550. "in": "header"
  7551. }
  7552. ],
  7553. "responses": {
  7554. "200": {
  7555. "description": "OK",
  7556. "schema": {
  7557. "$ref": "#/definitions/model.SttJSONResponse"
  7558. },
  7559. "headers": {
  7560. "X-RateLimit-Limit-Requests": {
  7561. "type": "integer",
  7562. "description": "X-RateLimit-Limit-Requests"
  7563. },
  7564. "X-RateLimit-Limit-Tokens": {
  7565. "type": "integer",
  7566. "description": "X-RateLimit-Limit-Tokens"
  7567. },
  7568. "X-RateLimit-Remaining-Requests": {
  7569. "type": "integer",
  7570. "description": "X-RateLimit-Remaining-Requests"
  7571. },
  7572. "X-RateLimit-Remaining-Tokens": {
  7573. "type": "integer",
  7574. "description": "X-RateLimit-Remaining-Tokens"
  7575. },
  7576. "X-RateLimit-Reset-Requests": {
  7577. "type": "string",
  7578. "description": "X-RateLimit-Reset-Requests"
  7579. },
  7580. "X-RateLimit-Reset-Tokens": {
  7581. "type": "string",
  7582. "description": "X-RateLimit-Reset-Tokens"
  7583. }
  7584. }
  7585. }
  7586. }
  7587. }
  7588. },
  7589. "/v1/images/generations": {
  7590. "post": {
  7591. "security": [
  7592. {
  7593. "ApiKeyAuth": []
  7594. }
  7595. ],
  7596. "description": "ImagesGenerations",
  7597. "produces": [
  7598. "application/json"
  7599. ],
  7600. "tags": [
  7601. "relay"
  7602. ],
  7603. "summary": "ImagesGenerations",
  7604. "parameters": [
  7605. {
  7606. "description": "Request",
  7607. "name": "request",
  7608. "in": "body",
  7609. "required": true,
  7610. "schema": {
  7611. "$ref": "#/definitions/model.ImageRequest"
  7612. }
  7613. },
  7614. {
  7615. "type": "string",
  7616. "description": "Optional Aiproxy-Channel header",
  7617. "name": "Aiproxy-Channel",
  7618. "in": "header"
  7619. }
  7620. ],
  7621. "responses": {
  7622. "200": {
  7623. "description": "OK",
  7624. "schema": {
  7625. "$ref": "#/definitions/model.ImageResponse"
  7626. },
  7627. "headers": {
  7628. "X-RateLimit-Limit-Requests": {
  7629. "type": "integer",
  7630. "description": "X-RateLimit-Limit-Requests"
  7631. },
  7632. "X-RateLimit-Limit-Tokens": {
  7633. "type": "integer",
  7634. "description": "X-RateLimit-Limit-Tokens"
  7635. },
  7636. "X-RateLimit-Remaining-Requests": {
  7637. "type": "integer",
  7638. "description": "X-RateLimit-Remaining-Requests"
  7639. },
  7640. "X-RateLimit-Remaining-Tokens": {
  7641. "type": "integer",
  7642. "description": "X-RateLimit-Remaining-Tokens"
  7643. },
  7644. "X-RateLimit-Reset-Requests": {
  7645. "type": "string",
  7646. "description": "X-RateLimit-Reset-Requests"
  7647. },
  7648. "X-RateLimit-Reset-Tokens": {
  7649. "type": "string",
  7650. "description": "X-RateLimit-Reset-Tokens"
  7651. }
  7652. }
  7653. }
  7654. }
  7655. }
  7656. },
  7657. "/v1/messages": {
  7658. "post": {
  7659. "security": [
  7660. {
  7661. "ApiKeyAuth": []
  7662. }
  7663. ],
  7664. "description": "Anthropic",
  7665. "produces": [
  7666. "application/json"
  7667. ],
  7668. "tags": [
  7669. "relay"
  7670. ],
  7671. "summary": "Anthropic",
  7672. "parameters": [
  7673. {
  7674. "description": "Request",
  7675. "name": "request",
  7676. "in": "body",
  7677. "required": true,
  7678. "schema": {
  7679. "$ref": "#/definitions/model.AnthropicMessageRequest"
  7680. }
  7681. },
  7682. {
  7683. "type": "string",
  7684. "description": "Optional Aiproxy-Channel header",
  7685. "name": "Aiproxy-Channel",
  7686. "in": "header"
  7687. }
  7688. ],
  7689. "responses": {
  7690. "200": {
  7691. "description": "OK",
  7692. "schema": {
  7693. "$ref": "#/definitions/model.TextResponse"
  7694. },
  7695. "headers": {
  7696. "X-RateLimit-Limit-Requests": {
  7697. "type": "integer",
  7698. "description": "X-RateLimit-Limit-Requests"
  7699. },
  7700. "X-RateLimit-Limit-Tokens": {
  7701. "type": "integer",
  7702. "description": "X-RateLimit-Limit-Tokens"
  7703. },
  7704. "X-RateLimit-Remaining-Requests": {
  7705. "type": "integer",
  7706. "description": "X-RateLimit-Remaining-Requests"
  7707. },
  7708. "X-RateLimit-Remaining-Tokens": {
  7709. "type": "integer",
  7710. "description": "X-RateLimit-Remaining-Tokens"
  7711. },
  7712. "X-RateLimit-Reset-Requests": {
  7713. "type": "string",
  7714. "description": "X-RateLimit-Reset-Requests"
  7715. },
  7716. "X-RateLimit-Reset-Tokens": {
  7717. "type": "string",
  7718. "description": "X-RateLimit-Reset-Tokens"
  7719. }
  7720. }
  7721. }
  7722. }
  7723. }
  7724. },
  7725. "/v1/models": {
  7726. "get": {
  7727. "security": [
  7728. {
  7729. "ApiKeyAuth": []
  7730. }
  7731. ],
  7732. "description": "List all models",
  7733. "produces": [
  7734. "application/json"
  7735. ],
  7736. "tags": [
  7737. "relay"
  7738. ],
  7739. "summary": "List models",
  7740. "responses": {
  7741. "200": {
  7742. "description": "OK",
  7743. "schema": {
  7744. "type": "object",
  7745. "properties": {
  7746. "data": {
  7747. "type": "array",
  7748. "items": {
  7749. "$ref": "#/definitions/controller.OpenAIModels"
  7750. }
  7751. },
  7752. "object": {
  7753. "type": "string"
  7754. }
  7755. }
  7756. }
  7757. }
  7758. }
  7759. }
  7760. },
  7761. "/v1/models/{model}": {
  7762. "get": {
  7763. "security": [
  7764. {
  7765. "ApiKeyAuth": []
  7766. }
  7767. ],
  7768. "description": "Retrieve a model",
  7769. "produces": [
  7770. "application/json"
  7771. ],
  7772. "tags": [
  7773. "relay"
  7774. ],
  7775. "summary": "Retrieve model",
  7776. "responses": {
  7777. "200": {
  7778. "description": "OK",
  7779. "schema": {
  7780. "$ref": "#/definitions/controller.OpenAIModels"
  7781. }
  7782. }
  7783. }
  7784. }
  7785. },
  7786. "/v1/parse/pdf": {
  7787. "post": {
  7788. "security": [
  7789. {
  7790. "ApiKeyAuth": []
  7791. }
  7792. ],
  7793. "description": "ParsePdf",
  7794. "produces": [
  7795. "application/json"
  7796. ],
  7797. "tags": [
  7798. "relay"
  7799. ],
  7800. "summary": "ParsePdf",
  7801. "parameters": [
  7802. {
  7803. "type": "string",
  7804. "description": "Model",
  7805. "name": "model",
  7806. "in": "formData",
  7807. "required": true
  7808. },
  7809. {
  7810. "type": "file",
  7811. "description": "File",
  7812. "name": "file",
  7813. "in": "formData",
  7814. "required": true
  7815. },
  7816. {
  7817. "type": "string",
  7818. "description": "Optional Aiproxy-Channel header",
  7819. "name": "Aiproxy-Channel",
  7820. "in": "header"
  7821. }
  7822. ],
  7823. "responses": {
  7824. "200": {
  7825. "description": "OK",
  7826. "schema": {
  7827. "$ref": "#/definitions/model.ParsePdfResponse"
  7828. },
  7829. "headers": {
  7830. "X-RateLimit-Limit-Requests": {
  7831. "type": "integer",
  7832. "description": "X-RateLimit-Limit-Requests"
  7833. },
  7834. "X-RateLimit-Limit-Tokens": {
  7835. "type": "integer",
  7836. "description": "X-RateLimit-Limit-Tokens"
  7837. },
  7838. "X-RateLimit-Remaining-Requests": {
  7839. "type": "integer",
  7840. "description": "X-RateLimit-Remaining-Requests"
  7841. },
  7842. "X-RateLimit-Remaining-Tokens": {
  7843. "type": "integer",
  7844. "description": "X-RateLimit-Remaining-Tokens"
  7845. },
  7846. "X-RateLimit-Reset-Requests": {
  7847. "type": "string",
  7848. "description": "X-RateLimit-Reset-Requests"
  7849. },
  7850. "X-RateLimit-Reset-Tokens": {
  7851. "type": "string",
  7852. "description": "X-RateLimit-Reset-Tokens"
  7853. }
  7854. }
  7855. }
  7856. }
  7857. }
  7858. },
  7859. "/v1/rerank": {
  7860. "post": {
  7861. "security": [
  7862. {
  7863. "ApiKeyAuth": []
  7864. }
  7865. ],
  7866. "description": "Rerank",
  7867. "produces": [
  7868. "application/json"
  7869. ],
  7870. "tags": [
  7871. "relay"
  7872. ],
  7873. "summary": "Rerank",
  7874. "parameters": [
  7875. {
  7876. "description": "Request",
  7877. "name": "request",
  7878. "in": "body",
  7879. "required": true,
  7880. "schema": {
  7881. "$ref": "#/definitions/model.RerankRequest"
  7882. }
  7883. },
  7884. {
  7885. "type": "string",
  7886. "description": "Optional Aiproxy-Channel header",
  7887. "name": "Aiproxy-Channel",
  7888. "in": "header"
  7889. }
  7890. ],
  7891. "responses": {
  7892. "200": {
  7893. "description": "OK",
  7894. "schema": {
  7895. "$ref": "#/definitions/model.RerankResponse"
  7896. },
  7897. "headers": {
  7898. "X-RateLimit-Limit-Requests": {
  7899. "type": "integer",
  7900. "description": "X-RateLimit-Limit-Requests"
  7901. },
  7902. "X-RateLimit-Limit-Tokens": {
  7903. "type": "integer",
  7904. "description": "X-RateLimit-Limit-Tokens"
  7905. },
  7906. "X-RateLimit-Remaining-Requests": {
  7907. "type": "integer",
  7908. "description": "X-RateLimit-Remaining-Requests"
  7909. },
  7910. "X-RateLimit-Remaining-Tokens": {
  7911. "type": "integer",
  7912. "description": "X-RateLimit-Remaining-Tokens"
  7913. },
  7914. "X-RateLimit-Reset-Requests": {
  7915. "type": "string",
  7916. "description": "X-RateLimit-Reset-Requests"
  7917. },
  7918. "X-RateLimit-Reset-Tokens": {
  7919. "type": "string",
  7920. "description": "X-RateLimit-Reset-Tokens"
  7921. }
  7922. }
  7923. }
  7924. }
  7925. }
  7926. },
  7927. "/v1/responses": {
  7928. "post": {
  7929. "security": [
  7930. {
  7931. "ApiKeyAuth": []
  7932. }
  7933. ],
  7934. "description": "Create a new response",
  7935. "produces": [
  7936. "application/json"
  7937. ],
  7938. "tags": [
  7939. "relay"
  7940. ],
  7941. "summary": "Create response",
  7942. "parameters": [
  7943. {
  7944. "description": "Request",
  7945. "name": "request",
  7946. "in": "body",
  7947. "required": true,
  7948. "schema": {
  7949. "$ref": "#/definitions/model.CreateResponseRequest"
  7950. }
  7951. },
  7952. {
  7953. "type": "string",
  7954. "description": "Optional Aiproxy-Channel header",
  7955. "name": "Aiproxy-Channel",
  7956. "in": "header"
  7957. }
  7958. ],
  7959. "responses": {
  7960. "200": {
  7961. "description": "OK",
  7962. "schema": {
  7963. "$ref": "#/definitions/model.Response"
  7964. },
  7965. "headers": {
  7966. "X-RateLimit-Limit-Requests": {
  7967. "type": "integer",
  7968. "description": "X-RateLimit-Limit-Requests"
  7969. },
  7970. "X-RateLimit-Limit-Tokens": {
  7971. "type": "integer",
  7972. "description": "X-RateLimit-Limit-Tokens"
  7973. },
  7974. "X-RateLimit-Remaining-Requests": {
  7975. "type": "integer",
  7976. "description": "X-RateLimit-Remaining-Requests"
  7977. },
  7978. "X-RateLimit-Remaining-Tokens": {
  7979. "type": "integer",
  7980. "description": "X-RateLimit-Remaining-Tokens"
  7981. },
  7982. "X-RateLimit-Reset-Requests": {
  7983. "type": "string",
  7984. "description": "X-RateLimit-Reset-Requests"
  7985. },
  7986. "X-RateLimit-Reset-Tokens": {
  7987. "type": "string",
  7988. "description": "X-RateLimit-Reset-Tokens"
  7989. }
  7990. }
  7991. }
  7992. }
  7993. }
  7994. },
  7995. "/v1/responses/{response_id}": {
  7996. "get": {
  7997. "security": [
  7998. {
  7999. "ApiKeyAuth": []
  8000. }
  8001. ],
  8002. "description": "Get a response by ID",
  8003. "produces": [
  8004. "application/json"
  8005. ],
  8006. "tags": [
  8007. "relay"
  8008. ],
  8009. "summary": "Get response",
  8010. "parameters": [
  8011. {
  8012. "type": "string",
  8013. "description": "Response ID",
  8014. "name": "response_id",
  8015. "in": "path",
  8016. "required": true
  8017. },
  8018. {
  8019. "type": "string",
  8020. "description": "Optional Aiproxy-Channel header",
  8021. "name": "Aiproxy-Channel",
  8022. "in": "header"
  8023. }
  8024. ],
  8025. "responses": {
  8026. "200": {
  8027. "description": "OK",
  8028. "schema": {
  8029. "$ref": "#/definitions/model.Response"
  8030. }
  8031. }
  8032. }
  8033. },
  8034. "delete": {
  8035. "security": [
  8036. {
  8037. "ApiKeyAuth": []
  8038. }
  8039. ],
  8040. "description": "Delete a response by ID",
  8041. "produces": [
  8042. "application/json"
  8043. ],
  8044. "tags": [
  8045. "relay"
  8046. ],
  8047. "summary": "Delete response",
  8048. "parameters": [
  8049. {
  8050. "type": "string",
  8051. "description": "Response ID",
  8052. "name": "response_id",
  8053. "in": "path",
  8054. "required": true
  8055. },
  8056. {
  8057. "type": "string",
  8058. "description": "Optional Aiproxy-Channel header",
  8059. "name": "Aiproxy-Channel",
  8060. "in": "header"
  8061. }
  8062. ],
  8063. "responses": {
  8064. "204": {
  8065. "description": "No Content"
  8066. }
  8067. }
  8068. }
  8069. },
  8070. "/v1/responses/{response_id}/cancel": {
  8071. "post": {
  8072. "security": [
  8073. {
  8074. "ApiKeyAuth": []
  8075. }
  8076. ],
  8077. "description": "Cancel a response by ID",
  8078. "produces": [
  8079. "application/json"
  8080. ],
  8081. "tags": [
  8082. "relay"
  8083. ],
  8084. "summary": "Cancel response",
  8085. "parameters": [
  8086. {
  8087. "type": "string",
  8088. "description": "Response ID",
  8089. "name": "response_id",
  8090. "in": "path",
  8091. "required": true
  8092. },
  8093. {
  8094. "type": "string",
  8095. "description": "Optional Aiproxy-Channel header",
  8096. "name": "Aiproxy-Channel",
  8097. "in": "header"
  8098. }
  8099. ],
  8100. "responses": {
  8101. "200": {
  8102. "description": "OK",
  8103. "schema": {
  8104. "$ref": "#/definitions/model.Response"
  8105. }
  8106. }
  8107. }
  8108. }
  8109. },
  8110. "/v1/responses/{response_id}/input_items": {
  8111. "get": {
  8112. "security": [
  8113. {
  8114. "ApiKeyAuth": []
  8115. }
  8116. ],
  8117. "description": "Get input items for a response",
  8118. "produces": [
  8119. "application/json"
  8120. ],
  8121. "tags": [
  8122. "relay"
  8123. ],
  8124. "summary": "Get response input items",
  8125. "parameters": [
  8126. {
  8127. "type": "string",
  8128. "description": "Response ID",
  8129. "name": "response_id",
  8130. "in": "path",
  8131. "required": true
  8132. },
  8133. {
  8134. "type": "string",
  8135. "description": "Optional Aiproxy-Channel header",
  8136. "name": "Aiproxy-Channel",
  8137. "in": "header"
  8138. }
  8139. ],
  8140. "responses": {
  8141. "200": {
  8142. "description": "OK",
  8143. "schema": {
  8144. "$ref": "#/definitions/model.InputItemList"
  8145. }
  8146. }
  8147. }
  8148. }
  8149. },
  8150. "/v1/video/generations/jobs": {
  8151. "post": {
  8152. "security": [
  8153. {
  8154. "ApiKeyAuth": []
  8155. }
  8156. ],
  8157. "description": "VideoGenerationsJobs",
  8158. "produces": [
  8159. "application/json"
  8160. ],
  8161. "tags": [
  8162. "relay"
  8163. ],
  8164. "summary": "VideoGenerationsJobs",
  8165. "parameters": [
  8166. {
  8167. "description": "Request",
  8168. "name": "request",
  8169. "in": "body",
  8170. "required": true,
  8171. "schema": {
  8172. "$ref": "#/definitions/model.VideoGenerationJobRequest"
  8173. }
  8174. },
  8175. {
  8176. "type": "string",
  8177. "description": "Optional Aiproxy-Channel header",
  8178. "name": "Aiproxy-Channel",
  8179. "in": "header"
  8180. }
  8181. ],
  8182. "responses": {
  8183. "200": {
  8184. "description": "OK",
  8185. "schema": {
  8186. "$ref": "#/definitions/model.VideoGenerationJob"
  8187. },
  8188. "headers": {
  8189. "X-RateLimit-Limit-Requests": {
  8190. "type": "integer",
  8191. "description": "X-RateLimit-Limit-Requests"
  8192. },
  8193. "X-RateLimit-Limit-Tokens": {
  8194. "type": "integer",
  8195. "description": "X-RateLimit-Limit-Tokens"
  8196. },
  8197. "X-RateLimit-Remaining-Requests": {
  8198. "type": "integer",
  8199. "description": "X-RateLimit-Remaining-Requests"
  8200. },
  8201. "X-RateLimit-Remaining-Tokens": {
  8202. "type": "integer",
  8203. "description": "X-RateLimit-Remaining-Tokens"
  8204. },
  8205. "X-RateLimit-Reset-Requests": {
  8206. "type": "string",
  8207. "description": "X-RateLimit-Reset-Requests"
  8208. },
  8209. "X-RateLimit-Reset-Tokens": {
  8210. "type": "string",
  8211. "description": "X-RateLimit-Reset-Tokens"
  8212. }
  8213. }
  8214. }
  8215. }
  8216. }
  8217. },
  8218. "/v1/video/generations/jobs/{id}": {
  8219. "get": {
  8220. "security": [
  8221. {
  8222. "ApiKeyAuth": []
  8223. }
  8224. ],
  8225. "description": "VideoGenerationsGetJobs",
  8226. "produces": [
  8227. "application/json"
  8228. ],
  8229. "tags": [
  8230. "relay"
  8231. ],
  8232. "summary": "VideoGenerationsGetJobs",
  8233. "parameters": [
  8234. {
  8235. "description": "Request",
  8236. "name": "request",
  8237. "in": "body",
  8238. "required": true,
  8239. "schema": {
  8240. "$ref": "#/definitions/model.VideoGenerationJobRequest"
  8241. }
  8242. },
  8243. {
  8244. "type": "string",
  8245. "description": "Optional Aiproxy-Channel header",
  8246. "name": "Aiproxy-Channel",
  8247. "in": "header"
  8248. }
  8249. ],
  8250. "responses": {
  8251. "200": {
  8252. "description": "OK",
  8253. "schema": {
  8254. "$ref": "#/definitions/model.VideoGenerationJob"
  8255. },
  8256. "headers": {
  8257. "X-RateLimit-Limit-Requests": {
  8258. "type": "integer",
  8259. "description": "X-RateLimit-Limit-Requests"
  8260. },
  8261. "X-RateLimit-Limit-Tokens": {
  8262. "type": "integer",
  8263. "description": "X-RateLimit-Limit-Tokens"
  8264. },
  8265. "X-RateLimit-Remaining-Requests": {
  8266. "type": "integer",
  8267. "description": "X-RateLimit-Remaining-Requests"
  8268. },
  8269. "X-RateLimit-Remaining-Tokens": {
  8270. "type": "integer",
  8271. "description": "X-RateLimit-Remaining-Tokens"
  8272. },
  8273. "X-RateLimit-Reset-Requests": {
  8274. "type": "string",
  8275. "description": "X-RateLimit-Reset-Requests"
  8276. },
  8277. "X-RateLimit-Reset-Tokens": {
  8278. "type": "string",
  8279. "description": "X-RateLimit-Reset-Tokens"
  8280. }
  8281. }
  8282. }
  8283. }
  8284. }
  8285. },
  8286. "/v1/video/generations/{id}/content/video": {
  8287. "get": {
  8288. "security": [
  8289. {
  8290. "ApiKeyAuth": []
  8291. }
  8292. ],
  8293. "description": "VideoGenerationsContent",
  8294. "produces": [
  8295. "application/json"
  8296. ],
  8297. "tags": [
  8298. "relay"
  8299. ],
  8300. "summary": "VideoGenerationsContent",
  8301. "parameters": [
  8302. {
  8303. "description": "Request",
  8304. "name": "request",
  8305. "in": "body",
  8306. "required": true,
  8307. "schema": {
  8308. "$ref": "#/definitions/model.VideoGenerationJobRequest"
  8309. }
  8310. },
  8311. {
  8312. "type": "string",
  8313. "description": "Optional Aiproxy-Channel header",
  8314. "name": "Aiproxy-Channel",
  8315. "in": "header"
  8316. }
  8317. ],
  8318. "responses": {
  8319. "200": {
  8320. "description": "video binary",
  8321. "schema": {
  8322. "type": "file"
  8323. },
  8324. "headers": {
  8325. "X-RateLimit-Limit-Requests": {
  8326. "type": "integer",
  8327. "description": "X-RateLimit-Limit-Requests"
  8328. },
  8329. "X-RateLimit-Limit-Tokens": {
  8330. "type": "integer",
  8331. "description": "X-RateLimit-Limit-Tokens"
  8332. },
  8333. "X-RateLimit-Remaining-Requests": {
  8334. "type": "integer",
  8335. "description": "X-RateLimit-Remaining-Requests"
  8336. },
  8337. "X-RateLimit-Remaining-Tokens": {
  8338. "type": "integer",
  8339. "description": "X-RateLimit-Remaining-Tokens"
  8340. },
  8341. "X-RateLimit-Reset-Requests": {
  8342. "type": "string",
  8343. "description": "X-RateLimit-Reset-Requests"
  8344. },
  8345. "X-RateLimit-Reset-Tokens": {
  8346. "type": "string",
  8347. "description": "X-RateLimit-Reset-Tokens"
  8348. }
  8349. }
  8350. }
  8351. }
  8352. }
  8353. }
  8354. },
  8355. "definitions": {
  8356. "adaptor.ConfigTemplate": {
  8357. "type": "object",
  8358. "properties": {
  8359. "description": {
  8360. "type": "string"
  8361. },
  8362. "example": {},
  8363. "name": {
  8364. "type": "string"
  8365. },
  8366. "required": {
  8367. "type": "boolean"
  8368. },
  8369. "type": {
  8370. "$ref": "#/definitions/adaptor.ConfigType"
  8371. }
  8372. }
  8373. },
  8374. "adaptor.ConfigTemplates": {
  8375. "type": "object",
  8376. "additionalProperties": {
  8377. "$ref": "#/definitions/adaptor.ConfigTemplate"
  8378. }
  8379. },
  8380. "adaptor.ConfigType": {
  8381. "type": "string",
  8382. "enum": [
  8383. "string",
  8384. "number",
  8385. "bool",
  8386. "object"
  8387. ],
  8388. "x-enum-varnames": [
  8389. "ConfigTypeString",
  8390. "ConfigTypeNumber",
  8391. "ConfigTypeBool",
  8392. "ConfigTypeObject"
  8393. ]
  8394. },
  8395. "adaptors.AdaptorMeta": {
  8396. "type": "object",
  8397. "properties": {
  8398. "config": {
  8399. "$ref": "#/definitions/adaptor.ConfigTemplates"
  8400. },
  8401. "defaultBaseUrl": {
  8402. "type": "string"
  8403. },
  8404. "fetures": {
  8405. "type": "array",
  8406. "items": {
  8407. "type": "string"
  8408. }
  8409. },
  8410. "keyHelp": {
  8411. "type": "string"
  8412. },
  8413. "name": {
  8414. "type": "string"
  8415. }
  8416. }
  8417. },
  8418. "controller.AddChannelRequest": {
  8419. "type": "object",
  8420. "properties": {
  8421. "base_url": {
  8422. "type": "string"
  8423. },
  8424. "config": {
  8425. "$ref": "#/definitions/model.ChannelConfig"
  8426. },
  8427. "key": {
  8428. "type": "string"
  8429. },
  8430. "model_mapping": {
  8431. "type": "object",
  8432. "additionalProperties": {
  8433. "type": "string"
  8434. }
  8435. },
  8436. "models": {
  8437. "type": "array",
  8438. "items": {
  8439. "type": "string"
  8440. }
  8441. },
  8442. "name": {
  8443. "type": "string"
  8444. },
  8445. "priority": {
  8446. "type": "integer"
  8447. },
  8448. "sets": {
  8449. "type": "array",
  8450. "items": {
  8451. "type": "string"
  8452. }
  8453. },
  8454. "status": {
  8455. "type": "integer"
  8456. },
  8457. "type": {
  8458. "$ref": "#/definitions/model.ChannelType"
  8459. }
  8460. }
  8461. },
  8462. "controller.AddTokenRequest": {
  8463. "type": "object",
  8464. "properties": {
  8465. "models": {
  8466. "type": "array",
  8467. "items": {
  8468. "type": "string"
  8469. }
  8470. },
  8471. "name": {
  8472. "type": "string"
  8473. },
  8474. "quota": {
  8475. "type": "number"
  8476. },
  8477. "subnets": {
  8478. "type": "array",
  8479. "items": {
  8480. "type": "string"
  8481. }
  8482. }
  8483. }
  8484. },
  8485. "controller.BuiltinModelConfig": {
  8486. "type": "object",
  8487. "properties": {
  8488. "config": {
  8489. "type": "object",
  8490. "additionalProperties": {}
  8491. },
  8492. "created_at": {
  8493. "type": "string"
  8494. },
  8495. "exclude_from_tests": {
  8496. "type": "boolean"
  8497. },
  8498. "force_save_detail": {
  8499. "type": "boolean"
  8500. },
  8501. "image_prices": {
  8502. "description": "map[size]price_per_image",
  8503. "type": "object",
  8504. "additionalProperties": {
  8505. "type": "number",
  8506. "format": "float64"
  8507. }
  8508. },
  8509. "image_quality_prices": {
  8510. "description": "map[size]map[quality]price_per_image",
  8511. "type": "object",
  8512. "additionalProperties": {
  8513. "type": "object",
  8514. "additionalProperties": {
  8515. "type": "number",
  8516. "format": "float64"
  8517. }
  8518. }
  8519. },
  8520. "max_error_rate": {
  8521. "type": "number"
  8522. },
  8523. "model": {
  8524. "type": "string"
  8525. },
  8526. "owner": {
  8527. "$ref": "#/definitions/model.ModelOwner"
  8528. },
  8529. "plugin": {
  8530. "type": "object",
  8531. "additionalProperties": {
  8532. "type": "array",
  8533. "items": {
  8534. "type": "integer"
  8535. }
  8536. }
  8537. },
  8538. "price": {
  8539. "$ref": "#/definitions/model.Price"
  8540. },
  8541. "retry_times": {
  8542. "type": "integer"
  8543. },
  8544. "rpm": {
  8545. "type": "integer"
  8546. },
  8547. "timeout_config": {
  8548. "$ref": "#/definitions/model.TimeoutConfig"
  8549. },
  8550. "tpm": {
  8551. "type": "integer"
  8552. },
  8553. "type": {
  8554. "$ref": "#/definitions/mode.Mode"
  8555. },
  8556. "updated_at": {
  8557. "type": "string"
  8558. },
  8559. "warn_error_rate": {
  8560. "type": "number"
  8561. }
  8562. }
  8563. },
  8564. "controller.CreateGroupRequest": {
  8565. "type": "object",
  8566. "properties": {
  8567. "available_sets": {
  8568. "type": "array",
  8569. "items": {
  8570. "type": "string"
  8571. }
  8572. },
  8573. "balance_alert_enabled": {
  8574. "type": "boolean"
  8575. },
  8576. "balance_alert_threshold": {
  8577. "type": "number"
  8578. },
  8579. "rpm_ratio": {
  8580. "type": "number"
  8581. },
  8582. "tpm_ratio": {
  8583. "type": "number"
  8584. }
  8585. }
  8586. },
  8587. "controller.EmbedMCP": {
  8588. "type": "object",
  8589. "properties": {
  8590. "config_templates": {
  8591. "$ref": "#/definitions/controller.EmbedMCPConfigTemplates"
  8592. },
  8593. "embed_config": {
  8594. "$ref": "#/definitions/model.MCPEmbeddingConfig"
  8595. },
  8596. "enabled": {
  8597. "type": "boolean"
  8598. },
  8599. "github_url": {
  8600. "type": "string"
  8601. },
  8602. "id": {
  8603. "type": "string"
  8604. },
  8605. "name": {
  8606. "type": "string"
  8607. },
  8608. "name_cn": {
  8609. "type": "string"
  8610. },
  8611. "readme": {
  8612. "type": "string"
  8613. },
  8614. "readme_cn": {
  8615. "type": "string"
  8616. },
  8617. "readme_cn_url": {
  8618. "type": "string"
  8619. },
  8620. "readme_url": {
  8621. "type": "string"
  8622. },
  8623. "tags": {
  8624. "type": "array",
  8625. "items": {
  8626. "type": "string"
  8627. }
  8628. }
  8629. }
  8630. },
  8631. "controller.EmbedMCPConfigTemplate": {
  8632. "type": "object",
  8633. "properties": {
  8634. "description": {
  8635. "type": "string"
  8636. },
  8637. "example": {
  8638. "type": "string"
  8639. },
  8640. "name": {
  8641. "type": "string"
  8642. },
  8643. "required": {
  8644. "type": "boolean"
  8645. }
  8646. }
  8647. },
  8648. "controller.EmbedMCPConfigTemplates": {
  8649. "type": "object",
  8650. "additionalProperties": {
  8651. "$ref": "#/definitions/controller.EmbedMCPConfigTemplate"
  8652. }
  8653. },
  8654. "controller.EnabledModelChannel": {
  8655. "type": "object",
  8656. "properties": {
  8657. "id": {
  8658. "type": "integer"
  8659. },
  8660. "name": {
  8661. "type": "string"
  8662. },
  8663. "type": {
  8664. "$ref": "#/definitions/model.ChannelType"
  8665. }
  8666. }
  8667. },
  8668. "controller.GetModelConfigsByModelsContainsRequest": {
  8669. "type": "object",
  8670. "properties": {
  8671. "models": {
  8672. "type": "array",
  8673. "items": {
  8674. "type": "string"
  8675. }
  8676. }
  8677. }
  8678. },
  8679. "controller.GroupMCPResponse": {
  8680. "type": "object",
  8681. "properties": {
  8682. "created_at": {
  8683. "type": "string"
  8684. },
  8685. "description": {
  8686. "type": "string"
  8687. },
  8688. "endpoints": {
  8689. "$ref": "#/definitions/controller.MCPEndpoint"
  8690. },
  8691. "group_id": {
  8692. "type": "string"
  8693. },
  8694. "id": {
  8695. "type": "string"
  8696. },
  8697. "name": {
  8698. "type": "string"
  8699. },
  8700. "openapi_config": {
  8701. "$ref": "#/definitions/model.MCPOpenAPIConfig"
  8702. },
  8703. "proxy_config": {
  8704. "$ref": "#/definitions/model.GroupMCPProxyConfig"
  8705. },
  8706. "status": {
  8707. "$ref": "#/definitions/model.GroupMCPStatus"
  8708. },
  8709. "type": {
  8710. "$ref": "#/definitions/model.GroupMCPType"
  8711. },
  8712. "update_at": {
  8713. "type": "string"
  8714. }
  8715. }
  8716. },
  8717. "controller.GroupModel": {
  8718. "type": "object",
  8719. "properties": {
  8720. "config": {
  8721. "type": "object",
  8722. "additionalProperties": {}
  8723. },
  8724. "created_at": {
  8725. "type": "integer"
  8726. },
  8727. "enabled_plugins": {
  8728. "type": "array",
  8729. "items": {
  8730. "type": "string"
  8731. }
  8732. },
  8733. "image_prices": {
  8734. "description": "map[size]price_per_image",
  8735. "type": "object",
  8736. "additionalProperties": {
  8737. "type": "number",
  8738. "format": "float64"
  8739. }
  8740. },
  8741. "image_quality_prices": {
  8742. "description": "map[size]map[quality]price_per_image",
  8743. "type": "object",
  8744. "additionalProperties": {
  8745. "type": "object",
  8746. "additionalProperties": {
  8747. "type": "number",
  8748. "format": "float64"
  8749. }
  8750. }
  8751. },
  8752. "model": {
  8753. "type": "string"
  8754. },
  8755. "owner": {
  8756. "$ref": "#/definitions/model.ModelOwner"
  8757. },
  8758. "price": {
  8759. "$ref": "#/definitions/model.Price"
  8760. },
  8761. "rpm": {
  8762. "type": "integer"
  8763. },
  8764. "tpm": {
  8765. "type": "integer"
  8766. },
  8767. "type": {
  8768. "$ref": "#/definitions/mode.Mode"
  8769. },
  8770. "updated_at": {
  8771. "type": "integer"
  8772. }
  8773. }
  8774. },
  8775. "controller.GroupPublicMCPDetailResponse": {
  8776. "type": "object",
  8777. "properties": {
  8778. "created_at": {
  8779. "type": "string"
  8780. },
  8781. "description": {
  8782. "type": "string"
  8783. },
  8784. "description_cn": {
  8785. "type": "string"
  8786. },
  8787. "embed_config": {
  8788. "$ref": "#/definitions/model.MCPEmbeddingConfig"
  8789. },
  8790. "endpoints": {
  8791. "$ref": "#/definitions/controller.MCPEndpoint"
  8792. },
  8793. "github_url": {
  8794. "type": "string"
  8795. },
  8796. "hosted": {
  8797. "type": "boolean"
  8798. },
  8799. "id": {
  8800. "type": "string"
  8801. },
  8802. "logo_url": {
  8803. "type": "string"
  8804. },
  8805. "name": {
  8806. "type": "string"
  8807. },
  8808. "name_cn": {
  8809. "type": "string"
  8810. },
  8811. "openapi_config": {
  8812. "$ref": "#/definitions/model.MCPOpenAPIConfig"
  8813. },
  8814. "params": {
  8815. "type": "object",
  8816. "additionalProperties": {
  8817. "type": "string"
  8818. }
  8819. },
  8820. "price": {
  8821. "$ref": "#/definitions/model.MCPPrice"
  8822. },
  8823. "proxy_config": {
  8824. "$ref": "#/definitions/model.PublicMCPProxyConfig"
  8825. },
  8826. "readme": {
  8827. "type": "string"
  8828. },
  8829. "readme_cn": {
  8830. "type": "string"
  8831. },
  8832. "readme_cn_url": {
  8833. "type": "string"
  8834. },
  8835. "readme_url": {
  8836. "type": "string"
  8837. },
  8838. "reusing": {
  8839. "type": "object",
  8840. "additionalProperties": {
  8841. "$ref": "#/definitions/model.ReusingParam"
  8842. }
  8843. },
  8844. "status": {
  8845. "$ref": "#/definitions/model.PublicMCPStatus"
  8846. },
  8847. "tags": {
  8848. "type": "array",
  8849. "items": {
  8850. "type": "string"
  8851. }
  8852. },
  8853. "test_config": {
  8854. "description": "only used by list tools",
  8855. "allOf": [
  8856. {
  8857. "$ref": "#/definitions/model.TestConfig"
  8858. }
  8859. ]
  8860. },
  8861. "tools": {
  8862. "type": "array",
  8863. "items": {
  8864. "$ref": "#/definitions/mcp.Tool"
  8865. }
  8866. },
  8867. "type": {
  8868. "$ref": "#/definitions/model.PublicMCPType"
  8869. },
  8870. "update_at": {
  8871. "type": "string"
  8872. }
  8873. }
  8874. },
  8875. "controller.GroupPublicMCPResponse": {
  8876. "type": "object",
  8877. "properties": {
  8878. "created_at": {
  8879. "type": "string"
  8880. },
  8881. "description": {
  8882. "type": "string"
  8883. },
  8884. "description_cn": {
  8885. "type": "string"
  8886. },
  8887. "embed_config": {
  8888. "$ref": "#/definitions/model.MCPEmbeddingConfig"
  8889. },
  8890. "github_url": {
  8891. "type": "string"
  8892. },
  8893. "hosted": {
  8894. "type": "boolean"
  8895. },
  8896. "id": {
  8897. "type": "string"
  8898. },
  8899. "logo_url": {
  8900. "type": "string"
  8901. },
  8902. "name": {
  8903. "type": "string"
  8904. },
  8905. "name_cn": {
  8906. "type": "string"
  8907. },
  8908. "openapi_config": {
  8909. "$ref": "#/definitions/model.MCPOpenAPIConfig"
  8910. },
  8911. "price": {
  8912. "$ref": "#/definitions/model.MCPPrice"
  8913. },
  8914. "proxy_config": {
  8915. "$ref": "#/definitions/model.PublicMCPProxyConfig"
  8916. },
  8917. "readme": {
  8918. "type": "string"
  8919. },
  8920. "readme_cn": {
  8921. "type": "string"
  8922. },
  8923. "readme_cn_url": {
  8924. "type": "string"
  8925. },
  8926. "readme_url": {
  8927. "type": "string"
  8928. },
  8929. "status": {
  8930. "$ref": "#/definitions/model.PublicMCPStatus"
  8931. },
  8932. "tags": {
  8933. "type": "array",
  8934. "items": {
  8935. "type": "string"
  8936. }
  8937. },
  8938. "test_config": {
  8939. "description": "only used by list tools",
  8940. "allOf": [
  8941. {
  8942. "$ref": "#/definitions/model.TestConfig"
  8943. }
  8944. ]
  8945. },
  8946. "type": {
  8947. "$ref": "#/definitions/model.PublicMCPType"
  8948. },
  8949. "update_at": {
  8950. "type": "string"
  8951. }
  8952. }
  8953. },
  8954. "controller.GroupResponse": {
  8955. "type": "object",
  8956. "properties": {
  8957. "accessed_at": {
  8958. "type": "string"
  8959. },
  8960. "available_sets": {
  8961. "type": "array",
  8962. "items": {
  8963. "type": "string"
  8964. }
  8965. },
  8966. "balance_alert_enabled": {
  8967. "type": "boolean"
  8968. },
  8969. "balance_alert_threshold": {
  8970. "type": "number"
  8971. },
  8972. "created_at": {
  8973. "type": "string"
  8974. },
  8975. "id": {
  8976. "type": "string"
  8977. },
  8978. "request_count": {
  8979. "type": "integer"
  8980. },
  8981. "rpm_ratio": {
  8982. "type": "number"
  8983. },
  8984. "status": {
  8985. "type": "integer"
  8986. },
  8987. "tpm_ratio": {
  8988. "type": "number"
  8989. },
  8990. "used_amount": {
  8991. "type": "number"
  8992. }
  8993. }
  8994. },
  8995. "controller.ImportChannelFromOneAPIRequest": {
  8996. "type": "object",
  8997. "properties": {
  8998. "dsn": {
  8999. "type": "string"
  9000. }
  9001. }
  9002. },
  9003. "controller.MCPEndpoint": {
  9004. "type": "object",
  9005. "properties": {
  9006. "host": {
  9007. "type": "string"
  9008. },
  9009. "sse": {
  9010. "type": "string"
  9011. },
  9012. "streamable_http": {
  9013. "type": "string"
  9014. }
  9015. }
  9016. },
  9017. "controller.OpenAIModelPermission": {
  9018. "type": "object",
  9019. "properties": {
  9020. "allow_create_engine": {
  9021. "type": "boolean"
  9022. },
  9023. "allow_fine_tuning": {
  9024. "type": "boolean"
  9025. },
  9026. "allow_logprobs": {
  9027. "type": "boolean"
  9028. },
  9029. "allow_sampling": {
  9030. "type": "boolean"
  9031. },
  9032. "allow_search_indices": {
  9033. "type": "boolean"
  9034. },
  9035. "allow_view": {
  9036. "type": "boolean"
  9037. },
  9038. "created": {
  9039. "type": "integer"
  9040. },
  9041. "group": {
  9042. "type": "string"
  9043. },
  9044. "id": {
  9045. "type": "string"
  9046. },
  9047. "is_blocking": {
  9048. "type": "boolean"
  9049. },
  9050. "object": {
  9051. "type": "string"
  9052. },
  9053. "organization": {
  9054. "type": "string"
  9055. }
  9056. }
  9057. },
  9058. "controller.OpenAIModels": {
  9059. "type": "object",
  9060. "properties": {
  9061. "created": {
  9062. "type": "integer"
  9063. },
  9064. "id": {
  9065. "type": "string"
  9066. },
  9067. "object": {
  9068. "type": "string"
  9069. },
  9070. "owned_by": {
  9071. "type": "string"
  9072. },
  9073. "parent": {
  9074. "type": "string"
  9075. },
  9076. "permission": {
  9077. "type": "array",
  9078. "items": {
  9079. "$ref": "#/definitions/controller.OpenAIModelPermission"
  9080. }
  9081. },
  9082. "root": {
  9083. "type": "string"
  9084. }
  9085. }
  9086. },
  9087. "controller.PublicMCPResponse": {
  9088. "type": "object",
  9089. "properties": {
  9090. "created_at": {
  9091. "type": "string"
  9092. },
  9093. "description": {
  9094. "type": "string"
  9095. },
  9096. "description_cn": {
  9097. "type": "string"
  9098. },
  9099. "embed_config": {
  9100. "$ref": "#/definitions/model.MCPEmbeddingConfig"
  9101. },
  9102. "endpoints": {
  9103. "$ref": "#/definitions/controller.MCPEndpoint"
  9104. },
  9105. "github_url": {
  9106. "type": "string"
  9107. },
  9108. "id": {
  9109. "type": "string"
  9110. },
  9111. "logo_url": {
  9112. "type": "string"
  9113. },
  9114. "name": {
  9115. "type": "string"
  9116. },
  9117. "name_cn": {
  9118. "type": "string"
  9119. },
  9120. "openapi_config": {
  9121. "$ref": "#/definitions/model.MCPOpenAPIConfig"
  9122. },
  9123. "price": {
  9124. "$ref": "#/definitions/model.MCPPrice"
  9125. },
  9126. "proxy_config": {
  9127. "$ref": "#/definitions/model.PublicMCPProxyConfig"
  9128. },
  9129. "readme": {
  9130. "type": "string"
  9131. },
  9132. "readme_cn": {
  9133. "type": "string"
  9134. },
  9135. "readme_cn_url": {
  9136. "type": "string"
  9137. },
  9138. "readme_url": {
  9139. "type": "string"
  9140. },
  9141. "status": {
  9142. "$ref": "#/definitions/model.PublicMCPStatus"
  9143. },
  9144. "tags": {
  9145. "type": "array",
  9146. "items": {
  9147. "type": "string"
  9148. }
  9149. },
  9150. "test_config": {
  9151. "description": "only used by list tools",
  9152. "allOf": [
  9153. {
  9154. "$ref": "#/definitions/model.TestConfig"
  9155. }
  9156. ]
  9157. },
  9158. "type": {
  9159. "$ref": "#/definitions/model.PublicMCPType"
  9160. },
  9161. "update_at": {
  9162. "type": "string"
  9163. }
  9164. }
  9165. },
  9166. "controller.SaveEmbedMCPRequest": {
  9167. "type": "object",
  9168. "properties": {
  9169. "enabled": {
  9170. "type": "boolean"
  9171. },
  9172. "id": {
  9173. "type": "string"
  9174. },
  9175. "init_config": {
  9176. "type": "object",
  9177. "additionalProperties": {
  9178. "type": "string"
  9179. }
  9180. }
  9181. }
  9182. },
  9183. "controller.SaveGroupModelConfigRequest": {
  9184. "type": "object",
  9185. "properties": {
  9186. "force_save_detail": {
  9187. "type": "boolean"
  9188. },
  9189. "image_prices": {
  9190. "type": "object",
  9191. "additionalProperties": {
  9192. "type": "number",
  9193. "format": "float64"
  9194. }
  9195. },
  9196. "model": {
  9197. "type": "string"
  9198. },
  9199. "override_force_save_detail": {
  9200. "type": "boolean"
  9201. },
  9202. "override_limit": {
  9203. "type": "boolean"
  9204. },
  9205. "override_price": {
  9206. "type": "boolean"
  9207. },
  9208. "override_retry_times": {
  9209. "type": "boolean"
  9210. },
  9211. "price": {
  9212. "$ref": "#/definitions/model.Price"
  9213. },
  9214. "retry_times": {
  9215. "type": "integer"
  9216. },
  9217. "rpm": {
  9218. "type": "integer"
  9219. },
  9220. "tpm": {
  9221. "type": "integer"
  9222. }
  9223. }
  9224. },
  9225. "controller.SaveModelConfigsRequest": {
  9226. "type": "object",
  9227. "properties": {
  9228. "config": {
  9229. "type": "object",
  9230. "additionalProperties": {}
  9231. },
  9232. "created_at": {
  9233. "type": "string"
  9234. },
  9235. "exclude_from_tests": {
  9236. "type": "boolean"
  9237. },
  9238. "force_save_detail": {
  9239. "type": "boolean"
  9240. },
  9241. "image_prices": {
  9242. "description": "map[size]price_per_image",
  9243. "type": "object",
  9244. "additionalProperties": {
  9245. "type": "number",
  9246. "format": "float64"
  9247. }
  9248. },
  9249. "image_quality_prices": {
  9250. "description": "map[size]map[quality]price_per_image",
  9251. "type": "object",
  9252. "additionalProperties": {
  9253. "type": "object",
  9254. "additionalProperties": {
  9255. "type": "number",
  9256. "format": "float64"
  9257. }
  9258. }
  9259. },
  9260. "max_error_rate": {
  9261. "type": "number"
  9262. },
  9263. "model": {
  9264. "type": "string"
  9265. },
  9266. "owner": {
  9267. "$ref": "#/definitions/model.ModelOwner"
  9268. },
  9269. "plugin": {
  9270. "type": "object",
  9271. "additionalProperties": {
  9272. "type": "array",
  9273. "items": {
  9274. "type": "integer"
  9275. }
  9276. }
  9277. },
  9278. "price": {
  9279. "$ref": "#/definitions/model.Price"
  9280. },
  9281. "retry_times": {
  9282. "type": "integer"
  9283. },
  9284. "rpm": {
  9285. "type": "integer"
  9286. },
  9287. "timeout_config": {
  9288. "$ref": "#/definitions/model.TimeoutConfig"
  9289. },
  9290. "tpm": {
  9291. "type": "integer"
  9292. },
  9293. "type": {
  9294. "$ref": "#/definitions/mode.Mode"
  9295. },
  9296. "updated_at": {
  9297. "type": "string"
  9298. },
  9299. "warn_error_rate": {
  9300. "type": "number"
  9301. }
  9302. }
  9303. },
  9304. "controller.StatusData": {
  9305. "type": "object",
  9306. "properties": {
  9307. "startTime": {
  9308. "type": "integer"
  9309. }
  9310. }
  9311. },
  9312. "controller.TestResult": {
  9313. "type": "object",
  9314. "properties": {
  9315. "data": {
  9316. "$ref": "#/definitions/model.ChannelTest"
  9317. },
  9318. "message": {
  9319. "type": "string"
  9320. },
  9321. "success": {
  9322. "type": "boolean"
  9323. }
  9324. }
  9325. },
  9326. "controller.TokenResponse": {
  9327. "type": "object",
  9328. "properties": {
  9329. "accessed_at": {
  9330. "type": "string"
  9331. },
  9332. "created_at": {
  9333. "type": "string"
  9334. },
  9335. "group": {
  9336. "type": "string"
  9337. },
  9338. "id": {
  9339. "type": "integer"
  9340. },
  9341. "key": {
  9342. "type": "string"
  9343. },
  9344. "models": {
  9345. "type": "array",
  9346. "items": {
  9347. "type": "string"
  9348. }
  9349. },
  9350. "name": {
  9351. "type": "string"
  9352. },
  9353. "period_last_update_amount": {
  9354. "description": "Total usage at last period reset",
  9355. "type": "number"
  9356. },
  9357. "period_last_update_time": {
  9358. "description": "Last time period was reset",
  9359. "type": "string"
  9360. },
  9361. "period_quota": {
  9362. "type": "number"
  9363. },
  9364. "period_type": {
  9365. "description": "daily, weekly, monthly, default is monthly",
  9366. "type": "string"
  9367. },
  9368. "quota": {
  9369. "type": "number"
  9370. },
  9371. "request_count": {
  9372. "type": "integer"
  9373. },
  9374. "status": {
  9375. "type": "integer"
  9376. },
  9377. "subnets": {
  9378. "type": "array",
  9379. "items": {
  9380. "type": "string"
  9381. }
  9382. },
  9383. "used_amount": {
  9384. "type": "number"
  9385. }
  9386. }
  9387. },
  9388. "controller.UpdateChannelStatusRequest": {
  9389. "type": "object",
  9390. "properties": {
  9391. "status": {
  9392. "type": "integer"
  9393. }
  9394. }
  9395. },
  9396. "controller.UpdateGroupMCPStatusRequest": {
  9397. "type": "object",
  9398. "properties": {
  9399. "status": {
  9400. "$ref": "#/definitions/model.GroupMCPStatus"
  9401. }
  9402. }
  9403. },
  9404. "controller.UpdateGroupRPMRatioRequest": {
  9405. "type": "object",
  9406. "properties": {
  9407. "rpm_ratio": {
  9408. "type": "number"
  9409. }
  9410. }
  9411. },
  9412. "controller.UpdateGroupStatusRequest": {
  9413. "type": "object",
  9414. "properties": {
  9415. "status": {
  9416. "type": "integer"
  9417. }
  9418. }
  9419. },
  9420. "controller.UpdateGroupTPMRatioRequest": {
  9421. "type": "object",
  9422. "properties": {
  9423. "tpm_ratio": {
  9424. "type": "number"
  9425. }
  9426. }
  9427. },
  9428. "controller.UpdateGroupsStatusRequest": {
  9429. "type": "object",
  9430. "properties": {
  9431. "groups": {
  9432. "type": "array",
  9433. "items": {
  9434. "type": "string"
  9435. }
  9436. },
  9437. "status": {
  9438. "type": "integer"
  9439. }
  9440. }
  9441. },
  9442. "controller.UpdatePublicMCPStatusRequest": {
  9443. "type": "object",
  9444. "properties": {
  9445. "status": {
  9446. "$ref": "#/definitions/model.PublicMCPStatus"
  9447. }
  9448. }
  9449. },
  9450. "controller.UpdateTokenNameRequest": {
  9451. "type": "object",
  9452. "properties": {
  9453. "name": {
  9454. "type": "string"
  9455. }
  9456. }
  9457. },
  9458. "controller.UpdateTokenStatusRequest": {
  9459. "type": "object",
  9460. "properties": {
  9461. "status": {
  9462. "type": "integer"
  9463. }
  9464. }
  9465. },
  9466. "mcp.Meta": {
  9467. "type": "object",
  9468. "properties": {
  9469. "additionalFields": {
  9470. "description": "AdditionalFields are any fields present in the Meta that are not\notherwise defined in the protocol.",
  9471. "type": "object",
  9472. "additionalProperties": {}
  9473. },
  9474. "progressToken": {
  9475. "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."
  9476. }
  9477. }
  9478. },
  9479. "mcp.Tool": {
  9480. "type": "object",
  9481. "properties": {
  9482. "_meta": {
  9483. "description": "Meta is a metadata object that is reserved by MCP for storing additional information.",
  9484. "allOf": [
  9485. {
  9486. "$ref": "#/definitions/mcp.Meta"
  9487. }
  9488. ]
  9489. },
  9490. "annotations": {
  9491. "description": "Optional properties describing tool behavior",
  9492. "allOf": [
  9493. {
  9494. "$ref": "#/definitions/mcp.ToolAnnotation"
  9495. }
  9496. ]
  9497. },
  9498. "description": {
  9499. "description": "A human-readable description of the tool.",
  9500. "type": "string"
  9501. },
  9502. "inputSchema": {
  9503. "description": "A JSON Schema object defining the expected parameters for the tool.",
  9504. "allOf": [
  9505. {
  9506. "$ref": "#/definitions/mcp.ToolInputSchema"
  9507. }
  9508. ]
  9509. },
  9510. "name": {
  9511. "description": "The name of the tool.",
  9512. "type": "string"
  9513. }
  9514. }
  9515. },
  9516. "mcp.ToolAnnotation": {
  9517. "type": "object",
  9518. "properties": {
  9519. "destructiveHint": {
  9520. "description": "If true, the tool may perform destructive updates",
  9521. "type": "boolean"
  9522. },
  9523. "idempotentHint": {
  9524. "description": "If true, repeated calls with same args have no additional effect",
  9525. "type": "boolean"
  9526. },
  9527. "openWorldHint": {
  9528. "description": "If true, tool interacts with external entities",
  9529. "type": "boolean"
  9530. },
  9531. "readOnlyHint": {
  9532. "description": "If true, the tool does not modify its environment",
  9533. "type": "boolean"
  9534. },
  9535. "title": {
  9536. "description": "Human-readable title for the tool",
  9537. "type": "string"
  9538. }
  9539. }
  9540. },
  9541. "mcp.ToolInputSchema": {
  9542. "type": "object",
  9543. "properties": {
  9544. "$defs": {
  9545. "type": "object",
  9546. "additionalProperties": {}
  9547. },
  9548. "properties": {
  9549. "type": "object",
  9550. "additionalProperties": {}
  9551. },
  9552. "required": {
  9553. "type": "array",
  9554. "items": {
  9555. "type": "string"
  9556. }
  9557. },
  9558. "type": {
  9559. "type": "string"
  9560. }
  9561. }
  9562. },
  9563. "middleware.APIResponse": {
  9564. "type": "object",
  9565. "properties": {
  9566. "data": {},
  9567. "message": {
  9568. "type": "string"
  9569. },
  9570. "success": {
  9571. "type": "boolean"
  9572. }
  9573. }
  9574. },
  9575. "mode.Mode": {
  9576. "type": "integer",
  9577. "enum": [
  9578. 0,
  9579. 1,
  9580. 2,
  9581. 3,
  9582. 4,
  9583. 5,
  9584. 6,
  9585. 7,
  9586. 8,
  9587. 9,
  9588. 10,
  9589. 11,
  9590. 12,
  9591. 13,
  9592. 14,
  9593. 15,
  9594. 16,
  9595. 17,
  9596. 18,
  9597. 19,
  9598. 20
  9599. ],
  9600. "x-enum-varnames": [
  9601. "Unknown",
  9602. "ChatCompletions",
  9603. "Completions",
  9604. "Embeddings",
  9605. "Moderations",
  9606. "ImagesGenerations",
  9607. "ImagesEdits",
  9608. "AudioSpeech",
  9609. "AudioTranscription",
  9610. "AudioTranslation",
  9611. "Rerank",
  9612. "ParsePdf",
  9613. "Anthropic",
  9614. "VideoGenerationsJobs",
  9615. "VideoGenerationsGetJobs",
  9616. "VideoGenerationsContent",
  9617. "Responses",
  9618. "ResponsesGet",
  9619. "ResponsesDelete",
  9620. "ResponsesCancel",
  9621. "ResponsesInputItems"
  9622. ]
  9623. },
  9624. "model.AnthropicMessageRequest": {
  9625. "type": "object",
  9626. "properties": {
  9627. "messages": {
  9628. "type": "array",
  9629. "items": {
  9630. "$ref": "#/definitions/model.Message"
  9631. }
  9632. },
  9633. "model": {
  9634. "type": "string"
  9635. }
  9636. }
  9637. },
  9638. "model.Channel": {
  9639. "type": "object",
  9640. "properties": {
  9641. "balance": {
  9642. "type": "number"
  9643. },
  9644. "balance_threshold": {
  9645. "type": "number"
  9646. },
  9647. "balance_updated_at": {
  9648. "type": "string"
  9649. },
  9650. "base_url": {
  9651. "type": "string"
  9652. },
  9653. "channel_tests": {
  9654. "type": "array",
  9655. "items": {
  9656. "$ref": "#/definitions/model.ChannelTest"
  9657. }
  9658. },
  9659. "config": {
  9660. "$ref": "#/definitions/model.ChannelConfig"
  9661. },
  9662. "created_at": {
  9663. "type": "string"
  9664. },
  9665. "enabled_auto_balance_check": {
  9666. "type": "boolean"
  9667. },
  9668. "id": {
  9669. "type": "integer"
  9670. },
  9671. "key": {
  9672. "type": "string"
  9673. },
  9674. "last_test_error_at": {
  9675. "type": "string"
  9676. },
  9677. "model_mapping": {
  9678. "type": "object",
  9679. "additionalProperties": {
  9680. "type": "string"
  9681. }
  9682. },
  9683. "models": {
  9684. "type": "array",
  9685. "items": {
  9686. "type": "string"
  9687. }
  9688. },
  9689. "name": {
  9690. "type": "string"
  9691. },
  9692. "priority": {
  9693. "type": "integer"
  9694. },
  9695. "request_count": {
  9696. "type": "integer"
  9697. },
  9698. "retry_count": {
  9699. "type": "integer"
  9700. },
  9701. "sets": {
  9702. "type": "array",
  9703. "items": {
  9704. "type": "string"
  9705. }
  9706. },
  9707. "status": {
  9708. "type": "integer"
  9709. },
  9710. "type": {
  9711. "$ref": "#/definitions/model.ChannelType"
  9712. },
  9713. "used_amount": {
  9714. "type": "number"
  9715. }
  9716. }
  9717. },
  9718. "model.ChannelConfig": {
  9719. "type": "object",
  9720. "properties": {
  9721. "spec": {
  9722. "type": "array",
  9723. "items": {
  9724. "type": "integer"
  9725. }
  9726. }
  9727. }
  9728. },
  9729. "model.ChannelTest": {
  9730. "type": "object",
  9731. "properties": {
  9732. "actual_model": {
  9733. "type": "string"
  9734. },
  9735. "channel_id": {
  9736. "type": "integer"
  9737. },
  9738. "channel_name": {
  9739. "type": "string"
  9740. },
  9741. "channel_type": {
  9742. "$ref": "#/definitions/model.ChannelType"
  9743. },
  9744. "code": {
  9745. "type": "integer"
  9746. },
  9747. "mode": {
  9748. "$ref": "#/definitions/mode.Mode"
  9749. },
  9750. "model": {
  9751. "type": "string"
  9752. },
  9753. "response": {
  9754. "type": "string"
  9755. },
  9756. "success": {
  9757. "type": "boolean"
  9758. },
  9759. "test_at": {
  9760. "type": "string"
  9761. },
  9762. "took": {
  9763. "type": "number"
  9764. }
  9765. }
  9766. },
  9767. "model.ChannelType": {
  9768. "type": "integer",
  9769. "enum": [
  9770. 1,
  9771. 3,
  9772. 4,
  9773. 12,
  9774. 13,
  9775. 14,
  9776. 15,
  9777. 16,
  9778. 17,
  9779. 18,
  9780. 19,
  9781. 20,
  9782. 23,
  9783. 24,
  9784. 25,
  9785. 26,
  9786. 27,
  9787. 28,
  9788. 29,
  9789. 30,
  9790. 31,
  9791. 32,
  9792. 33,
  9793. 34,
  9794. 35,
  9795. 36,
  9796. 37,
  9797. 40,
  9798. 41,
  9799. 42,
  9800. 43,
  9801. 44,
  9802. 45,
  9803. 46,
  9804. 47,
  9805. 48,
  9806. 49,
  9807. 50
  9808. ],
  9809. "x-enum-varnames": [
  9810. "ChannelTypeOpenAI",
  9811. "ChannelTypeAzure",
  9812. "ChannelTypeAzure2",
  9813. "ChannelTypeGoogleGeminiOpenAI",
  9814. "ChannelTypeBaiduV2",
  9815. "ChannelTypeAnthropic",
  9816. "ChannelTypeBaidu",
  9817. "ChannelTypeZhipu",
  9818. "ChannelTypeAli",
  9819. "ChannelTypeXunfei",
  9820. "ChannelTypeAI360",
  9821. "ChannelTypeOpenRouter",
  9822. "ChannelTypeTencent",
  9823. "ChannelTypeGoogleGemini",
  9824. "ChannelTypeMoonshot",
  9825. "ChannelTypeBaichuan",
  9826. "ChannelTypeMinimax",
  9827. "ChannelTypeMistral",
  9828. "ChannelTypeGroq",
  9829. "ChannelTypeOllama",
  9830. "ChannelTypeLingyiwanwu",
  9831. "ChannelTypeStepfun",
  9832. "ChannelTypeAWS",
  9833. "ChannelTypeCoze",
  9834. "ChannelTypeCohere",
  9835. "ChannelTypeDeepseek",
  9836. "ChannelTypeCloudflare",
  9837. "ChannelTypeDoubao",
  9838. "ChannelTypeNovita",
  9839. "ChannelTypeVertexAI",
  9840. "ChannelTypeSiliconflow",
  9841. "ChannelTypeDoubaoAudio",
  9842. "ChannelTypeXAI",
  9843. "ChannelTypeDoc2x",
  9844. "ChannelTypeJina",
  9845. "ChannelTypeTextEmbeddingsInference",
  9846. "ChannelTypeQianfan",
  9847. "ChannelTypeSangforAICP"
  9848. ]
  9849. },
  9850. "model.ChartData": {
  9851. "type": "object",
  9852. "properties": {
  9853. "audio_input_tokens": {
  9854. "type": "integer"
  9855. },
  9856. "cache_creation_tokens": {
  9857. "type": "integer"
  9858. },
  9859. "cached_tokens": {
  9860. "type": "integer"
  9861. },
  9862. "exception_count": {
  9863. "type": "integer"
  9864. },
  9865. "image_input_tokens": {
  9866. "type": "integer"
  9867. },
  9868. "input_tokens": {
  9869. "type": "integer"
  9870. },
  9871. "output_tokens": {
  9872. "type": "integer"
  9873. },
  9874. "reasoning_tokens": {
  9875. "type": "integer"
  9876. },
  9877. "request_count": {
  9878. "type": "integer"
  9879. },
  9880. "retry_count": {
  9881. "type": "integer"
  9882. },
  9883. "status_400_count": {
  9884. "type": "integer"
  9885. },
  9886. "status_429_count": {
  9887. "type": "integer"
  9888. },
  9889. "status_4xx_count": {
  9890. "type": "integer"
  9891. },
  9892. "status_500_count": {
  9893. "type": "integer"
  9894. },
  9895. "status_5xx_count": {
  9896. "type": "integer"
  9897. },
  9898. "timestamp": {
  9899. "type": "integer"
  9900. },
  9901. "total_time_milliseconds": {
  9902. "type": "integer"
  9903. },
  9904. "total_tokens": {
  9905. "type": "integer"
  9906. },
  9907. "total_ttfb_milliseconds": {
  9908. "type": "integer"
  9909. },
  9910. "used_amount": {
  9911. "type": "number"
  9912. },
  9913. "web_search_count": {
  9914. "type": "integer"
  9915. }
  9916. }
  9917. },
  9918. "model.ChatUsage": {
  9919. "type": "object",
  9920. "properties": {
  9921. "completion_tokens": {
  9922. "type": "integer"
  9923. },
  9924. "completion_tokens_details": {
  9925. "$ref": "#/definitions/model.CompletionTokensDetails"
  9926. },
  9927. "prompt_tokens": {
  9928. "type": "integer"
  9929. },
  9930. "prompt_tokens_details": {
  9931. "$ref": "#/definitions/model.PromptTokensDetails"
  9932. },
  9933. "total_tokens": {
  9934. "type": "integer"
  9935. },
  9936. "web_search_count": {
  9937. "type": "integer"
  9938. }
  9939. }
  9940. },
  9941. "model.ClaudeThinkingType": {
  9942. "type": "string",
  9943. "enum": [
  9944. "enabled",
  9945. "disabled"
  9946. ],
  9947. "x-enum-varnames": [
  9948. "ClaudeThinkingTypeEnabled",
  9949. "ClaudeThinkingTypeDisabled"
  9950. ]
  9951. },
  9952. "model.CompletionTokensDetails": {
  9953. "type": "object",
  9954. "properties": {
  9955. "accepted_prediction_tokens": {
  9956. "type": "integer"
  9957. },
  9958. "audio_tokens": {
  9959. "type": "integer"
  9960. },
  9961. "reasoning_tokens": {
  9962. "type": "integer"
  9963. },
  9964. "rejected_prediction_tokens": {
  9965. "type": "integer"
  9966. }
  9967. }
  9968. },
  9969. "model.ConditionalPrice": {
  9970. "type": "object",
  9971. "properties": {
  9972. "condition": {
  9973. "$ref": "#/definitions/model.PriceCondition"
  9974. },
  9975. "price": {
  9976. "$ref": "#/definitions/model.Price"
  9977. }
  9978. }
  9979. },
  9980. "model.CreateResponseRequest": {
  9981. "type": "object",
  9982. "properties": {
  9983. "instructions": {
  9984. "type": "string"
  9985. },
  9986. "max_output_tokens": {
  9987. "type": "integer"
  9988. },
  9989. "messages": {
  9990. "type": "array",
  9991. "items": {
  9992. "$ref": "#/definitions/model.Message"
  9993. }
  9994. },
  9995. "metadata": {
  9996. "type": "object",
  9997. "additionalProperties": {}
  9998. },
  9999. "model": {
  10000. "type": "string"
  10001. },
  10002. "parallel_tool_calls": {
  10003. "type": "boolean"
  10004. },
  10005. "previous_response_id": {
  10006. "type": "string"
  10007. },
  10008. "store": {
  10009. "type": "boolean"
  10010. },
  10011. "stream": {
  10012. "type": "boolean"
  10013. },
  10014. "temperature": {
  10015. "type": "number"
  10016. },
  10017. "tool_choice": {},
  10018. "tools": {
  10019. "type": "array",
  10020. "items": {
  10021. "$ref": "#/definitions/model.Tool"
  10022. }
  10023. },
  10024. "top_p": {
  10025. "type": "number"
  10026. },
  10027. "truncation": {
  10028. "type": "string"
  10029. },
  10030. "user": {
  10031. "type": "string"
  10032. }
  10033. }
  10034. },
  10035. "model.DashboardResponse": {
  10036. "type": "object",
  10037. "properties": {
  10038. "audio_input_tokens": {
  10039. "type": "integer"
  10040. },
  10041. "cache_creation_tokens": {
  10042. "type": "integer"
  10043. },
  10044. "cached_tokens": {
  10045. "type": "integer"
  10046. },
  10047. "channels": {
  10048. "type": "array",
  10049. "items": {
  10050. "type": "integer"
  10051. }
  10052. },
  10053. "chart_data": {
  10054. "type": "array",
  10055. "items": {
  10056. "$ref": "#/definitions/model.ChartData"
  10057. }
  10058. },
  10059. "exception_count": {
  10060. "type": "integer"
  10061. },
  10062. "image_input_tokens": {
  10063. "type": "integer"
  10064. },
  10065. "input_tokens": {
  10066. "type": "integer"
  10067. },
  10068. "max_rpm": {
  10069. "type": "integer"
  10070. },
  10071. "max_tpm": {
  10072. "type": "integer"
  10073. },
  10074. "models": {
  10075. "type": "array",
  10076. "items": {
  10077. "type": "string"
  10078. }
  10079. },
  10080. "output_tokens": {
  10081. "type": "integer"
  10082. },
  10083. "reasoning_tokens": {
  10084. "type": "integer"
  10085. },
  10086. "request_count": {
  10087. "type": "integer"
  10088. },
  10089. "retry_count": {
  10090. "type": "integer"
  10091. },
  10092. "rpm": {
  10093. "type": "integer"
  10094. },
  10095. "status_400_count": {
  10096. "type": "integer"
  10097. },
  10098. "status_429_count": {
  10099. "type": "integer"
  10100. },
  10101. "status_4xx_count": {
  10102. "type": "integer"
  10103. },
  10104. "status_500_count": {
  10105. "type": "integer"
  10106. },
  10107. "status_5xx_count": {
  10108. "type": "integer"
  10109. },
  10110. "total_count": {
  10111. "description": "use Count.RequestCount instead",
  10112. "type": "integer"
  10113. },
  10114. "total_time_milliseconds": {
  10115. "type": "integer"
  10116. },
  10117. "total_tokens": {
  10118. "type": "integer"
  10119. },
  10120. "total_ttfb_milliseconds": {
  10121. "type": "integer"
  10122. },
  10123. "tpm": {
  10124. "type": "integer"
  10125. },
  10126. "used_amount": {
  10127. "type": "number"
  10128. },
  10129. "web_search_count": {
  10130. "type": "integer"
  10131. }
  10132. }
  10133. },
  10134. "model.Document": {
  10135. "type": "object",
  10136. "properties": {
  10137. "text": {
  10138. "type": "string"
  10139. }
  10140. }
  10141. },
  10142. "model.EmbeddingPromptTokensDetails": {
  10143. "type": "object",
  10144. "properties": {
  10145. "image_tokens": {
  10146. "type": "integer"
  10147. },
  10148. "text_tokens": {
  10149. "type": "integer"
  10150. }
  10151. }
  10152. },
  10153. "model.EmbeddingRequest": {
  10154. "type": "object",
  10155. "properties": {
  10156. "dimensions": {
  10157. "type": "integer"
  10158. },
  10159. "encoding_format": {
  10160. "type": "string"
  10161. },
  10162. "input": {
  10163. "type": "string"
  10164. },
  10165. "model": {
  10166. "type": "string"
  10167. }
  10168. }
  10169. },
  10170. "model.EmbeddingResponse": {
  10171. "type": "object",
  10172. "properties": {
  10173. "data": {
  10174. "type": "array",
  10175. "items": {
  10176. "$ref": "#/definitions/model.EmbeddingResponseItem"
  10177. }
  10178. },
  10179. "model": {
  10180. "type": "string"
  10181. },
  10182. "object": {
  10183. "type": "string"
  10184. },
  10185. "usage": {
  10186. "$ref": "#/definitions/model.EmbeddingUsage"
  10187. }
  10188. }
  10189. },
  10190. "model.EmbeddingResponseItem": {
  10191. "type": "object",
  10192. "properties": {
  10193. "embedding": {
  10194. "type": "array",
  10195. "items": {
  10196. "type": "number"
  10197. }
  10198. },
  10199. "index": {
  10200. "type": "integer"
  10201. },
  10202. "object": {
  10203. "type": "string"
  10204. }
  10205. }
  10206. },
  10207. "model.EmbeddingUsage": {
  10208. "type": "object",
  10209. "properties": {
  10210. "prompt_tokens": {
  10211. "type": "integer"
  10212. },
  10213. "prompt_tokens_details": {
  10214. "$ref": "#/definitions/model.EmbeddingPromptTokensDetails"
  10215. },
  10216. "total_tokens": {
  10217. "type": "integer"
  10218. }
  10219. }
  10220. },
  10221. "model.FinishReason": {
  10222. "type": "string",
  10223. "enum": [
  10224. "stop",
  10225. "length",
  10226. "content_filter",
  10227. "tool_calls",
  10228. "function_call"
  10229. ],
  10230. "x-enum-varnames": [
  10231. "FinishReasonStop",
  10232. "FinishReasonLength",
  10233. "FinishReasonContentFilter",
  10234. "FinishReasonToolCalls",
  10235. "FinishReasonFunctionCall"
  10236. ]
  10237. },
  10238. "model.Function": {
  10239. "type": "object",
  10240. "properties": {
  10241. "arguments": {
  10242. "type": "string"
  10243. },
  10244. "description": {
  10245. "type": "string"
  10246. },
  10247. "name": {
  10248. "type": "string"
  10249. },
  10250. "parameters": {}
  10251. }
  10252. },
  10253. "model.GeneralOpenAIRequest": {
  10254. "type": "object",
  10255. "properties": {
  10256. "frequency_penalty": {
  10257. "type": "number"
  10258. },
  10259. "function_call": {},
  10260. "functions": {},
  10261. "input": {},
  10262. "logit_bias": {},
  10263. "logprobs": {
  10264. "type": "boolean"
  10265. },
  10266. "max_completion_tokens": {
  10267. "type": "integer"
  10268. },
  10269. "max_tokens": {
  10270. "type": "integer"
  10271. },
  10272. "messages": {
  10273. "type": "array",
  10274. "items": {
  10275. "$ref": "#/definitions/model.Message"
  10276. }
  10277. },
  10278. "metadata": {},
  10279. "model": {
  10280. "type": "string"
  10281. },
  10282. "num_ctx": {
  10283. "type": "integer"
  10284. },
  10285. "presence_penalty": {
  10286. "type": "number"
  10287. },
  10288. "prompt": {},
  10289. "response_format": {
  10290. "$ref": "#/definitions/model.ResponseFormat"
  10291. },
  10292. "seed": {
  10293. "type": "number"
  10294. },
  10295. "size": {
  10296. "type": "string"
  10297. },
  10298. "stop": {},
  10299. "stream": {
  10300. "type": "boolean"
  10301. },
  10302. "stream_options": {
  10303. "$ref": "#/definitions/model.StreamOptions"
  10304. },
  10305. "temperature": {
  10306. "type": "number"
  10307. },
  10308. "thinking": {
  10309. "description": "aiproxy control field",
  10310. "allOf": [
  10311. {
  10312. "$ref": "#/definitions/model.GeneralThinking"
  10313. }
  10314. ]
  10315. },
  10316. "tool_choice": {},
  10317. "tools": {
  10318. "type": "array",
  10319. "items": {
  10320. "$ref": "#/definitions/model.Tool"
  10321. }
  10322. },
  10323. "top_k": {
  10324. "type": "integer"
  10325. },
  10326. "top_logprobs": {
  10327. "type": "integer"
  10328. },
  10329. "top_p": {
  10330. "type": "number"
  10331. },
  10332. "user": {
  10333. "type": "string"
  10334. }
  10335. }
  10336. },
  10337. "model.GeneralThinking": {
  10338. "type": "object",
  10339. "properties": {
  10340. "budget_tokens": {
  10341. "description": "when type is \"disabled\", this field must be 0",
  10342. "type": "integer"
  10343. },
  10344. "type": {
  10345. "$ref": "#/definitions/model.ClaudeThinkingType"
  10346. }
  10347. }
  10348. },
  10349. "model.GetGroupLogsResult": {
  10350. "type": "object",
  10351. "properties": {
  10352. "channels": {
  10353. "type": "array",
  10354. "items": {
  10355. "type": "integer"
  10356. }
  10357. },
  10358. "logs": {
  10359. "type": "array",
  10360. "items": {
  10361. "$ref": "#/definitions/model.Log"
  10362. }
  10363. },
  10364. "models": {
  10365. "type": "array",
  10366. "items": {
  10367. "type": "string"
  10368. }
  10369. },
  10370. "token_names": {
  10371. "type": "array",
  10372. "items": {
  10373. "type": "string"
  10374. }
  10375. },
  10376. "total": {
  10377. "type": "integer"
  10378. }
  10379. }
  10380. },
  10381. "model.GetLogsResult": {
  10382. "type": "object",
  10383. "properties": {
  10384. "channels": {
  10385. "type": "array",
  10386. "items": {
  10387. "type": "integer"
  10388. }
  10389. },
  10390. "logs": {
  10391. "type": "array",
  10392. "items": {
  10393. "$ref": "#/definitions/model.Log"
  10394. }
  10395. },
  10396. "total": {
  10397. "type": "integer"
  10398. }
  10399. }
  10400. },
  10401. "model.Group": {
  10402. "type": "object",
  10403. "properties": {
  10404. "available_sets": {
  10405. "type": "array",
  10406. "items": {
  10407. "type": "string"
  10408. }
  10409. },
  10410. "balance_alert_enabled": {
  10411. "type": "boolean"
  10412. },
  10413. "balance_alert_threshold": {
  10414. "type": "number"
  10415. },
  10416. "created_at": {
  10417. "type": "string"
  10418. },
  10419. "id": {
  10420. "type": "string"
  10421. },
  10422. "request_count": {
  10423. "type": "integer"
  10424. },
  10425. "rpm_ratio": {
  10426. "type": "number"
  10427. },
  10428. "status": {
  10429. "type": "integer"
  10430. },
  10431. "tpm_ratio": {
  10432. "type": "number"
  10433. },
  10434. "used_amount": {
  10435. "type": "number"
  10436. }
  10437. }
  10438. },
  10439. "model.GroupDashboardResponse": {
  10440. "type": "object",
  10441. "properties": {
  10442. "audio_input_tokens": {
  10443. "type": "integer"
  10444. },
  10445. "cache_creation_tokens": {
  10446. "type": "integer"
  10447. },
  10448. "cached_tokens": {
  10449. "type": "integer"
  10450. },
  10451. "channels": {
  10452. "type": "array",
  10453. "items": {
  10454. "type": "integer"
  10455. }
  10456. },
  10457. "chart_data": {
  10458. "type": "array",
  10459. "items": {
  10460. "$ref": "#/definitions/model.ChartData"
  10461. }
  10462. },
  10463. "exception_count": {
  10464. "type": "integer"
  10465. },
  10466. "image_input_tokens": {
  10467. "type": "integer"
  10468. },
  10469. "input_tokens": {
  10470. "type": "integer"
  10471. },
  10472. "max_rpm": {
  10473. "type": "integer"
  10474. },
  10475. "max_tpm": {
  10476. "type": "integer"
  10477. },
  10478. "models": {
  10479. "type": "array",
  10480. "items": {
  10481. "type": "string"
  10482. }
  10483. },
  10484. "output_tokens": {
  10485. "type": "integer"
  10486. },
  10487. "reasoning_tokens": {
  10488. "type": "integer"
  10489. },
  10490. "request_count": {
  10491. "type": "integer"
  10492. },
  10493. "retry_count": {
  10494. "type": "integer"
  10495. },
  10496. "rpm": {
  10497. "type": "integer"
  10498. },
  10499. "status_400_count": {
  10500. "type": "integer"
  10501. },
  10502. "status_429_count": {
  10503. "type": "integer"
  10504. },
  10505. "status_4xx_count": {
  10506. "type": "integer"
  10507. },
  10508. "status_500_count": {
  10509. "type": "integer"
  10510. },
  10511. "status_5xx_count": {
  10512. "type": "integer"
  10513. },
  10514. "token_names": {
  10515. "type": "array",
  10516. "items": {
  10517. "type": "string"
  10518. }
  10519. },
  10520. "total_count": {
  10521. "description": "use Count.RequestCount instead",
  10522. "type": "integer"
  10523. },
  10524. "total_time_milliseconds": {
  10525. "type": "integer"
  10526. },
  10527. "total_tokens": {
  10528. "type": "integer"
  10529. },
  10530. "total_ttfb_milliseconds": {
  10531. "type": "integer"
  10532. },
  10533. "tpm": {
  10534. "type": "integer"
  10535. },
  10536. "used_amount": {
  10537. "type": "number"
  10538. },
  10539. "web_search_count": {
  10540. "type": "integer"
  10541. }
  10542. }
  10543. },
  10544. "model.GroupMCP": {
  10545. "type": "object",
  10546. "properties": {
  10547. "created_at": {
  10548. "type": "string"
  10549. },
  10550. "description": {
  10551. "type": "string"
  10552. },
  10553. "group_id": {
  10554. "type": "string"
  10555. },
  10556. "id": {
  10557. "type": "string"
  10558. },
  10559. "name": {
  10560. "type": "string"
  10561. },
  10562. "openapi_config": {
  10563. "$ref": "#/definitions/model.MCPOpenAPIConfig"
  10564. },
  10565. "proxy_config": {
  10566. "$ref": "#/definitions/model.GroupMCPProxyConfig"
  10567. },
  10568. "status": {
  10569. "$ref": "#/definitions/model.GroupMCPStatus"
  10570. },
  10571. "type": {
  10572. "$ref": "#/definitions/model.GroupMCPType"
  10573. },
  10574. "update_at": {
  10575. "type": "string"
  10576. }
  10577. }
  10578. },
  10579. "model.GroupMCPProxyConfig": {
  10580. "type": "object",
  10581. "properties": {
  10582. "headers": {
  10583. "type": "object",
  10584. "additionalProperties": {
  10585. "type": "string"
  10586. }
  10587. },
  10588. "querys": {
  10589. "type": "object",
  10590. "additionalProperties": {
  10591. "type": "string"
  10592. }
  10593. },
  10594. "url": {
  10595. "type": "string"
  10596. }
  10597. }
  10598. },
  10599. "model.GroupMCPStatus": {
  10600. "type": "integer",
  10601. "enum": [
  10602. 1,
  10603. 2
  10604. ],
  10605. "x-enum-varnames": [
  10606. "GroupMCPStatusEnabled",
  10607. "GroupMCPStatusDisabled"
  10608. ]
  10609. },
  10610. "model.GroupMCPType": {
  10611. "type": "string",
  10612. "enum": [
  10613. "mcp_proxy_sse",
  10614. "mcp_proxy_streamable",
  10615. "mcp_openapi"
  10616. ],
  10617. "x-enum-varnames": [
  10618. "GroupMCPTypeProxySSE",
  10619. "GroupMCPTypeProxyStreamable",
  10620. "GroupMCPTypeOpenAPI"
  10621. ]
  10622. },
  10623. "model.GroupModelConfig": {
  10624. "type": "object",
  10625. "properties": {
  10626. "force_save_detail": {
  10627. "type": "boolean"
  10628. },
  10629. "group_id": {
  10630. "type": "string"
  10631. },
  10632. "image_prices": {
  10633. "type": "object",
  10634. "additionalProperties": {
  10635. "type": "number",
  10636. "format": "float64"
  10637. }
  10638. },
  10639. "model": {
  10640. "type": "string"
  10641. },
  10642. "override_force_save_detail": {
  10643. "type": "boolean"
  10644. },
  10645. "override_limit": {
  10646. "type": "boolean"
  10647. },
  10648. "override_price": {
  10649. "type": "boolean"
  10650. },
  10651. "override_retry_times": {
  10652. "type": "boolean"
  10653. },
  10654. "price": {
  10655. "$ref": "#/definitions/model.Price"
  10656. },
  10657. "retry_times": {
  10658. "type": "integer"
  10659. },
  10660. "rpm": {
  10661. "type": "integer"
  10662. },
  10663. "tpm": {
  10664. "type": "integer"
  10665. }
  10666. }
  10667. },
  10668. "model.ImageData": {
  10669. "type": "object",
  10670. "properties": {
  10671. "b64_json": {
  10672. "type": "string"
  10673. },
  10674. "revised_prompt": {
  10675. "type": "string"
  10676. },
  10677. "url": {
  10678. "type": "string"
  10679. }
  10680. }
  10681. },
  10682. "model.ImageInputTokensDetails": {
  10683. "type": "object",
  10684. "properties": {
  10685. "image_tokens": {
  10686. "description": "The number of image tokens in the input prompt.",
  10687. "type": "integer"
  10688. },
  10689. "text_tokens": {
  10690. "description": "The number of text tokens in the input prompt.",
  10691. "type": "integer"
  10692. }
  10693. }
  10694. },
  10695. "model.ImageRequest": {
  10696. "type": "object",
  10697. "properties": {
  10698. "background": {
  10699. "type": "string"
  10700. },
  10701. "model": {
  10702. "type": "string"
  10703. },
  10704. "moderation": {
  10705. "type": "string"
  10706. },
  10707. "n": {
  10708. "type": "integer"
  10709. },
  10710. "output_compression": {
  10711. "type": "integer"
  10712. },
  10713. "output_format": {
  10714. "description": "png, jpeg, webp",
  10715. "type": "string"
  10716. },
  10717. "prompt": {
  10718. "type": "string"
  10719. },
  10720. "quality": {
  10721. "description": "auto, high, medium, low, hd, standard",
  10722. "type": "string"
  10723. },
  10724. "response_format": {
  10725. "description": "url, b64_json",
  10726. "type": "string"
  10727. },
  10728. "size": {
  10729. "description": "1024x1024, 1536x1024, 1024x1536, auto, 256x256, 512x512, 1792x1024, 1024x1792",
  10730. "type": "string"
  10731. },
  10732. "style": {
  10733. "description": "vivid, natural",
  10734. "type": "string"
  10735. },
  10736. "user": {
  10737. "type": "string"
  10738. }
  10739. }
  10740. },
  10741. "model.ImageResponse": {
  10742. "type": "object",
  10743. "properties": {
  10744. "created": {
  10745. "type": "integer"
  10746. },
  10747. "data": {
  10748. "type": "array",
  10749. "items": {
  10750. "$ref": "#/definitions/model.ImageData"
  10751. }
  10752. },
  10753. "usage": {
  10754. "description": "For gpt-image-1 only, the token usage information for the image generation.",
  10755. "allOf": [
  10756. {
  10757. "$ref": "#/definitions/model.ImageUsage"
  10758. }
  10759. ]
  10760. }
  10761. }
  10762. },
  10763. "model.ImageUsage": {
  10764. "type": "object",
  10765. "properties": {
  10766. "input_tokens": {
  10767. "description": "The number of tokens (images and text) in the input prompt.",
  10768. "type": "integer"
  10769. },
  10770. "input_tokens_details": {
  10771. "description": "The input tokens detailed information for the image generation.",
  10772. "allOf": [
  10773. {
  10774. "$ref": "#/definitions/model.ImageInputTokensDetails"
  10775. }
  10776. ]
  10777. },
  10778. "output_tokens": {
  10779. "description": "The number of image tokens in the output image.",
  10780. "type": "integer"
  10781. },
  10782. "total_tokens": {
  10783. "description": "The total number of tokens (images and text) used for the image generation.",
  10784. "type": "integer"
  10785. }
  10786. }
  10787. },
  10788. "model.IncompleteDetails": {
  10789. "type": "object",
  10790. "properties": {
  10791. "reason": {
  10792. "type": "string"
  10793. }
  10794. }
  10795. },
  10796. "model.InputContent": {
  10797. "type": "object",
  10798. "properties": {
  10799. "text": {
  10800. "type": "string"
  10801. },
  10802. "type": {
  10803. "type": "string"
  10804. }
  10805. }
  10806. },
  10807. "model.InputItem": {
  10808. "type": "object",
  10809. "properties": {
  10810. "content": {
  10811. "type": "array",
  10812. "items": {
  10813. "$ref": "#/definitions/model.InputContent"
  10814. }
  10815. },
  10816. "id": {
  10817. "type": "string"
  10818. },
  10819. "role": {
  10820. "type": "string"
  10821. },
  10822. "type": {
  10823. "type": "string"
  10824. }
  10825. }
  10826. },
  10827. "model.InputItemList": {
  10828. "type": "object",
  10829. "properties": {
  10830. "data": {
  10831. "type": "array",
  10832. "items": {
  10833. "$ref": "#/definitions/model.InputItem"
  10834. }
  10835. },
  10836. "first_id": {
  10837. "type": "string"
  10838. },
  10839. "has_more": {
  10840. "type": "boolean"
  10841. },
  10842. "last_id": {
  10843. "type": "string"
  10844. },
  10845. "object": {
  10846. "type": "string"
  10847. }
  10848. }
  10849. },
  10850. "model.JSONSchema": {
  10851. "type": "object",
  10852. "properties": {
  10853. "description": {
  10854. "type": "string"
  10855. },
  10856. "name": {
  10857. "type": "string"
  10858. },
  10859. "schema": {
  10860. "type": "object",
  10861. "additionalProperties": {}
  10862. },
  10863. "strict": {
  10864. "type": "boolean"
  10865. }
  10866. }
  10867. },
  10868. "model.Log": {
  10869. "type": "object",
  10870. "properties": {
  10871. "channel": {
  10872. "type": "integer"
  10873. },
  10874. "code": {
  10875. "type": "integer"
  10876. },
  10877. "content": {
  10878. "type": "string"
  10879. },
  10880. "created_at": {
  10881. "type": "string"
  10882. },
  10883. "endpoint": {
  10884. "type": "string"
  10885. },
  10886. "group": {
  10887. "type": "string"
  10888. },
  10889. "id": {
  10890. "type": "integer"
  10891. },
  10892. "ip": {
  10893. "type": "string"
  10894. },
  10895. "metadata": {
  10896. "type": "object",
  10897. "additionalProperties": {
  10898. "type": "string"
  10899. }
  10900. },
  10901. "mode": {
  10902. "type": "integer"
  10903. },
  10904. "model": {
  10905. "type": "string"
  10906. },
  10907. "price": {
  10908. "$ref": "#/definitions/model.Price"
  10909. },
  10910. "request_at": {
  10911. "type": "string"
  10912. },
  10913. "request_detail": {
  10914. "$ref": "#/definitions/model.RequestDetail"
  10915. },
  10916. "request_id": {
  10917. "type": "string"
  10918. },
  10919. "retry_at": {
  10920. "type": "string"
  10921. },
  10922. "retry_times": {
  10923. "type": "integer"
  10924. },
  10925. "token_id": {
  10926. "type": "integer"
  10927. },
  10928. "token_name": {
  10929. "type": "string"
  10930. },
  10931. "ttfb_milliseconds": {
  10932. "type": "integer"
  10933. },
  10934. "usage": {
  10935. "$ref": "#/definitions/model.Usage"
  10936. },
  10937. "used_amount": {
  10938. "type": "number"
  10939. },
  10940. "user": {
  10941. "description": "https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids",
  10942. "type": "string"
  10943. }
  10944. }
  10945. },
  10946. "model.MCPEmbeddingConfig": {
  10947. "type": "object",
  10948. "properties": {
  10949. "init": {
  10950. "type": "object",
  10951. "additionalProperties": {
  10952. "type": "string"
  10953. }
  10954. },
  10955. "reusing": {
  10956. "type": "object",
  10957. "additionalProperties": {
  10958. "$ref": "#/definitions/model.ReusingParam"
  10959. }
  10960. }
  10961. }
  10962. },
  10963. "model.MCPOpenAPIConfig": {
  10964. "type": "object",
  10965. "properties": {
  10966. "authorization": {
  10967. "type": "string"
  10968. },
  10969. "openapi_content": {
  10970. "type": "string"
  10971. },
  10972. "openapi_spec": {
  10973. "type": "string"
  10974. },
  10975. "server_addr": {
  10976. "type": "string"
  10977. },
  10978. "v2": {
  10979. "type": "boolean"
  10980. }
  10981. }
  10982. },
  10983. "model.MCPPrice": {
  10984. "type": "object",
  10985. "properties": {
  10986. "default_tools_call_price": {
  10987. "type": "number"
  10988. },
  10989. "tools_call_prices": {
  10990. "type": "object",
  10991. "additionalProperties": {
  10992. "type": "number",
  10993. "format": "float64"
  10994. }
  10995. }
  10996. }
  10997. },
  10998. "model.Message": {
  10999. "type": "object",
  11000. "properties": {
  11001. "content": {},
  11002. "name": {
  11003. "type": "string"
  11004. },
  11005. "reasoning_content": {
  11006. "type": "string"
  11007. },
  11008. "role": {
  11009. "type": "string"
  11010. },
  11011. "tool_call_id": {
  11012. "type": "string"
  11013. },
  11014. "tool_calls": {
  11015. "type": "array",
  11016. "items": {
  11017. "$ref": "#/definitions/model.ToolCall"
  11018. }
  11019. }
  11020. }
  11021. },
  11022. "model.ModelConfig": {
  11023. "type": "object",
  11024. "properties": {
  11025. "config": {
  11026. "type": "object",
  11027. "additionalProperties": {}
  11028. },
  11029. "created_at": {
  11030. "type": "string"
  11031. },
  11032. "exclude_from_tests": {
  11033. "type": "boolean"
  11034. },
  11035. "force_save_detail": {
  11036. "type": "boolean"
  11037. },
  11038. "image_prices": {
  11039. "description": "map[size]price_per_image",
  11040. "type": "object",
  11041. "additionalProperties": {
  11042. "type": "number",
  11043. "format": "float64"
  11044. }
  11045. },
  11046. "image_quality_prices": {
  11047. "description": "map[size]map[quality]price_per_image",
  11048. "type": "object",
  11049. "additionalProperties": {
  11050. "type": "object",
  11051. "additionalProperties": {
  11052. "type": "number",
  11053. "format": "float64"
  11054. }
  11055. }
  11056. },
  11057. "max_error_rate": {
  11058. "type": "number"
  11059. },
  11060. "model": {
  11061. "type": "string"
  11062. },
  11063. "owner": {
  11064. "$ref": "#/definitions/model.ModelOwner"
  11065. },
  11066. "plugin": {
  11067. "type": "object",
  11068. "additionalProperties": {
  11069. "type": "array",
  11070. "items": {
  11071. "type": "integer"
  11072. }
  11073. }
  11074. },
  11075. "price": {
  11076. "$ref": "#/definitions/model.Price"
  11077. },
  11078. "retry_times": {
  11079. "type": "integer"
  11080. },
  11081. "rpm": {
  11082. "type": "integer"
  11083. },
  11084. "timeout_config": {
  11085. "$ref": "#/definitions/model.TimeoutConfig"
  11086. },
  11087. "tpm": {
  11088. "type": "integer"
  11089. },
  11090. "type": {
  11091. "$ref": "#/definitions/mode.Mode"
  11092. },
  11093. "updated_at": {
  11094. "type": "string"
  11095. },
  11096. "warn_error_rate": {
  11097. "type": "number"
  11098. }
  11099. }
  11100. },
  11101. "model.ModelOwner": {
  11102. "type": "string",
  11103. "enum": [
  11104. "openai",
  11105. "alibaba",
  11106. "tencent",
  11107. "xunfei",
  11108. "deepseek",
  11109. "moonshot",
  11110. "minimax",
  11111. "baidu",
  11112. "google",
  11113. "baai",
  11114. "funaudiollm",
  11115. "doubao",
  11116. "fishaudio",
  11117. "chatglm",
  11118. "stabilityai",
  11119. "netease",
  11120. "ai360",
  11121. "anthropic",
  11122. "meta",
  11123. "baichuan",
  11124. "mistral",
  11125. "openchat",
  11126. "microsoft",
  11127. "defog",
  11128. "nexusflow",
  11129. "cohere",
  11130. "huggingface",
  11131. "lingyiwanwu",
  11132. "stepfun",
  11133. "xai",
  11134. "doc2x",
  11135. "jina"
  11136. ],
  11137. "x-enum-varnames": [
  11138. "ModelOwnerOpenAI",
  11139. "ModelOwnerAlibaba",
  11140. "ModelOwnerTencent",
  11141. "ModelOwnerXunfei",
  11142. "ModelOwnerDeepSeek",
  11143. "ModelOwnerMoonshot",
  11144. "ModelOwnerMiniMax",
  11145. "ModelOwnerBaidu",
  11146. "ModelOwnerGoogle",
  11147. "ModelOwnerBAAI",
  11148. "ModelOwnerFunAudioLLM",
  11149. "ModelOwnerDoubao",
  11150. "ModelOwnerFishAudio",
  11151. "ModelOwnerChatGLM",
  11152. "ModelOwnerStabilityAI",
  11153. "ModelOwnerNetease",
  11154. "ModelOwnerAI360",
  11155. "ModelOwnerAnthropic",
  11156. "ModelOwnerMeta",
  11157. "ModelOwnerBaichuan",
  11158. "ModelOwnerMistral",
  11159. "ModelOwnerOpenChat",
  11160. "ModelOwnerMicrosoft",
  11161. "ModelOwnerDefog",
  11162. "ModelOwnerNexusFlow",
  11163. "ModelOwnerCohere",
  11164. "ModelOwnerHuggingFace",
  11165. "ModelOwnerLingyiWanwu",
  11166. "ModelOwnerStepFun",
  11167. "ModelOwnerXAI",
  11168. "ModelOwnerDoc2x",
  11169. "ModelOwnerJina"
  11170. ]
  11171. },
  11172. "model.Option": {
  11173. "type": "object",
  11174. "properties": {
  11175. "key": {
  11176. "type": "string"
  11177. },
  11178. "value": {
  11179. "type": "string"
  11180. }
  11181. }
  11182. },
  11183. "model.OutputContent": {
  11184. "type": "object",
  11185. "properties": {
  11186. "annotations": {
  11187. "type": "array",
  11188. "items": {}
  11189. },
  11190. "text": {
  11191. "type": "string"
  11192. },
  11193. "type": {
  11194. "type": "string"
  11195. }
  11196. }
  11197. },
  11198. "model.OutputItem": {
  11199. "type": "object",
  11200. "properties": {
  11201. "content": {
  11202. "type": "array",
  11203. "items": {
  11204. "$ref": "#/definitions/model.OutputContent"
  11205. }
  11206. },
  11207. "id": {
  11208. "type": "string"
  11209. },
  11210. "role": {
  11211. "type": "string"
  11212. },
  11213. "status": {
  11214. "$ref": "#/definitions/model.ResponseStatus"
  11215. },
  11216. "type": {
  11217. "type": "string"
  11218. }
  11219. }
  11220. },
  11221. "model.Params": {
  11222. "type": "object",
  11223. "additionalProperties": {
  11224. "type": "string"
  11225. }
  11226. },
  11227. "model.ParsePdfResponse": {
  11228. "type": "object",
  11229. "properties": {
  11230. "markdown": {
  11231. "type": "string"
  11232. },
  11233. "pages": {
  11234. "type": "integer"
  11235. }
  11236. }
  11237. },
  11238. "model.Price": {
  11239. "type": "object",
  11240. "properties": {
  11241. "audio_input_price": {
  11242. "type": "number"
  11243. },
  11244. "audio_input_price_unit": {
  11245. "type": "integer"
  11246. },
  11247. "cache_creation_price": {
  11248. "type": "number"
  11249. },
  11250. "cache_creation_price_unit": {
  11251. "type": "integer"
  11252. },
  11253. "cached_price": {
  11254. "type": "number"
  11255. },
  11256. "cached_price_unit": {
  11257. "type": "integer"
  11258. },
  11259. "conditional_prices": {
  11260. "type": "array",
  11261. "items": {
  11262. "$ref": "#/definitions/model.ConditionalPrice"
  11263. }
  11264. },
  11265. "image_input_price": {
  11266. "type": "number"
  11267. },
  11268. "image_input_price_unit": {
  11269. "type": "integer"
  11270. },
  11271. "input_price": {
  11272. "type": "number"
  11273. },
  11274. "input_price_unit": {
  11275. "type": "integer"
  11276. },
  11277. "output_price": {
  11278. "type": "number"
  11279. },
  11280. "output_price_unit": {
  11281. "type": "integer"
  11282. },
  11283. "per_request_price": {
  11284. "type": "number"
  11285. },
  11286. "thinking_mode_output_price": {
  11287. "description": "when ThinkingModeOutputPrice and ReasoningTokens are not 0, OutputPrice and OutputPriceUnit\nwill be overwritten",
  11288. "type": "number"
  11289. },
  11290. "thinking_mode_output_price_unit": {
  11291. "type": "integer"
  11292. },
  11293. "web_search_price": {
  11294. "type": "number"
  11295. },
  11296. "web_search_price_unit": {
  11297. "type": "integer"
  11298. }
  11299. }
  11300. },
  11301. "model.PriceCondition": {
  11302. "type": "object",
  11303. "properties": {
  11304. "input_token_max": {
  11305. "type": "integer"
  11306. },
  11307. "input_token_min": {
  11308. "type": "integer"
  11309. },
  11310. "output_token_max": {
  11311. "type": "integer"
  11312. },
  11313. "output_token_min": {
  11314. "type": "integer"
  11315. }
  11316. }
  11317. },
  11318. "model.PromptTokensDetails": {
  11319. "type": "object",
  11320. "properties": {
  11321. "audio_tokens": {
  11322. "type": "integer"
  11323. },
  11324. "cache_creation_tokens": {
  11325. "type": "integer"
  11326. },
  11327. "cached_tokens": {
  11328. "type": "integer"
  11329. }
  11330. }
  11331. },
  11332. "model.ProxyParamType": {
  11333. "type": "string",
  11334. "enum": [
  11335. "url",
  11336. "header",
  11337. "query"
  11338. ],
  11339. "x-enum-varnames": [
  11340. "ParamTypeURL",
  11341. "ParamTypeHeader",
  11342. "ParamTypeQuery"
  11343. ]
  11344. },
  11345. "model.PublicMCP": {
  11346. "type": "object",
  11347. "properties": {
  11348. "created_at": {
  11349. "type": "string"
  11350. },
  11351. "description": {
  11352. "type": "string"
  11353. },
  11354. "description_cn": {
  11355. "type": "string"
  11356. },
  11357. "embed_config": {
  11358. "$ref": "#/definitions/model.MCPEmbeddingConfig"
  11359. },
  11360. "github_url": {
  11361. "type": "string"
  11362. },
  11363. "id": {
  11364. "type": "string"
  11365. },
  11366. "logo_url": {
  11367. "type": "string"
  11368. },
  11369. "name": {
  11370. "type": "string"
  11371. },
  11372. "name_cn": {
  11373. "type": "string"
  11374. },
  11375. "openapi_config": {
  11376. "$ref": "#/definitions/model.MCPOpenAPIConfig"
  11377. },
  11378. "price": {
  11379. "$ref": "#/definitions/model.MCPPrice"
  11380. },
  11381. "proxy_config": {
  11382. "$ref": "#/definitions/model.PublicMCPProxyConfig"
  11383. },
  11384. "readme": {
  11385. "type": "string"
  11386. },
  11387. "readme_cn": {
  11388. "type": "string"
  11389. },
  11390. "readme_cn_url": {
  11391. "type": "string"
  11392. },
  11393. "readme_url": {
  11394. "type": "string"
  11395. },
  11396. "status": {
  11397. "$ref": "#/definitions/model.PublicMCPStatus"
  11398. },
  11399. "tags": {
  11400. "type": "array",
  11401. "items": {
  11402. "type": "string"
  11403. }
  11404. },
  11405. "test_config": {
  11406. "description": "only used by list tools",
  11407. "allOf": [
  11408. {
  11409. "$ref": "#/definitions/model.TestConfig"
  11410. }
  11411. ]
  11412. },
  11413. "type": {
  11414. "$ref": "#/definitions/model.PublicMCPType"
  11415. },
  11416. "update_at": {
  11417. "type": "string"
  11418. }
  11419. }
  11420. },
  11421. "model.PublicMCPProxyConfig": {
  11422. "type": "object",
  11423. "properties": {
  11424. "headers": {
  11425. "type": "object",
  11426. "additionalProperties": {
  11427. "type": "string"
  11428. }
  11429. },
  11430. "querys": {
  11431. "type": "object",
  11432. "additionalProperties": {
  11433. "type": "string"
  11434. }
  11435. },
  11436. "reusing": {
  11437. "type": "object",
  11438. "additionalProperties": {
  11439. "$ref": "#/definitions/model.PublicMCPProxyReusingParam"
  11440. }
  11441. },
  11442. "url": {
  11443. "type": "string"
  11444. }
  11445. }
  11446. },
  11447. "model.PublicMCPProxyReusingParam": {
  11448. "type": "object",
  11449. "properties": {
  11450. "description": {
  11451. "type": "string"
  11452. },
  11453. "name": {
  11454. "type": "string"
  11455. },
  11456. "required": {
  11457. "type": "boolean"
  11458. },
  11459. "type": {
  11460. "$ref": "#/definitions/model.ProxyParamType"
  11461. }
  11462. }
  11463. },
  11464. "model.PublicMCPReusingParam": {
  11465. "type": "object",
  11466. "properties": {
  11467. "created_at": {
  11468. "type": "string"
  11469. },
  11470. "group_id": {
  11471. "type": "string"
  11472. },
  11473. "mcp_id": {
  11474. "type": "string"
  11475. },
  11476. "params": {
  11477. "$ref": "#/definitions/model.Params"
  11478. },
  11479. "update_at": {
  11480. "type": "string"
  11481. }
  11482. }
  11483. },
  11484. "model.PublicMCPStatus": {
  11485. "type": "integer",
  11486. "enum": [
  11487. 1,
  11488. 2
  11489. ],
  11490. "x-enum-varnames": [
  11491. "PublicMCPStatusEnabled",
  11492. "PublicMCPStatusDisabled"
  11493. ]
  11494. },
  11495. "model.PublicMCPType": {
  11496. "type": "string",
  11497. "enum": [
  11498. "mcp_proxy_sse",
  11499. "mcp_proxy_streamable",
  11500. "mcp_docs",
  11501. "mcp_openapi",
  11502. "mcp_embed"
  11503. ],
  11504. "x-enum-comments": {
  11505. "PublicMCPTypeDocs": "read only"
  11506. },
  11507. "x-enum-descriptions": [
  11508. "",
  11509. "",
  11510. "read only",
  11511. "",
  11512. ""
  11513. ],
  11514. "x-enum-varnames": [
  11515. "PublicMCPTypeProxySSE",
  11516. "PublicMCPTypeProxyStreamable",
  11517. "PublicMCPTypeDocs",
  11518. "PublicMCPTypeOpenAPI",
  11519. "PublicMCPTypeEmbed"
  11520. ]
  11521. },
  11522. "model.RequestDetail": {
  11523. "type": "object",
  11524. "properties": {
  11525. "id": {
  11526. "type": "integer"
  11527. },
  11528. "log_id": {
  11529. "type": "integer"
  11530. },
  11531. "request_body": {
  11532. "type": "string"
  11533. },
  11534. "request_body_truncated": {
  11535. "type": "boolean"
  11536. },
  11537. "response_body": {
  11538. "type": "string"
  11539. },
  11540. "response_body_truncated": {
  11541. "type": "boolean"
  11542. }
  11543. }
  11544. },
  11545. "model.RerankMeta": {
  11546. "type": "object",
  11547. "properties": {
  11548. "model": {
  11549. "type": "string"
  11550. },
  11551. "tokens": {
  11552. "$ref": "#/definitions/model.RerankMetaTokens"
  11553. }
  11554. }
  11555. },
  11556. "model.RerankMetaTokens": {
  11557. "type": "object",
  11558. "properties": {
  11559. "input_tokens": {
  11560. "type": "integer"
  11561. },
  11562. "output_tokens": {
  11563. "type": "integer"
  11564. }
  11565. }
  11566. },
  11567. "model.RerankRequest": {
  11568. "type": "object",
  11569. "properties": {
  11570. "documents": {
  11571. "type": "array",
  11572. "items": {
  11573. "type": "string"
  11574. }
  11575. },
  11576. "max_chunks_per_doc": {
  11577. "type": "integer"
  11578. },
  11579. "model": {
  11580. "type": "string"
  11581. },
  11582. "overlap_tokens": {
  11583. "type": "integer"
  11584. },
  11585. "query": {
  11586. "type": "string"
  11587. },
  11588. "return_documents": {
  11589. "type": "boolean"
  11590. },
  11591. "top_n": {
  11592. "type": "integer"
  11593. }
  11594. }
  11595. },
  11596. "model.RerankResponse": {
  11597. "type": "object",
  11598. "properties": {
  11599. "id": {
  11600. "type": "string"
  11601. },
  11602. "meta": {
  11603. "$ref": "#/definitions/model.RerankMeta"
  11604. },
  11605. "results": {
  11606. "type": "array",
  11607. "items": {
  11608. "$ref": "#/definitions/model.RerankResult"
  11609. }
  11610. }
  11611. }
  11612. },
  11613. "model.RerankResult": {
  11614. "type": "object",
  11615. "properties": {
  11616. "document": {
  11617. "$ref": "#/definitions/model.Document"
  11618. },
  11619. "index": {
  11620. "type": "integer"
  11621. },
  11622. "relevance_score": {
  11623. "type": "number"
  11624. }
  11625. }
  11626. },
  11627. "model.Response": {
  11628. "type": "object",
  11629. "properties": {
  11630. "created_at": {
  11631. "type": "integer"
  11632. },
  11633. "error": {
  11634. "$ref": "#/definitions/model.ResponseError"
  11635. },
  11636. "id": {
  11637. "type": "string"
  11638. },
  11639. "incomplete_details": {
  11640. "$ref": "#/definitions/model.IncompleteDetails"
  11641. },
  11642. "instructions": {
  11643. "type": "string"
  11644. },
  11645. "max_output_tokens": {
  11646. "type": "integer"
  11647. },
  11648. "metadata": {
  11649. "type": "object",
  11650. "additionalProperties": {}
  11651. },
  11652. "model": {
  11653. "type": "string"
  11654. },
  11655. "object": {
  11656. "type": "string"
  11657. },
  11658. "output": {
  11659. "type": "array",
  11660. "items": {
  11661. "$ref": "#/definitions/model.OutputItem"
  11662. }
  11663. },
  11664. "parallel_tool_calls": {
  11665. "type": "boolean"
  11666. },
  11667. "previous_response_id": {
  11668. "type": "string"
  11669. },
  11670. "reasoning": {
  11671. "$ref": "#/definitions/model.ResponseReasoning"
  11672. },
  11673. "status": {
  11674. "$ref": "#/definitions/model.ResponseStatus"
  11675. },
  11676. "store": {
  11677. "type": "boolean"
  11678. },
  11679. "temperature": {
  11680. "type": "number"
  11681. },
  11682. "text": {
  11683. "$ref": "#/definitions/model.ResponseText"
  11684. },
  11685. "tool_choice": {},
  11686. "tools": {
  11687. "type": "array",
  11688. "items": {
  11689. "$ref": "#/definitions/model.Tool"
  11690. }
  11691. },
  11692. "top_p": {
  11693. "type": "number"
  11694. },
  11695. "truncation": {
  11696. "type": "string"
  11697. },
  11698. "usage": {
  11699. "$ref": "#/definitions/model.ResponseUsage"
  11700. },
  11701. "user": {
  11702. "type": "string"
  11703. }
  11704. }
  11705. },
  11706. "model.ResponseError": {
  11707. "type": "object",
  11708. "properties": {
  11709. "code": {
  11710. "type": "string"
  11711. },
  11712. "message": {
  11713. "type": "string"
  11714. }
  11715. }
  11716. },
  11717. "model.ResponseFormat": {
  11718. "type": "object",
  11719. "properties": {
  11720. "json_schema": {
  11721. "$ref": "#/definitions/model.JSONSchema"
  11722. },
  11723. "type": {
  11724. "type": "string"
  11725. }
  11726. }
  11727. },
  11728. "model.ResponseReasoning": {
  11729. "type": "object",
  11730. "properties": {
  11731. "effort": {
  11732. "type": "string"
  11733. },
  11734. "summary": {
  11735. "type": "string"
  11736. }
  11737. }
  11738. },
  11739. "model.ResponseStatus": {
  11740. "type": "string",
  11741. "enum": [
  11742. "in_progress",
  11743. "completed",
  11744. "failed",
  11745. "incomplete",
  11746. "cancelled"
  11747. ],
  11748. "x-enum-varnames": [
  11749. "ResponseStatusInProgress",
  11750. "ResponseStatusCompleted",
  11751. "ResponseStatusFailed",
  11752. "ResponseStatusIncomplete",
  11753. "ResponseStatusCancelled"
  11754. ]
  11755. },
  11756. "model.ResponseText": {
  11757. "type": "object",
  11758. "properties": {
  11759. "format": {
  11760. "$ref": "#/definitions/model.ResponseTextFormat"
  11761. }
  11762. }
  11763. },
  11764. "model.ResponseTextFormat": {
  11765. "type": "object",
  11766. "properties": {
  11767. "type": {
  11768. "type": "string"
  11769. }
  11770. }
  11771. },
  11772. "model.ResponseUsage": {
  11773. "type": "object",
  11774. "properties": {
  11775. "input_tokens": {
  11776. "type": "integer"
  11777. },
  11778. "input_tokens_details": {
  11779. "$ref": "#/definitions/model.ResponseUsageDetails"
  11780. },
  11781. "output_tokens": {
  11782. "type": "integer"
  11783. },
  11784. "output_tokens_details": {
  11785. "$ref": "#/definitions/model.ResponseUsageDetails"
  11786. },
  11787. "total_tokens": {
  11788. "type": "integer"
  11789. }
  11790. }
  11791. },
  11792. "model.ResponseUsageDetails": {
  11793. "type": "object",
  11794. "properties": {
  11795. "cached_tokens": {
  11796. "type": "integer"
  11797. },
  11798. "reasoning_tokens": {
  11799. "type": "integer"
  11800. }
  11801. }
  11802. },
  11803. "model.ReusingParam": {
  11804. "type": "object",
  11805. "properties": {
  11806. "description": {
  11807. "type": "string"
  11808. },
  11809. "name": {
  11810. "type": "string"
  11811. },
  11812. "required": {
  11813. "type": "boolean"
  11814. }
  11815. }
  11816. },
  11817. "model.StreamOptions": {
  11818. "type": "object",
  11819. "properties": {
  11820. "include_usage": {
  11821. "type": "boolean"
  11822. }
  11823. }
  11824. },
  11825. "model.SttJSONResponse": {
  11826. "type": "object",
  11827. "properties": {
  11828. "text": {
  11829. "type": "string"
  11830. }
  11831. }
  11832. },
  11833. "model.SummaryDataV2": {
  11834. "type": "object",
  11835. "properties": {
  11836. "audio_input_tokens": {
  11837. "type": "integer"
  11838. },
  11839. "cache_creation_tokens": {
  11840. "type": "integer"
  11841. },
  11842. "cached_tokens": {
  11843. "type": "integer"
  11844. },
  11845. "channel_id": {
  11846. "type": "integer"
  11847. },
  11848. "exception_count": {
  11849. "type": "integer"
  11850. },
  11851. "group_id": {
  11852. "type": "string"
  11853. },
  11854. "image_input_tokens": {
  11855. "type": "integer"
  11856. },
  11857. "input_tokens": {
  11858. "type": "integer"
  11859. },
  11860. "max_rpm": {
  11861. "type": "integer"
  11862. },
  11863. "max_tpm": {
  11864. "type": "integer"
  11865. },
  11866. "model": {
  11867. "type": "string"
  11868. },
  11869. "output_tokens": {
  11870. "type": "integer"
  11871. },
  11872. "reasoning_tokens": {
  11873. "type": "integer"
  11874. },
  11875. "request_count": {
  11876. "type": "integer"
  11877. },
  11878. "retry_count": {
  11879. "type": "integer"
  11880. },
  11881. "status_400_count": {
  11882. "type": "integer"
  11883. },
  11884. "status_429_count": {
  11885. "type": "integer"
  11886. },
  11887. "status_4xx_count": {
  11888. "type": "integer"
  11889. },
  11890. "status_500_count": {
  11891. "type": "integer"
  11892. },
  11893. "status_5xx_count": {
  11894. "type": "integer"
  11895. },
  11896. "timestamp": {
  11897. "type": "integer"
  11898. },
  11899. "token_name": {
  11900. "type": "string"
  11901. },
  11902. "total_time_milliseconds": {
  11903. "type": "integer"
  11904. },
  11905. "total_tokens": {
  11906. "type": "integer"
  11907. },
  11908. "total_ttfb_milliseconds": {
  11909. "type": "integer"
  11910. },
  11911. "used_amount": {
  11912. "type": "number"
  11913. },
  11914. "web_search_count": {
  11915. "type": "integer"
  11916. }
  11917. }
  11918. },
  11919. "model.TestConfig": {
  11920. "type": "object",
  11921. "properties": {
  11922. "enabled": {
  11923. "type": "boolean"
  11924. },
  11925. "params": {
  11926. "$ref": "#/definitions/model.Params"
  11927. }
  11928. }
  11929. },
  11930. "model.TextResponse": {
  11931. "type": "object",
  11932. "properties": {
  11933. "choices": {
  11934. "type": "array",
  11935. "items": {
  11936. "$ref": "#/definitions/model.TextResponseChoice"
  11937. }
  11938. },
  11939. "created": {
  11940. "type": "integer"
  11941. },
  11942. "id": {
  11943. "type": "string"
  11944. },
  11945. "model": {
  11946. "type": "string"
  11947. },
  11948. "object": {
  11949. "type": "string"
  11950. },
  11951. "usage": {
  11952. "$ref": "#/definitions/model.ChatUsage"
  11953. }
  11954. }
  11955. },
  11956. "model.TextResponseChoice": {
  11957. "type": "object",
  11958. "properties": {
  11959. "finish_reason": {
  11960. "$ref": "#/definitions/model.FinishReason"
  11961. },
  11962. "index": {
  11963. "type": "integer"
  11964. },
  11965. "message": {
  11966. "$ref": "#/definitions/model.Message"
  11967. },
  11968. "text": {
  11969. "type": "string"
  11970. }
  11971. }
  11972. },
  11973. "model.TextToSpeechRequest": {
  11974. "type": "object",
  11975. "required": [
  11976. "input",
  11977. "model",
  11978. "voice"
  11979. ],
  11980. "properties": {
  11981. "input": {
  11982. "type": "string"
  11983. },
  11984. "model": {
  11985. "type": "string"
  11986. },
  11987. "response_format": {
  11988. "type": "string"
  11989. },
  11990. "speed": {
  11991. "type": "number"
  11992. },
  11993. "stream_format": {
  11994. "type": "string"
  11995. },
  11996. "voice": {
  11997. "type": "string"
  11998. }
  11999. }
  12000. },
  12001. "model.TimeSummaryDataV2": {
  12002. "type": "object",
  12003. "properties": {
  12004. "summary": {
  12005. "type": "array",
  12006. "items": {
  12007. "$ref": "#/definitions/model.SummaryDataV2"
  12008. }
  12009. },
  12010. "timestamp": {
  12011. "type": "integer"
  12012. }
  12013. }
  12014. },
  12015. "model.TimeoutConfig": {
  12016. "type": "object",
  12017. "properties": {
  12018. "request_timeout": {
  12019. "type": "integer"
  12020. },
  12021. "stream_request_timeout": {
  12022. "type": "integer"
  12023. }
  12024. }
  12025. },
  12026. "model.Tool": {
  12027. "type": "object",
  12028. "properties": {
  12029. "function": {
  12030. "$ref": "#/definitions/model.Function"
  12031. },
  12032. "type": {
  12033. "type": "string"
  12034. }
  12035. }
  12036. },
  12037. "model.ToolCall": {
  12038. "type": "object",
  12039. "properties": {
  12040. "function": {
  12041. "$ref": "#/definitions/model.Function"
  12042. },
  12043. "id": {
  12044. "type": "string"
  12045. },
  12046. "index": {
  12047. "type": "integer"
  12048. },
  12049. "type": {
  12050. "type": "string"
  12051. }
  12052. }
  12053. },
  12054. "model.UpdateGroupRequest": {
  12055. "type": "object",
  12056. "properties": {
  12057. "available_sets": {
  12058. "type": "array",
  12059. "items": {
  12060. "type": "string"
  12061. }
  12062. },
  12063. "balance_alert_enabled": {
  12064. "type": "boolean"
  12065. },
  12066. "balance_alert_threshold": {
  12067. "type": "number"
  12068. },
  12069. "rpm_ratio": {
  12070. "type": "number"
  12071. },
  12072. "status": {
  12073. "type": "integer"
  12074. },
  12075. "tpm_ratio": {
  12076. "type": "number"
  12077. }
  12078. }
  12079. },
  12080. "model.UpdateTokenRequest": {
  12081. "type": "object",
  12082. "properties": {
  12083. "models": {
  12084. "type": "array",
  12085. "items": {
  12086. "type": "string"
  12087. }
  12088. },
  12089. "name": {
  12090. "type": "string"
  12091. },
  12092. "period_last_update_time": {
  12093. "type": "integer"
  12094. },
  12095. "period_quota": {
  12096. "type": "number"
  12097. },
  12098. "period_type": {
  12099. "type": "string"
  12100. },
  12101. "quota": {
  12102. "description": "Quota system",
  12103. "type": "number"
  12104. },
  12105. "status": {
  12106. "type": "integer"
  12107. },
  12108. "subnets": {
  12109. "type": "array",
  12110. "items": {
  12111. "type": "string"
  12112. }
  12113. }
  12114. }
  12115. },
  12116. "model.Usage": {
  12117. "type": "object",
  12118. "properties": {
  12119. "audio_input_tokens": {
  12120. "type": "integer"
  12121. },
  12122. "cache_creation_tokens": {
  12123. "type": "integer"
  12124. },
  12125. "cached_tokens": {
  12126. "type": "integer"
  12127. },
  12128. "image_input_tokens": {
  12129. "type": "integer"
  12130. },
  12131. "input_tokens": {
  12132. "type": "integer"
  12133. },
  12134. "output_tokens": {
  12135. "type": "integer"
  12136. },
  12137. "reasoning_tokens": {
  12138. "type": "integer"
  12139. },
  12140. "total_tokens": {
  12141. "type": "integer"
  12142. },
  12143. "web_search_count": {
  12144. "type": "integer"
  12145. }
  12146. }
  12147. },
  12148. "model.VideoGenerationJob": {
  12149. "type": "object",
  12150. "properties": {
  12151. "created_at": {
  12152. "type": "integer"
  12153. },
  12154. "expires_at": {
  12155. "type": "integer"
  12156. },
  12157. "finish_reason": {
  12158. "type": "string"
  12159. },
  12160. "finished_at": {
  12161. "type": "integer"
  12162. },
  12163. "generations": {
  12164. "type": "array",
  12165. "items": {
  12166. "$ref": "#/definitions/model.VideoGenerations"
  12167. }
  12168. },
  12169. "height": {
  12170. "type": "integer"
  12171. },
  12172. "id": {
  12173. "type": "string"
  12174. },
  12175. "model": {
  12176. "type": "string"
  12177. },
  12178. "n_seconds": {
  12179. "type": "integer"
  12180. },
  12181. "n_variants": {
  12182. "type": "integer"
  12183. },
  12184. "object": {
  12185. "type": "string"
  12186. },
  12187. "prompt": {
  12188. "type": "string"
  12189. },
  12190. "status": {
  12191. "$ref": "#/definitions/model.VideoGenerationJobStatus"
  12192. },
  12193. "width": {
  12194. "type": "integer"
  12195. }
  12196. }
  12197. },
  12198. "model.VideoGenerationJobRequest": {
  12199. "type": "object",
  12200. "properties": {
  12201. "height": {
  12202. "type": "integer"
  12203. },
  12204. "model": {
  12205. "type": "string"
  12206. },
  12207. "n_seconds": {
  12208. "type": "integer"
  12209. },
  12210. "n_variants": {
  12211. "type": "integer"
  12212. },
  12213. "prompt": {
  12214. "type": "string"
  12215. },
  12216. "width": {
  12217. "type": "integer"
  12218. }
  12219. }
  12220. },
  12221. "model.VideoGenerationJobStatus": {
  12222. "type": "string",
  12223. "enum": [
  12224. "queued",
  12225. "processing",
  12226. "running",
  12227. "succeeded"
  12228. ],
  12229. "x-enum-varnames": [
  12230. "VideoGenerationJobStatusQueued",
  12231. "VideoGenerationJobStatusProcessing",
  12232. "VideoGenerationJobStatusRunning",
  12233. "VideoGenerationJobStatusSucceeded"
  12234. ]
  12235. },
  12236. "model.VideoGenerations": {
  12237. "type": "object",
  12238. "properties": {
  12239. "created_at": {
  12240. "type": "integer"
  12241. },
  12242. "height": {
  12243. "type": "integer"
  12244. },
  12245. "id": {
  12246. "type": "string"
  12247. },
  12248. "job_id": {
  12249. "type": "string"
  12250. },
  12251. "n_seconds": {
  12252. "type": "integer"
  12253. },
  12254. "object": {
  12255. "type": "string"
  12256. },
  12257. "prompt": {
  12258. "type": "string"
  12259. },
  12260. "width": {
  12261. "type": "integer"
  12262. }
  12263. }
  12264. },
  12265. "openai.SubscriptionResponse": {
  12266. "type": "object",
  12267. "properties": {
  12268. "access_until": {
  12269. "type": "integer"
  12270. },
  12271. "hard_limit_usd": {
  12272. "type": "number"
  12273. },
  12274. "has_payment_method": {
  12275. "type": "boolean"
  12276. },
  12277. "object": {
  12278. "type": "string"
  12279. },
  12280. "soft_limit_usd": {
  12281. "type": "number"
  12282. },
  12283. "system_hard_limit_usd": {
  12284. "type": "number"
  12285. }
  12286. }
  12287. },
  12288. "openai.UsageResponse": {
  12289. "type": "object",
  12290. "properties": {
  12291. "object": {
  12292. "type": "string"
  12293. },
  12294. "total_usage": {
  12295. "description": "DailyCosts []OpenAIUsageDailyCost `json:\"daily_costs\"`",
  12296. "type": "number"
  12297. }
  12298. }
  12299. }
  12300. },
  12301. "securityDefinitions": {
  12302. "ApiKeyAuth": {
  12303. "type": "apiKey",
  12304. "name": "Authorization",
  12305. "in": "header"
  12306. }
  12307. }
  12308. }