swagger.json 377 KB

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