swagger.json 330 KB

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