Without hearing it, it's a little hard to say for sure but based on what I'm seeing, I'd say that the first example is completely wrong. In no way does the written time signature reflect the groupings of notes. The groupings of notes suggest three bars of 3/4 or 6/8 plus one bar of 4/4 or 8/8. If all of the notes, minus the pickup, were in one bar, we could call that 13/4 or 26/8, not 13/8.
The basic way to think of this is the top number represents how many of the bottom number type of notes are within a measure. So 13/8 would have 13 1/8 notes. In your example, there are 26 1/8 notes, so you could call it 26/8, or break that down into 13/4. 26/8 is very uncommon and could make for difficult reading if you were to pass this music on to someone else to play. With a measure so long, it's much easier to get lost within the notes.
Depending on how everything is phrased, which I can't really tell from the way it's written, it might make a lot more sense to write this out as separate meters, as much as I know you don't want to do that. Part of notating music is making sure that it conveys all that it needs to for the player to produce it without having to ask the composer questions. If the first three bars have a feeling of 6/8, then I think you basically have to write them in 6/8 because if you write it in #/4, it won't imply the phrasing. You could choose to write it in 13/4 and add a note that breaks it down, such as "6/8+6/8+6/8+4/4", which you would probably put above the designation of 13/4. Either way, you will want to make sure that your 1/8 notes are grouped to spell out the meter as well. Typically in 6/8, we would have two groups of three 1/8 notes, which would be illustrated by how they are connected. You have all six 1/8 notes connected, so it makes it very hard to determine if it would make the most sense to think of this as being in 3/4 or 6/8.
Again, when writing out music, especially for others to play, you want to make sure that you are making it as easy as possible to read all of the notes, as well as making sure that the way it is written illustrates the actual phrasing of the line. If you take the same notes and group them different, you'll find that players would interpret this differently by emphasizing different beats.