Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DE0CH/grok-frontend
/ functions
Functions
35 in github.com/DE0CH/grok-frontend
⨍
Functions
35
◇
Types & classes
1
↓ 5 callers
Function
proxyUrl
Build proxy URL: ?url=<encoded-full-target-url>
src/lib/grokApi.ts:19
↓ 3 callers
Function
fallback
(prefix: string)
src/lib/grokApi.ts:277
↓ 3 callers
Function
setGrokApiKey
(key: string | null)
src/lib/grokApi.ts:4
↓ 2 callers
Function
getApiKey
()
src/lib/grokApi.ts:8
↓ 2 callers
Function
getDownloadFilename
( url: string, defaultName = "grok-image" )
src/lib/downloadUtils.ts:16
↓ 2 callers
Function
getErrorMessage
Extract a user-facing message from API errors; prefers full JSON when available.
src/lib/grokApi.ts:62
↓ 2 callers
Function
processImageGenerationResponse
Process raw image generation/edit response into success or unknown_error, surfacing raw body on unknown.
src/lib/grokApi.ts:179
↓ 2 callers
Function
useProxy
(url: string)
src/lib/grokApi.ts:25
↓ 2 callers
Function
xaiPostRaw
Low-level POST helper for image endpoints that returns raw response text and surfaces API errors.
src/lib/grokApi.ts:144
↓ 1 callers
Function
clearApiKeyCookie
()
src/lib/cookies.ts:16
↓ 1 callers
Function
getApiKeyFromCookie
()
src/lib/cookies.ts:4
↓ 1 callers
Function
getBaseUrl
()
src/lib/grokApi.ts:13
↓ 1 callers
Function
grokFetch
Custom fetch so requests to imgen.x.ai and vidgen.x.ai go via our proxy (avoids CORS).
src/lib/grokApi.ts:30
↓ 1 callers
Function
imageEdit
( prompt: string, imageDataUri: string )
src/lib/grokApi.ts:232
↓ 1 callers
Function
imageToVideo
( prompt: string, imageDataUri: string, options?: { duration?: number; resolution?: string } )
src/lib/grokApi.ts:342
↓ 1 callers
Function
isAllowedApiPath
(pathname: string)
api/proxy.ts:19
↓ 1 callers
Function
isAllowedCdnUrl
(url: string)
api/proxy.ts:8
↓ 1 callers
Function
isAllowedUrl
(targetUrl: string)
api/proxy.ts:25
↓ 1 callers
Function
processVideoPollResponse
Process raw video poll response text into one of: pending, success, known_error, unknown_error.
src/lib/grokApi.ts:264
↓ 1 callers
Function
proxyFetch
(request: Request)
api/proxy.ts:36
↓ 1 callers
Function
setApiKeyCookie
(key: string)
src/lib/cookies.ts:10
↓ 1 callers
Function
statusMessage
(status: number)
src/lib/grokApi.ts:43
↓ 1 callers
Function
textToImage
(prompt: string)
src/lib/grokApi.ts:213
↓ 1 callers
Function
usePageTitle
()
src/App.tsx:16
Function
App
()
src/App.tsx:68
Function
ImageToImage
()
src/pages/ImageToImage.tsx:6
Function
ImageToVideo
()
src/pages/ImageToVideo.tsx:10
Function
ImageUpload
({ preview, onFileSelect, label = "Image" }: Props)
src/components/ImageUpload.tsx:9
Function
Login
()
src/pages/Login.tsx:6
Function
NotFound
()
src/pages/NotFound.tsx:3
Function
ProtectedLayout
({ children }: { children: React.ReactNode })
src/App.tsx:32
Function
TextToImage
()
src/pages/TextToImage.tsx:5
Function
configureServer
(server)
vite.config.ts:14
Function
handleLogout
()
src/App.tsx:47
Function
handleSubmit
(e: React.FormEvent)
src/pages/Login.tsx:13