I think I've hit some kind of hard cap

Hello!

I am essentially a complete beginner in programming but I figured I can use Codex to create a website that will help me educate some physics interactions to my students. After creating a bunch of buttons and pop ups, I get this message:
image

Is there a hidden hard cap in terms of length of code in Codex?

I am not savvy enough to know how to create code snippets and combine them in another document to create the page, so I tried doing everything in the Codex but it seems like it doesn’t like that.

The code is currently 8531 Characters 880 Words 222 Lines.

Thanks in advance!

Hey, welcome to the community!

It sounds like you hit the token cap. It’s 4k for Codex using Playground, I believe, and maybe shorter (2048) for contacting the API?

Where/how are you using the API?

Hi, and thanks! I’ve been using the codex-javascript-sandbox. I didn’t know the token cap included the completed code created in the right field, I thought it only counted what I wrote in the instruction box, and the code that gets generated from that instruction.

Is there any guide on how to copy existing code into another document to keep going? I suppose I’ll have to figure out how to keep my variable name and such the same.

I’m not sure of a guide off-hand. What I would do as a new programmer is try to break what you’re building down into chunks to have Codex generate it piece by piece for you to put together at the end.

Good luck!

Thanks, I’ll try that!

1 Like