Skip to main content
POST
/
tasks
JavaScript
import Mobilerun from '@mobilerun/sdk';

const client = new Mobilerun({
  apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
});

const response = await client.tasks.run({ llmModel: 'openai/gpt-5', task: 'x' });

console.log(response.id);
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "streamUrl": "<string>",
  "token": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer token via Authorization header

Body

application/json
llmModel
enum<string>
required
Available options:
openai/gpt-5,
google/gemini-2.5-flash,
google/gemini-2.5-pro,
google/gemini-3-pro-preview,
anthropic/claude-sonnet-4.5,
minimax/minimax-m2,
moonshotai/kimi-k2-thinking
task
string
required
Minimum string length: 1
apps
string[]
credentials
PackageCredentials · object[]
executionTimeout
integer
default:1000
files
string[]
maxSteps
integer
default:100
outputSchema
Outputschema · object
reasoning
boolean
default:true
temperature
number
default:0.5
vision
boolean
default:false
vpnCountry
enum<string> | null
Available options:
US,
BR,
FR,
DE,
IN,
JP,
KR,
ZA

Response

Successful Response

id
string<uuid>
required

The ID of the task

streamUrl
string
required

The URL of the stream

token
string
required

The token of the stream