Laravel API for RapidAPI: Real Upwork Job using Codex CLI

Laravel Daily| 00:11:48|Apr 20, 2026
Chapters8
The creator explains the idea of implementing an Upwork project with Laravel to showcase Laravel capabilities and use AI to build an API prototype.

Coder-friendly overview: Laravel Daily shows turning an Upwork text-cleaner API into a RapidAPI-ready service using Codex CLI, OpenAPI docs with Scramble, and Laravel health checks.

Summary

In this candid Laravel Daily session, the host demonstrates turning a real Upwork project into a RapidAPI-ready API using Laravel. The core idea is to showcase how Laravel can compete with Node.js or Next.js by building and refining an API for external consumption. The walkthrough centers on using Codex CLI as an AI assistant to scaffold the initial API (text cleaner transformations) and then manual refinements to reach production-readiness. We see versioning via a V1 prefix, a health endpoint for uptime checks, and a sample text-cleaning route that transforms input text. The host also integrates Scramble to auto-generate OpenAPI docs, fixes middleware and environment settings, and finally uploads the generated API spec to RapidAPI to create a testable hub. A longer, premium version promises deeper deployment details with Laravel Forge and more AI-assisted iterations. The video emphasizes practical API engineering decisions, concrete Laravel specifics, and the trade-offs between AI-generated scaffolding and manual polish.

Key Takeaways

  • Using Codex CLI, Laravel Daily rapidly generated a V1-prefixed API with a single route and a corresponding test, demonstrating how AI can bootstrap a functional prototype.
  • Health check endpoint was implemented to return a simple status, enabling uptime monitoring with minimal boilerplate.
  • Scramble package was installed (version 0.13) to auto-generate OpenAPI docs, then toggled local production settings to expose docs for RapidAPI upload.
  • OpenAPI JSON (Docs API JSON) was produced and uploaded to RapidAPI Studio, creating a discoverable hub with testable endpoints.
  • The workflow showed how to align AI-generated code with Laravel bootstrap/app changes, route prefixing, and test adjustments to keep the API cohesive across versions.
  • A longer premium version promises deeper exploration of Forge deployment, more AI-assisted iterations, and extended API transformations.

Who Is This For?

Laravel developers and API engineers who want to ship a real API to RapidAPI, leveraging AI-assisted scaffolding while maintaining control over versioning, health checks, and documentation.

Notable Quotes

"‘I will paste that and make sure tests pass like this. And this is in my opinion efficient use of AI as assistant.’"
Shows the iterative AI-assisted approach to keep tests green while evolving the API structure.
"“Open API documentation with this package”"
Highlights the Scramble package's role in generating OpenAPI docs for RapidAPI upload.
"“So, I will upload the JSON”"
Walks through exporting the generated OpenAPI spec and submitting it to RapidAPI Studio.
"“The first version was this. One route, one controller with one action class”"
Describes how Codex bootstrapped a minimal viable API before polishing for RapidAPI.
"“This is not a course or a polished video … almost unrehearsed”"
Sets the approachable, exploratory tone of the video, emphasizing practical learning over polish.

Questions This Video Answers

  • How do you version Laravel APIs when deploying to RapidAPI?
  • What is Scramble and how does it generate OpenAPI docs for Laravel projects?
  • Can Codex CLI realistically bootstrap an API for production in Laravel, or is this just a prototype?
  • How do you integrate a health check endpoint in a Laravel API for uptime monitoring?
  • What steps are needed to publish a Laravel API to RapidAPI from a local OpenAPI spec?
