I was hoping to hear from you before composing an answer because I am not sure what you wanted to know. Sale of Xanax would generally come under California Health and Safety Law section 11375(b)(1).
If you click on the link, you can see that this is a wobbler, meaning the state can go forward with this as a misdemeanor charge or a felony As a misdemeanor, your worst case scenario would be a year of jail. As a felony, the worst case scenario would be 3 years of prison.
I don't know if you have any prior convictions. If you don't, it's possible that you would be able to get probation for this offense, even if the state wishes to indict. 1,000 pills, however, is well in excess of what you'd have for personal use, so the odds are good that this matter will not be reduced to a misdemeanor charge. and that a non-incarceratory sentence may have to be negotiated aggressively.
For that reason, you should find yourself a local criminal lawyer and have him with you on your court date. If you are not able to pay for a lawyer, then you need to plead not guilty at your arraignment and ask the judge to appoint you a free lawyer.
As I don't know what you needed assistance with, I realize this may not have addressed your full concerns. If you need more information or any clarification of what I have said, please reply here on this question thread and I will be happy to add to my answer.