swagger.json 369 KB

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