Skip to main content
Run Codex on one DeepSWE task with Evolve’s HTTP API. These examples use curl directly; the CLI and SDKs call the same service. See the HTTP API reference for supported resource routes.

Connect

You need curl 7.76 or newer and a Full access key from the dashboard’s API keys page. Replace your-api-key below. Writes require full access; a read-only key can inspect existing jobs. Your account also needs available credits to run evaluations. If submission returns HTTP 402 with insufficient_credits, add credits in the dashboard and retry.
Success returns HTTP 200 with your identity and key metadata. The -i flag shows response headers, including the HTTP status. See account setup if authentication fails. GET /api/meta needs no key. It lists the current harnesses, models, limits, and error codes.

Start one evaluation

Save this as job.json. It selects one task from deepswe@1.1 and runs Codex with GPT-6 Luna:
job.json
Submit the file from the same directory:
Success returns HTTP 202 and the accepted job. Copy its id into JOB_ID:
The job runs after the response returns. Closing the HTTP connection does not cancel it. The $1 cap applies to model spend for this trial attempt. A call already in progress can finish above it. Setting max_retries to 0 disables configured infrastructure retries; provider capacity waits can still occur. The JSON fields match the SDK job inputs. Add org to create the job in a team. Attach stored secrets through the request’s secret references.
For retry-safe submission, send an Idempotency-Key header on the first request and each retry. Keep the same key and request body for that intended job. A replay returns HTTP 200 with idempotent_replay: true; reusing the key for a different request returns 409. A new intended run needs a new key.

Follow the result

Repeat until status is COMPLETED, CANCELLED, or FAILED.
A completed job can contain failed trials. Inspect the trial’s status and reward; a missing reward is not zero. Use the trial API reference to read its trace, logs, and files.

Page through collections

Job and trial lists return items, nextCursor, and hasMore. If the trials response above has a non-null nextCursor, copy it into NEXT_CURSOR and request the next page:
Keep the same filters. Treat the cursor as an opaque string and stop when nextCursor is null.

Handle an error

An API refusal returns a non-success HTTP status and an error object. These examples use --fail-with-body, so HTTP errors produce a nonzero exit status while keeping the response body. The -i flag also shows the HTTP status and response headers. The response also includes X-Request-Id. See error handling for common codes and the difference between retrying an HTTP request and retrying a trial.

Operations beyond the SDK methods

Continue with the HTTP API reference for the supported job, trial, dataset, and account operations.
Last modified on November 9, 2026