{"uid":"cap_F7quJLxJ-enhA2hzJsXRe","slug":"x402-gateway-production-up-railway-app-3e55b479","name":"GPT-5.3 Codex (via x402 Gateway)","description":"OpenAI's SOTA agentic coding model — best-in-class for software engineering and code generation","url":"https://x402-gateway-production.up.railway.app/api/llm/gpt-5.3-codex?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","bodyType","body","method"],"properties":{"body":{"type":"object","required":["messages"],"properties":{"seed":{"type":"integer","description":"Model-supported seed; see /docs/llm-capabilities.md."},"tools":{"type":"array","items":{"type":"object","required":["function"],"properties":{"type":{"enum":["function"],"type":"string"},"function":{"type":"object","properties":{"name":{"type":"string"},"strict":{"type":"boolean"},"parameters":{"type":"object"},"description":{"type":"string"}}}}},"description":"Client-executed function definitions; return results using role=tool and tool_call_id."},"stream":{"type":"boolean","description":"Return live OpenAI-compatible SSE after payment settlement."},"plugins":{"type":"array","items":{"type":"object","required":["pdf"],"properties":{"id":{"enum":["file-parser"],"type":"string"},"pdf":{"type":"object","properties":{"engine":{"enum":["native"],"type":"string"}}}}},"description":"Optional native PDF parser only; automatically enabled for file inputs."},"messages":{"type":"array","items":{"type":"object","anyOf":[{"required":["content"]},{"required":["tool_calls"]}],"required":["role"],"properties":{"name":{"type":"string"},"role":{"enum":["system","developer","user","assistant","tool"],"type":"string"},"content":{"oneOf":[{"type":"string"},{"type":"null"},{"type":"array","items":{"type":"object","required":["type"],"properties":{"type":{"enum":["text","image_url","file"],"type":"string"}},"additionalProperties":true},"maxItems":100,"minItems":1}]},"refusal":{"type":["string","null"]},"reasoning":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object"}},"annotations":{"type":"array","items":{"type":"object"}},"tool_call_id":{"type":"string"},"cache_control":{"type":"object"},"reasoning_details":{"type":"array","items":{"type":"object"}}},"additionalProperties":false},"maxItems":100,"minItems":1,"description":"Text or model-supported multimodal messages; assistant tool calls may have null content"},"reasoning":{"type":"object","description":"Model-supported reasoning; see /docs/llm-capabilities.md."},"max_tokens":{"type":"integer","example":1024,"description":"Total output budget, including reasoning. Use this or max_completion_tokens."},"tool_choice":{"oneOf":[{"enum":["auto","none","required"],"type":"string"},{"type":"object"}],"description":"Model-supported tool_choice; see /docs/llm-capabilities.md."},"stream_options":{"type":"object","description":"Optional include_usage boolean; usage is always requested upstream."},"response_format":{"type":"object","description":"Model-supported response_format; see /docs/llm-capabilities.md."},"reasoning_effort":{"type":"string","description":"Model-supported reasoning_effort; see /docs/llm-capabilities.md."},"include_reasoning":{"type":"boolean","description":"Model-supported include_reasoning; see /docs/llm-capabilities.md."},"max_completion_tokens":{"type":"integer","description":"Alias for total output budget; bounded by model maxOutputTokens."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["choices","content"],"properties":{"model":{"type":"string"},"usage":{"type":"object","description":"Provider token and usage accounting, when returned."},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"message":{"type":"object","properties":{"role":{"type":"string"},"content":{"type":["string","null"]},"tool_calls":{"type":"array","items":{"type":"object"}}}},"finish_reason":{"type":["string","null"]}}}},"content":{"type":"string","description":"Convenience copy of the first assistant message's text."}}}}}}},"responseSchema":null,"example":{"request":{"model":"gpt-5.3-codex","messages":[{"role":"user","content":"Write a Python function that validates email addresses using regex, includes proper error handling, and returns a boolean indicating validity. Include type hints and a docstring."}],"max_tokens":500},"response":{"model":"openai/gpt-5.3-codex-20260224","usage":{"cost":0.00605675,"is_byok":false,"cost_details":{"upstream_inference_cost":0.00605675,"upstream_inference_prompt_cost":0.00006475,"upstream_inference_completions_cost":0.005992},"total_tokens":465,"prompt_tokens":37,"completion_tokens":428,"prompt_tokens_details":{"audio_tokens":0,"video_tokens":0,"cached_tokens":0,"cache_write_tokens":0},"completion_tokens_details":{"audio_tokens":0,"image_tokens":0,"reasoning_tokens":64}},"content":"```python\nimport re\nfrom typing import Pattern\n\n# A practical (not fully RFC 5322-complete) email regex.\n_EMAIL_REGEX: Pattern[str] = re.compile(\n    r\"^(?=.{1,254}$)(?=.{1,64}@)\"\n    r\"[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]+\"\n    r\"@\"\n    r\"(?:[A-Za-z0-9-]+\\.)+[A-Za-z]{2,63}$\"\n)\n\n\ndef is_valid_email(email: str) -> bool:\n    \"\"\"\n    Validate whether a string is a syntactically valid email address.\n\n    This function performs a regex-based validation with basic constraints:\n    - Total length <= 254 characters\n    - Local part (before '@') <= 64 characters\n    - Domain contains at least one dot and valid label characters\n    - Top-level domain length between 2 and 63 letters\n\n    Args:\n        email: The email address string to validate.\n\n    Returns:\n        True if the email appears valid by the regex rules, otherwise False.\n\n    Error Handling:\n        - Returns False if `email` is not a string.\n        - Returns False if regex matching fails unexpectedly.\n    \"\"\"\n    if not isinstance(email, str):\n        return False\n\n    candidate = email.strip()\n    if not candidate:\n        return False\n\n    try:\n        return _EMAIL_REGEX.fullmatch(candidate) is not None\n    except re.error:\n        # Defensive fallback in case of regex engine issues\n        return False\n```\n\nIf you want, I can also provide a stricter version (e.g., disallowing consecutive dots in the local part) or one that supports internationalized domains."}},"exampleRequest":{"model":"gpt-5.3-codex","messages":[{"role":"user","content":"Write a Python function that validates email addresses using regex, includes proper error handling, and returns a boolean indicating validity. Include type hints and a docstring."}],"max_tokens":500},"tags":["x402"],"displayCostAmount":"0.08","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":1,"rating":{"score":"0.00","successRate":"0.00","reviews":1,"stars":null,"state":"rated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.08/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.08","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.08","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_FpEoVO7We-ZjjhDE7zHa7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.08","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calls OpenAI's GPT-5.3 Codex model — a state-of-the-art agentic coding model — for software engineering and code generation tasks, paid per-call via x402/USDC.","exampleAgentPrompt":"Write me a Python function that takes a list of dictionaries and sorts them by a specified key, handling missing keys gracefully — include type hints and a docstring.","exampleUseCases":null,"resultDescription":"Returns AI-generated code, refactored code, explanations, or debugging suggestions produced by OpenAI's GPT-5.3 Codex model, optimized for software engineering tasks.","failureModes":["Invalid or missing prompt returns 400 error","Insufficient USDC balance or x402 payment failure returns 402","Model unavailable or overloaded returns 503","Prompt too long exceeds context window, returning 400","Malformed request body returns 422"],"whenToPreferThis":"Choose this endpoint when you need OpenAI's best-in-class coding model (GPT-5.3 Codex) for complex software engineering tasks, agentic coding workflows, or high-quality code generation — especially when you want SOTA performance and are willing to pay $0.08/call. Prefer over cheaper GPT-5 tiers for difficult or nuanced coding problems.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":1,"lastUsedAt":"2026-07-01T17:22:42.514Z","lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T19:18:36.211Z","isFirstParty":false,"canonicalSlug":"x402-gateway-production-up-railway-app-3e55b479"}