swagger.json 395 KB

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