swagger.json 383 KB

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