Verify the code and receive an API key
Complete email-based account access by submitting the same email address and the six-digit code from the verification email. A successful response contains an AllModels API key. Save it securely when received because the full key is returned only in this response. Use it as `Authorization: Bearer <apiKey>` for authenticated API requests. If the code cannot be verified, start the flow again to request a new one.
/account/agent-signup/verifyComplete email-based account access by submitting the same email address and the six-digit code from the verification email. A successful response contains an AllModels API key. Save it securely when received because the full key is returned only in this response. Use it as Authorization: Bearer <apiKey> for authenticated API requests. If the code cannot be verified, start the flow again to request a new one.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
import { writeFile } from "node:fs/promises";const response = await fetch("https://api.allmodels.io/account/agent-signup/verify", { method: "POST", headers: { ...{}, "Content-Type": "application/json" }, body: JSON.stringify({ "email": "user@example.com", "code": "123456"})});if (!response.ok) throw new Error(`AllModels request failed: ${response.status}`);console.log(await response.json());import osimport requestspayload = { "email": "user@example.com", "code": "123456"}response = requests.post( "https://api.allmodels.io/account/agent-signup/verify", headers={}, json=payload, timeout=60,)response.raise_for_status()print(response.json())curl -X POST https://api.allmodels.io/account/agent-signup/verify \ -H "Content-Type: application/json" \ --data '{ "email": "user@example.com", "code": "123456"}'{ "apiKey": "sk_live_..."}{ "error": "invalid_request"}{ "error": "invalid_request"}{ "error": "invalid_request"}{ "error": "invalid_request"}Email a sign-in code POST
Start email-based account access for an agent. Provide the email address whose owner will approve access. AllModels sends that address a six-digit code. Ask the owner for the code, then call `POST /account/agent-signup/verify` with the same email address. No API key is required for this request, and the flow works for both new and existing AllModels accounts.
Create a link to add account balance POST
Create a secure payment link for adding prepaid balance to the account associated with your API key. Authenticate with `Authorization: Bearer <apiKey>` and provide the amount in `amount_usd`. Open the returned `url` in a browser or send it to the person who manages account funding. After payment succeeds, the account balance updates automatically.
