Introduction
Apex from Callstack supports React Native and React application development. This chat API accepts text / images, provides a 262,144-token input budget and accepts max_tokens up to 131,072. Stream Apex’s text as it arrives, or let a function-call result supply the evidence for the next step in React Native development with Apex.
| Field | Value |
|---|---|
| Input | Text |
| Output | Text |
| Input budget | 262,144 tokens |
| max_tokens ceiling | 131,072 |
| Inputs | text / images |
Key features & highlights
Trained on how React Native is actually written
Callstack built Apex from React Native documentation, source code, public API symbols, libraries and discussions grounded in real repositories. That shows up in the work developers hand it: navigation setup, list performance, animations, native module wrappers and library upgrades, where a general model often reaches for a pattern from the wrong version.
Tool calls that fit a coding workflow
Send up to 128 function definitions and Apex can answer with a tool call instead of prose: read a file, run the tests, apply a patch. Your application runs the tool and returns the result as a tool message with the matching tool_call_id, so the model proposes and your code decides what executes.
A whole feature in one request
With 262,144 tokens you can send a screen, its hooks, the navigator config, the related tests and the error log together. The model answers from the files you gave it rather than from a guess about how your project is laid out.
Turn reasoning up only when the bug is hard
reasoning_effort lets you keep quick edits and explanations at none or low, and move to medium or xhigh for a bug that crosses several files. Reasoning tokens are counted inside max_tokens, so the cost of thinking stays visible in the usage you are billed for.
Request parameters
| Parameter | Required | Description |
|---|---|---|
messages | Yes | For React Native development with Apex, supply the conversation and the evidence as text in order, and connect each tool result to its original |
max_tokens | No | Budget Apex’s visible answer and billable reasoning together in |
reasoning_effort | No | Apex exposes none, low, medium, xhigh, starting at medium; compare effort settings on React Native development with Apex because deeper reasoning can increase output tokens and… |
stop | No | End Apex’s generated text at one supplied stop sequence or any of up to four; the matching sequence itself is left out of the answer. at least 1 characters · at least 1 items · at most 4 items |
temperature | No | Apex accepts temperature from 0 to 2; keep other sampling controls steady when comparing wording for React Native development with Apex. |
top_p | No | Use |
tools | No | Give Apex OpenAI-format function definitions for React Native development with Apex; the model proposes arguments and your application validates and executes the operation. at most 128 items |
parallel_tool_calls | No | Allow Apex to propose independent function calls together when React Native development with Apex needs more than one external result. Default: |
tool_choice | No | Choose auto, none, required or a specific function for Apex, then preserve the returned call ID when continuing React Native development with Apex. |
Pricing
Input $0.50 / Output $3 per 1 million tokens
Use cases
Fix a slow list screen
Paste a FlatList screen with its renderItem, the data hook and a profiler note, and ask where re-renders come from. Apex is built for this kind of React Native question and can propose a focused patch with memoization, stable keys and item layout changes, which you review like any pull request.
Review a pull request
Send the diff plus the files it touches and ask for problems you can point to a line for: stale closures, missing effect cleanup, platform-specific code that only works on iOS. Ask for a ranked list so the first item is the one worth blocking on.
Upgrade a library or SDK
Give it the changelog excerpt and the files that use the old API, then ask for the changes in the order they should land. Callstack says the model is able to question wrong assumptions and sequence changes, which suits an upgrade with several steps.
Generate tests and Next.js code
Ask for component tests, a hook test or a Next.js route handler from the code you pasted. Callstack publishes Next.js results as well, so web React work is a supported use rather than an afterthought.
Prompt guide & pro tips
Send the files, not a description
Put the relevant source in the messages with its file path above each block, then state the task and the platform versions at the end. A screen that works on one React Native version and breaks on another is far easier to fix when the package versions are in the prompt.
Pick a reasoning level for the job
Leave
reasoning_efforton medium for most work. Use none or low for renames, small edits and explanations, and xhigh for a bug whose cause spans files. Raisemax_tokenswhen you go up a level, since reasoning shares that budget with the visible answer.Wire tools and continue the loop
Define your tools, let the model return a tool call, run it in your own code and send the output back as a tool message with the same
tool_call_id. Keep the assistant message that made the call in the history so the next turn knows what happened.Stream long replies and check the finish reason
Turn on streaming for a multi-file answer so you can show progress, and look at the finish reason before treating the output as complete. A reply cut off by
max_tokensneeds a higher limit, not a retry of the same request.
React Native changes with Apex
Apex is Callstack’s coding model, with particular emphasis on React Native. Send the component, the platform involved, the package versions and the observed behavior as text. A screenshot alone cannot be read by this text-only endpoint.
Give a mobile issue enough context
Include the distinction between iOS and Android, relevant navigation or state code, and the expected result. The input budget is 262,144 tokens, with max_tokens up to 131,072. Use the reasoning levels exposed by this endpoint and leave room for both analysis and the proposed edit.
Check the proposed change
Apex may request a function call, but your application controls access to files and test commands. Preserve tool_call_id when returning results, then review the patch and verify it on the target platform. Streaming makes a long explanation readable before the response is complete.
Apex’s own content decisions still apply during React Native development with Apex; NSFW responses may change with the request or model version, so unrestricted output is not promised.
API quick start
curl --fail-with-body -sN https://api.spicyapi.ai/v1/chat/completions \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "callstack/apex/chat",
"messages": [
{
"role": "user",
"content": "Summarise the following release notes into three bullet points."
}
],
"stream": true
}' \
| jq --unbuffered -Rrj 'select(startswith("data: ")) | .[6:] | select(. != "[DONE]") | fromjson | if .error then "\n[error] \(.error.message)\n" else (.choices[0].delta.content? // empty) end'
See the API reference for authentication, the complete schema, polling, and error handling.