Laravel APIRapidAPICodex CLIOpenAPIScramble packageLaravel ForgeAPI versioningHealth check endpointPostman/OpenAPI docsAI-assisted development
Full Transcript
Hello, guys. In this video, I will show you how I try to implement part of this Upwork job with Laravel API to upload the API to RapidAPI platform. So, this is a real Upwork job, and I've chosen one of the APIs to build, which is text cleaner. And important part of this job is not about Laravel. And this is I see that as kind of my mission go on Upwork to search for ideas for projects, not necessarily with Laravel, but implement them with Laravel to show the world the possibilities of Laravel instead of like Node.js or Next.js or other tech stack. So, in this video, I will show you how I used Codex CLI AI agent and then manually coded on top of that to deliver this text cleaner on a real RapidAPI platform kind of as an experiment. So, this video will not be like a course or a polished video. This will be more like almost unrehearsed, let's try it out and see what happens with the idea to show you what is the difference between just creating the API with AI or manually just regular API and having the API ready for some consumption on some platform or for front-end developers for clients. Because there are quite a few requirements in the API depending on what will consume that API. And I hope from this video, you will learn a thing or two about APIs in general and also how I use Codex as AI assistant to help me perform this And this video on YouTube is a shortened version of a longer 24-minutes video where I go to create that RapidAPI. But also in the longer video, I show the deployment with Laravel Forge and also more transformations of API along the way. So, in this video, I will show you how to create API versioning, how to create health check, how to create API docs with Scramble package with JSON that I need to upload for RapidAPI platform. But in the premium version of Laravel Daily video, I will go deeper with more things to show you including more details on how I work with AI with Codex CLI in this case. So, first, I installed new Laravel project with Laravel new, then installed API with PHP artisan install API, and then gave Codex this project description. Implement text cleaner with API with these transformations for text. And Codex did deliver, and the first version was this. One route, one controller with one action class of Laravel to perform those transformations. But that was kind of the first 80% of the job, which is not ready for RapidAPI. So, in this video, I want to show you kind of how to normalize and polish the API to be ready for consumption for public. So, let's dive in. So, let's start getting through this list, and the first thing I want to change is V1 for the API prefix. And I will just prompt Codex with this change. So, I will paste that and make sure tests pass like this. And this is in my opinion efficient use of AI as assistant. So, I know what I'm doing. I kind of approve this change, and I know what I would expect. So, that V1 will probably be configured in bootstrap app. That's what I'm expecting. Or maybe in the routes API, that's also possible, but we'll see. And it's using Laravel Boost with search docs to get the latest information. And yeah, it decided to take routes API. Okay, that's fine. It's only one route. Now, the tests. The test would probably fail because of different API route. So, it fixed the test, and let's see the changes. So, in routes API, we have prefix, but then also in bootstrap app, oh, the middleware was different. So, it needed to be changed as well for one test that was failing. And also in the API test, there's post JSON with V1 probably everywhere. But I would like to refactor that. This is repeating. What if we have V2 at the moment? Let's reprompt. For tests, I would like V1 to be separate, not repeating for each method of the test. So, this is my prompt, and let's see whether it will refactor it properly. Okay, so it's looking at the docs of past version 4 how to set up kind of global variable or before each hook in this case. But interestingly, the logic best supports shared setup. But for this file, it's a small one-file test. So, small endpoint helper is cleaner. And as you can see, we have a helper here with API version. How does it look in the final version? Yeah, in the same test file, the version and the helper. Okay, that is a bit overkill. I would probably make it just a variable. But yeah, I would accept that. At least it's in one place and not repeating. So, if we need to change the version or whatever, we work with one constant. Okay, and now I'm happy to commit this change to get. Version V1 prefix. Next, the next point on the checklist is health endpoint just returning status okay for uptime monitoring. That's it. That should be easy. In fact, we could do that by hand, but let's act lazy here, and let's just paste it for Codex to do that. Again, I'm pasting and delegating that to AI knowing exactly how it should be done. I just don't do that manually by hand. But actually, thinking about it, since we added V1 to API V1, should API health also have V1? I'm not sure. I will test it when actually uploading the API to RapidAPI. We'll see. So, yeah, this was done, and the result in get changes routes API without any controller or anything. This is simple returning array, which automatically is transformed to JSON with Laravel under the hood magic. And then one test for that. Okay, so this is done. Again, get commit health API endpoint. Then also deliverables from the job description. But this is not only just from job description. So, on RapidAPI, I've opened up their documentation about how to get started uploading your API project, and you can upload API project with one of these options. And I can also click here. So, I've logged in, created the account. And here, I need to import something. Either open API or Postman collection or GraphQL or Kafka. And let's try to achieve two open AI and Postman collection two in one with one package called Scramble. It will generate open API documentation and probably Postman collection if I remember correctly, but I'm not entirely sure. If not, there are other ways and other tools to have Postman collection a bit later. For now, open API. So, let's install that package according to the documentation. Version 0.13 at the moment. Publishing the config. And next, I will get back to Codex and ask Codex to implement all the documentation needed. Comments, doc blocks for that Scramble package to generate open API docs. So, I want to generate open API documentation with this package. Please add necessary code, comments, and doc blocks to current API in Laravel controllers or wherever needed so that documentation can be generated with this package, and all API endpoints would be present in the documentation. And let's see if Codex delivers. Quite often actually, it's enough to give GitHub or link to package, and then AI agent crawls that information in markdown or whatever format, and then basically analyzes the documentation for you. Again, you don't need to read the docs manually. And we have the results, and that should be the URL we should visit in the browser {slash} docs {slash} API. And by default, it gives actually 403 forbidden because in the configuration of Scramble, we have this middleware web and then restricted docs access. Oh, because I changed the {dot} env to production. Let's change that to local back and debug true. And now we refresh. And yeah, we have the documentation generated successfully. So, have monitoring API health endpoint and text cleaner clean text endpoint with request and sample response. Okay, now, where do we get something for RapidAPI? So, if I choose open API here, we can upload JSON or YAML. And I think JSON was this one. Docs API JSON. Do we have that generated in the browser? And yep, we have that JSON, which I will upload to RapidAPI. So, at least the first version of the documentation with open API is done. And we can double-check in the controller what it actually changed. So, these were added on top as doc blocks as I was expecting. And again, I don't know that syntax by heart. So, this is why I offload that work to AI agent. And now, I will try to submit that API to RapidAPI. I'm shooting that the next morning. And to add API project, these are the fields, and we need to upload open API or Postman collection with JSON or other format, but from live URL already. Let me zoom that in so you would see. So, we have live documentation with the live URLs here. Great. So, now let's upload that JSON. We have docs API {dot} JSON from what I remember. And this is exactly what we need to put into RapidAPI. So, I will save that as a JSON file. API V1, for example, {dot} JSON. And now, I go to RapidAPI Studio and add API project. So, I filled in the fields with text cleaner and description and chose the category text analysis and let's add that API project. And there we go. We have general information, additional information, and base URL. And now I have put the {slash} health here with health check success. That's what we did previously and now if I click view in hub, I should have my API listed. Yes, here with some general description and what happens if I click test endpoint? It shows the curl request with example response from the documentation from JSON. And what happens if I click test endpoint? I guess we will need to implement that Rapid API key, but let's see test endpoint. No, actually it returns 200. It's totally fine. So, yeah, probably Rapid API key is needed for extra security if I want to restrict to only Rapid API usage instead of just public API. So, yeah, it works. We uploaded our API to Rapid API. Of course, I can improve a lot of things here, but also we can browse around. We can see API health check and other. So, all the endpoints would be listed on the left. And now other Rapid API users, I assume, can use my API via their credentials. So, yeah, this was my experiment project how I went from this Upwork job with text cleaner to real Rapid API application. I hope you learned a thing or two about APIs and how I use AI as well. And this was, as I mentioned, the shortened version. The full version 24-minute video is on laravel-daily.com for premium members where you will see the deployment to Laravel Forge and more details about how this API was polished. The link to that will be in the description below. That's it for this time and see you guys in other videos.

Get daily recaps from
Laravel Daily

AI-powered summaries delivered to your inbox. Save hours every week while staying fully informed.